UNPKG

3.41 kBJavaScriptView Raw
1module.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/explicit-module-boundary-types': 'off',
111 '@typescript-eslint/no-unused-vars': [
112 'warn',
113 {
114 'args': 'after-used',
115 'argsIgnorePattern': '^_',
116 'varsIgnorePattern': '^_',
117 'ignoreRestSiblings': true,
118 },
119 ],
120 'import/no-unresolved': 'error',
121 'import/export': 'off',
122 'import/order': 'off',
123 'import/named': 'off',
124 'chai-friendly/no-unused-expressions': 'off',
125 'mocha/no-exclusive-tests': 'error',
126 'mocha/no-mocha-arrows': 'off',
127 'mocha/handle-done-callback': 'off',
128 'mocha/no-setup-in-describe': 'off',
129 'react/jsx-uses-react': 'error',
130 'react/jsx-uses-vars': 'error',
131 'react/react-in-jsx-scope': 'off',
132 'react/prop-types': 'off',
133 'react/display-name': 'off',
134 },
135};