-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypescript.js
50 lines (45 loc) · 1.35 KB
/
typescript.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright (c) 2022 David Mondok <[email protected]>
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
// Use this configuration for standard TypeScript Projects.
const base = require('./.eslintrc');
module.exports = {
env: base.env,
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:import/recommended',
'plugin:import/typescript',
'airbnb',
'airbnb/hooks',
'airbnb-typescript',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2019,
sourceType: 'module',
project: './tsconfig.json',
},
plugins: [
...base.plugins,
'@typescript-eslint'
],
rules: {
...base.rules,
'comma-dangle': 'off',
'@typescript-eslint/comma-dangle': ['error', 'always-multiline'],
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': [
'error',
{ allowShortCircuit: true, allowTernary: true },
],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error', { variables: false }],
// Rules for plugin eslint-plugin-newline-destructuring
'@typescript-eslint/indent': ['error', 2],
// Rules for plugin eslint-plugin-unused-imports
'@typescript-eslint/no-unused-vars': 'off',
},
};