-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
57 lines (57 loc) · 1.56 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/** @type import('eslint').Linter.Config */
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
project: ['./tsconfig.json', './client/tsconfig.json', './client/worker/tsconfig.json'],
},
env: {
browser: true,
es6: true,
},
plugins: [
'prettier',
'import',
'simple-import-sort',
'@typescript-eslint', // doc: https://typescript-eslint.io/rules/
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/strict',
'prettier',
],
rules: {
'prettier/prettier': 'warn',
'no-console': 'warn',
'eqeqeq': 'error',
'no-else-return': 'error',
'object-shorthand': 'error',
'prefer-destructuring': 'error',
'import/no-duplicates': 'error',
'@typescript-eslint/prefer-enum-initializers': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/consistent-type-exports': 'error',
'@typescript-eslint/no-invalid-void-type': 'off',
'@typescript-eslint/no-unused-vars': ['error', {
args: 'after-used',
ignoreRestSiblings: true,
destructuredArrayIgnorePattern: '^_',
}],
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'objectLiteralProperty',
format: null,
leadingUnderscore: 'allow',
trailingUnderscore: 'allow',
},
],
"@typescript-eslint/no-shadow": "warn",
'simple-import-sort/imports': 'warn',
'simple-import-sort/exports': 'warn',
},
};