-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
104 lines (104 loc) · 2.32 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ['airbnb-base', 'plugin:eslint-comments/recommended', 'plugin:import/recommended', 'prettier'],
ignorePatterns: ['jest.setup.ts'],
overrides: [
{
files: '**/*.{ts}',
rules: {
'no-undef': 'off',
'import/no-extraneous-dependencies': 'off',
},
},
{
files: '**/*{.,_}{test,spec,stories}.{js,ts}',
rules: {
'import/no-extraneous-dependencies': 'off',
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
plugins: [
'eslint-comments',
'sort-destructure-keys',
'sort-keys-fix',
'@typescript-eslint',
'unused-imports',
'import',
],
rules: {
'@typescript-eslint/no-redeclare': ['error'],
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-use-before-define': ['off'],
camelcase: 'off',
'import/extensions': 'off',
'import/order': [
'error',
{
alphabetize: {
caseInsensitive: true,
order: 'asc',
},
groups: ['builtin', 'external', 'internal', 'sibling', 'parent'],
'newlines-between': 'always',
},
],
'import/prefer-default-export': 'off',
'max-len': [
'error',
{
code: 120,
ignoreComments: false,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
tabWidth: 2,
},
],
'no-nested-ternary': 'off',
'no-param-reassign': [
'error',
{
// for redux, setting the state
ignorePropertyModificationsFor: ['state'],
props: true,
},
],
'no-redeclare': 'off',
'no-shadow': 'off',
'no-underscore-dangle': 'off',
'no-unused-vars': 'off',
'no-use-before-define': 'off',
'sort-destructure-keys/sort-destructure-keys': [
2,
{
caseSensitive: false,
},
],
'sort-keys-fix/sort-keys-fix': 'off',
'unused-imports/no-unused-imports': 'error',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.ts'],
},
},
},
};