-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.eslintrc.js
69 lines (69 loc) · 2.09 KB
/
.eslintrc.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
modules: true,
jsx: false,
},
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
plugins: ['@typescript-eslint', 'jest', 'ordered-imports'],
extends: [
'plugin:eslint-comments/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
'plugin:jest/recommended',
'plugin:node/recommended',
],
ignorePatterns: ['.yarn', 'dist', 'coverage', 'jest.config.js', 'webpack.config.js'],
rules: {
'eslint-comments/disable-enable-pair': 'off',
'object-curly-spacing': [2, 'always'],
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'class-methods-use-this': 'off',
'import/prefer-default-export': 'off',
'import/no-unresolved': 'off',
'node/no-unpublished-import': 'off',
'node/no-unsupported-features/es-syntax': 'off',
'node/no-missing-import': 'off',
'ordered-imports/ordered-imports': [
'error',
{
'declaration-ordering': [
'type',
{
ordering: ['side-effect', 'default', 'namespace', 'destructured'],
secondaryOrdering: ['source', 'case-insensitive'],
},
],
'specifier-ordering': 'lowercase-last',
'group-ordering': [
{ name: 'internal libraries', match: '^[$|#].*/', order: 20 },
{ name: 'parent directories', match: '^\\.\\.?', order: 30 },
{ name: 'third-party', match: '.*', order: 10 },
],
},
],
'one-var': 'off',
semi: ['error', 'always'],
},
overrides: [
{
files: ['test/*'],
rules: {
'@typescript-eslint/no-unsafe-member-access': 'off',
},
},
],
};