forked from leather-io/extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
73 lines (73 loc) · 2.2 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
module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:react/recommended',
'prettier/@typescript-eslint',
'plugin:jest/recommended',
'plugin:prettier/recommended'
// 'plugin:jsx-a11y/recommended'
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: '2018',
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
plugins: ['@typescript-eslint', 'react', 'jest'],
env: {
browser: true,
node: true,
es6: true,
'jest/globals': true,
},
globals: {
page: true,
browser: true,
context: true,
jestPuppeteer: true,
},
rules: {
quotes: [2, 'single', { avoidEscape: true }],
'eol-last': 2,
'no-mixed-requires': 0,
'no-var': 2,
'no-param-reassign': 'error',
'brace-style': 2,
'no-empty': 'off',
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'semi',
requireLast: true,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
},
],
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/no-misused-promises': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/require-await': 'error',
'@typescript-eslint/promise-function-async': 'error',
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-object-literal-type-assertion': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/class-name-casing': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/interface-name-prefix': [2],
'react/jsx-uses-vars': [2],
'react/jsx-key': [0],
'react/prop-types': [0],
},
};