-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.eslintrc.cjs
More file actions
92 lines (92 loc) · 1.88 KB
/
.eslintrc.cjs
File metadata and controls
92 lines (92 loc) · 1.88 KB
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
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/all',
'airbnb',
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
moduleDirectory: ['node_modules', 'src/'],
},
typescript: {
directory: 'tsconfig.json',
},
},
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
},
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
},
plugins: ['react', 'import', '@typescript-eslint'],
rules: {
quotes: ['error', 'single'],
'no-tabs': ['error', {allowIndentationTabs: true}],
'func-names': ['error', 'never'],
indent: ['error', 'tab'],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
semi: ['error', 'always'],
'react/jsx-filename-extension': [
1,
{
extensions: ['.js', '.jsx', 'tsx'],
},
],
'arrow-parens': ['error', 'as-needed'],
'react/jsx-indent': ['error', 'tab'],
'react/jsx-indent-props': ['error', 'tab'],
'operator-linebreak': ['error', 'after'],
'object-curly-spacing': ['error', 'never'],
'jsx-a11y/no-static-element-interactions': [
'error',
{
handlers: ['onClick'],
allowExpressionValues: true,
},
],
'@typescript-eslint/no-this-alias': [
'error',
{
allowDestructuring: false,
allowedNames: ['self'],
},
],
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variable',
format: ['PascalCase', 'camelCase', 'UPPER_CASE'],
},
],
'no-param-reassign': ['error', {props: false}],
'@typescript-eslint/ban-types': [
'error',
{
types: {
Function: false,
},
extendDefaults: true,
},
],
},
};