-
Notifications
You must be signed in to change notification settings - Fork 23
/
.eslintrc.js
95 lines (94 loc) · 2.42 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
module.exports = {
env: {
browser: true,
es6: true,
},
extends: [
'plugin:react/recommended',
'airbnb',
'plugin:@typescript-eslint/recommended',
'plugin:jsx-a11y/recommended',
// 'plugin:prettier/recommended',
'prettier',
'prettier/prettier',
'prettier/react',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint'],
rules: {
'prettier/prettier': 0,
'no-console': 'error',
'import/prefer-default-export': 'off',
'no-underscore-dangle': 'off',
'jsx-a11y/no-onchange': 'off',
'no-use-before-define': 'off',
'no-named-as-default': 'off',
'no-nested-ternary': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx', '.ts', '.tsx'] }],
'jsx-a11y/anchor-is-valid': [
'error',
{
components: ['Link'],
specialLink: ['hrefLeft', 'hrefRight'],
aspects: ['invalidHref', 'preferButton'],
},
],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
// 'import/no-extraneous-dependencies': ['error', { ignore: 'styled-components/' }],
'object-curly-newline': 0,
'react/require-default-props': 'off',
'react/jsx-wrap-multilines': 'off',
'react/jsx-one-expression-per-line': 0,
'react/no-array-index-key': 1,
'react/jsx-props-no-spreading': 1,
'consistent-return': 0,
'no-restricted-globals': 0,
camelcase: [
'error',
{
allow: [
'main_text',
'secondary_text',
'main_text_matched_substrings',
'structured_formatting',
'return_scopes',
'safari_web_id',
],
},
],
'@typescript-eslint/explicit-module-boundary-types': ['off'],
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
};