-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
75 lines (74 loc) · 2.18 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
70
71
72
73
74
75
module.exports = {
env: {
browser: true,
es6: true,
node: true
},
extends: ['plugin:prettier/recommended', 'plugin:storybook/recommended'],
// Exclude "node_modules", "dist"; include ".prettierrc.js"
ignorePatterns: ['!.prettierrc.js', 'dist', 'node_modules', 'frontend/.storybook/assets'],
overrides: [{
env: {
es6: true,
node: true
},
extends: ['plugin:@typescript-eslint/recommended', 'plugin:react/recommended', 'prettier'],
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module'
},
plugins: ['babel', 'import', 'node', 'prettier', 'react', 'simple-import-sort'],
rules: {
'@typescript-eslint/consistent-type-imports': ['error', {
prefer: 'type-imports'
}],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': ['error', {
argsIgnorePattern: '^_'
}],
'@typescript-eslint/prefer-interface': 'off',
'import/no-cycle': ['error', {
ignoreExternal: true
}],
'no-console': ['error', {
allow: ['warn', 'error']
}],
'node/no-process-env': 'error',
'prettier/prettier': 'error',
'react/jsx-sort-props': 'error',
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': 'error',
'sort-imports': 'off',
'sort-keys': 'off'
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx']
},
'import/resolver': {
// use <root>/tsconfig.json
typescript: {
alwaysTryTypes: true // always try to resolve types under `<root/>@types` directory even if it doesn't contain any source code, like `@types/unist`
}
},
react: {
version: 'detect'
}
}
}],
parser: 'babel-eslint',
plugins: ['json-format'],
root: true,
rules: {
'sort-keys': ['error', 'asc', {
natural: true
}]
},
settings: {
'json/json-with-comments-files': [],
'json/sort-package-json': 'standard'
}
};