1 | module.exports = {
|
2 | 'parser': '@typescript-eslint/parser',
|
3 | 'parserOptions': {
|
4 | 'ecmaVersion': 2019,
|
5 | 'sourceType': 'module',
|
6 | 'ecmaFeatures': {
|
7 | 'jsx': true
|
8 | }
|
9 | },
|
10 | 'plugins': [
|
11 | '@typescript-eslint',
|
12 | 'import',
|
13 | 'chai-friendly',
|
14 | 'mocha',
|
15 | 'react',
|
16 | ],
|
17 | 'extends': [
|
18 | 'eslint:recommended',
|
19 | 'plugin:@typescript-eslint/eslint-recommended',
|
20 | 'plugin:@typescript-eslint/recommended',
|
21 | 'plugin:import/errors',
|
22 | 'plugin:import/warnings',
|
23 | 'plugin:import/typescript',
|
24 | 'plugin:mocha/recommended',
|
25 | 'plugin:react/recommended',
|
26 | ],
|
27 | 'settings': {
|
28 | 'react': {
|
29 | 'version': 'detect',
|
30 | },
|
31 | },
|
32 | 'env': {
|
33 | 'browser': true,
|
34 | 'node': true,
|
35 | 'es6': true,
|
36 | 'commonjs': true
|
37 | },
|
38 | 'rules': {
|
39 | 'quotes': [
|
40 | 'error',
|
41 | 'single',
|
42 | {
|
43 | 'avoidEscape': true
|
44 | }
|
45 | ],
|
46 | 'indent': [
|
47 | 'error',
|
48 | 2,
|
49 | {
|
50 | 'SwitchCase': 1
|
51 | }
|
52 | ],
|
53 | 'max-len': [
|
54 | 'warn',
|
55 | {
|
56 | 'code': 180
|
57 | }
|
58 | ],
|
59 | 'arrow-parens': [
|
60 | 'error',
|
61 | 'as-needed'
|
62 | ],
|
63 | 'sort-imports': 'off',
|
64 | 'no-unused-vars': 'off',
|
65 | 'no-shadow': 'off',
|
66 | 'no-unused-expressions': 'off',
|
67 | 'no-unused-labels': 'error',
|
68 | 'prefer-const': [
|
69 | 'error',
|
70 | {
|
71 | 'destructuring': 'all'
|
72 | }
|
73 | ],
|
74 | 'max-classes-per-file': 'error',
|
75 | 'no-inner-declarations': 'off',
|
76 | 'no-console': 'warn',
|
77 | 'no-alert': 'warn',
|
78 | '@typescript-eslint/member-ordering': [
|
79 | 'warn',
|
80 | {
|
81 | 'default': [
|
82 | 'constructor',
|
83 | 'private-static-field',
|
84 | 'protected-static-field',
|
85 | 'public-static-field',
|
86 | 'public-static-method',
|
87 | 'protected-static-method',
|
88 | 'private-static-method',
|
89 | 'private-instance-field',
|
90 | 'protected-instance-field',
|
91 | 'public-instance-field',
|
92 | 'public-instance-method',
|
93 | 'protected-instance-method',
|
94 | 'private-instance-method'
|
95 | ]
|
96 | }
|
97 | ],
|
98 | '@typescript-eslint/ban-types': 'off',
|
99 | '@typescript-eslint/no-empty-interface': 'off',
|
100 | '@typescript-eslint/no-shadow': ['warn'],
|
101 | '@typescript-eslint/interface-name-prefix': 'off',
|
102 | '@typescript-eslint/indent': [
|
103 | 'error',
|
104 | 2
|
105 | ],
|
106 | '@typescript-eslint/explicit-function-return-type': 'off',
|
107 | '@typescript-eslint/no-namespace': 'off',
|
108 | '@typescript-eslint/no-var-requires': 'off',
|
109 | '@typescript-eslint/unified-signatures': 'off',
|
110 | '@typescript-eslint/no-unused-vars': [
|
111 | 'warn',
|
112 | {
|
113 | 'args': 'after-used',
|
114 | 'argsIgnorePattern': '^_',
|
115 | 'varsIgnorePattern': '^_',
|
116 | 'ignoreRestSiblings': true,
|
117 | },
|
118 | ],
|
119 | 'import/no-unresolved': 'error',
|
120 | 'import/export': 'off',
|
121 | 'import/order': 'off',
|
122 | 'import/named': 'off',
|
123 | 'chai-friendly/no-unused-expressions': 'off',
|
124 | 'mocha/no-exclusive-tests': 'error',
|
125 | 'mocha/no-mocha-arrows': 'off',
|
126 | 'mocha/handle-done-callback': 'off',
|
127 | 'mocha/no-setup-in-describe': 'off',
|
128 | 'react/jsx-uses-react': 'error',
|
129 | 'react/jsx-uses-vars': 'error',
|
130 | 'react/react-in-jsx-scope': 'off',
|
131 | 'react/prop-types': 'off',
|
132 | 'react/display-name': 'off',
|
133 | },
|
134 | };
|