-
Notifications
You must be signed in to change notification settings - Fork 7
/
.eslintrc.cjs
67 lines (65 loc) · 1.87 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
58
59
60
61
62
63
64
65
66
67
module.exports = {
"plugins": [
"import"
],
root: true,
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
extends: [
'plugin:n/recommended',
'plugin:unicorn/recommended', // Turn eslint-plugin-unicorn recommended rules on again because many were turned off by eslint-plugin-square.
'plugin:jest/recommended',
],
env: {
node: true,
},
settings: {
node: {
tryExtensions: ['.js', '.json', '.node', '.ts', '.d.ts'],
},
},
rules: {
// TODO: these import rules are running extremely slowly (several seconds each) so disable for now.
'import/default': 'off',
'import/namespace': 'off',
'import/no-cycle': 'off',
'import/no-deprecated': 'off',
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',
'import/extensions': ['error', 'always'],
'unicorn/expiring-todo-comments': 'off',
'unicorn/import-style': 'off',
'unicorn/no-anonymous-default-export': 'off',
'unicorn/no-array-reduce': 'off',
'unicorn/no-nested-ternary': 'off',
'unicorn/prefer-at': 'off',
'unicorn/prefer-string-raw': 'off',
'unicorn/prefer-string-replace-all': 'off',
'unicorn/prevent-abbreviations': 'off',
'require-unicode-regexp': 'error',
},
overrides: [
{
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json'],
},
files: ['*.ts'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
rules: {
'n/no-unsupported-features/es-syntax': [
'error',
{ ignores: ['dynamicImport', 'modules'] },
],
'@typescript-eslint/require-array-sort-compare': 'error',
'@typescript-eslint/no-unused-vars': 'off'
},
},
],
};