-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
88 lines (87 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
76
77
78
79
80
81
82
83
84
85
86
87
88
const path = require('path');
module.exports = {
parser: '@typescript-eslint/parser',
env: {
browser: true,
es6: true,
node: true,
},
extends: [
'eslint:recommended',
'prettier',
'prettier/react',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'import', 'prettier', 'react'],
rules: {
curly: ['error', 'all'],
quotes: ['error', 'single'],
'no-alert': 'error',
'no-console': 'error',
'no-redeclare': 'error',
'no-var': 'error',
'no-irregular-whitespace': 'off',
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
],
'newlines-between': 'always',
},
],
'import/default': 'off',
'import/no-named-as-default': 'off',
'no-template-curly-in-string': 'error',
'prefer-destructuring': 'error',
'prefer-const': 'error',
'prefer-arrow-callback': 'error',
'prettier/prettier': 'error',
'react/jsx-uses-react': 'error',
'react/jsx-uses-vars': 'error',
'react/jsx-no-target-blank': 'off',
'react/prefer-stateless-function': 'error',
'react/display-name': 'off',
semi: 'error',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/ban-ts-comment': 'warn',
},
settings: {
react: {
version: 'detect',
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
project: path.resolve('./tsconfig.json'),
},
},
'import/external-module-folders': ['node_modules', 'node_modules/@types'],
},
};