-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
72 lines (69 loc) · 1.59 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
68
69
70
71
72
const OFF = 0,
WARN = 1,
ERROR = 2;
module.exports = {
env: {
browser: false,
es6: true,
},
extends: [
'prettier',
'plugin:jsx-a11y/recommended',
'plugin:cypress/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
modules: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: [
'@typescript-eslint',
'simple-import-sort',
'prettier',
'import',
'jest-dom',
'jsx-a11y',
],
settings: {
'import/resolver': {
typescript: {},
},
},
rules: {
'prettier/prettier': ERROR,
// ESLint rules
'no-useless-computed-key': ERROR,
'no-underscore-dangle': OFF,
'arrow-parens': [ERROR, 'as-needed'],
'no-nested-ternary': OFF,
'import/prefer-default-export': OFF,
'eol-last': [ERROR, 'always'],
'import/extensions': [ERROR, { json: 'always' }],
'import/no-unresolved': ERROR,
'no-console': ['warn', { allow: ['error', 'info'] }],
// Sorting rules
'simple-import-sort/imports': ERROR,
'sort-imports': OFF,
'import/order': OFF,
'import/first': ERROR,
'import/newline-after-import': ERROR,
'import/no-duplicates': ERROR,
// TypeScript rules
'no-unused-vars': OFF,
'@typescript-eslint/no-unused-vars': [
WARN,
{ varsIgnorePattern: '^_', argsIgnorePattern: '^_' },
],
'@typescript-eslint/explicit-function-return-type': OFF,
'@typescript-eslint/no-explicit-any': OFF,
'no-redeclare': OFF,
},
};