-
Notifications
You must be signed in to change notification settings - Fork 691
/
.eslintrc.cjs
executable file
·43 lines (43 loc) · 1.71 KB
/
.eslintrc.cjs
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
module.exports = {
root: true,
env: {
browser: true,
es2021: true,
node: true,
},
extends: ['airbnb-typescript', 'eslint:recommended', 'plugin:@typescript-eslint/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 13,
sourceType: 'module',
tsconfigRootDir: __dirname,
project: ['./tsconfig.root.json', './lib/*/tsconfig.json', './docs/tsconfig.json', './exts/*/*/tsconfig.json', './exts/*/tsconfig.json'],
},
plugins: ['import', '@typescript-eslint'],
ignorePatterns: ['./build/**/*', './dist/**/*', './lib/*/public/**/*', './exts/*/*/public/**/*'],
rules: {
'semi-spacing': 'error',
'indent': ['error', 4, {'SwitchCase': 1}],
'object-curly-spacing': ['error', 'never'],
'@typescript-eslint/indent': 'off',
'@typescript-eslint/object-curly-spacing': 'off',
'@typescript-eslint/no-var-requires': 'off',
'react/jsx-filename-extension': 'off',
'import/no-extraneous-dependencies': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'no-fallthrough': 'off',
},
overrides: [
{
files: ['**/*.{ts,tsx}'],
rules: {
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/indent': ['error', 4, {'SwitchCase': 1}],
'@typescript-eslint/object-curly-spacing': ['error', 'never'],
'@typescript-eslint/no-use-before-define': ['error', {functions: false}],
'@typescript-eslint/ban-types': ['error', {types: {'{}': false}}],
},
},
],
};