generated from serenity-js/serenity-js-playwright-ct-react-template
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
85 lines (73 loc) · 2.46 KB
/
.eslintrc.cjs
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
module.exports = {
root: true,
ignorePatterns: [ '**/lib/**' ],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
project: [
'tsconfig.eslint.json',
],
},
plugins: [
'@typescript-eslint',
'import',
'simple-import-sort',
'unused-imports'
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:unicorn/recommended',
],
rules: {
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'sort-imports': 'off',
'import/order': 'off',
'unused-imports/no-unused-imports': 'error',
'no-multiple-empty-lines': ['warn', {
'max': 1,
}],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'indent': 'off',
'@typescript-eslint/indent': ['error', 4, {
'MemberExpression': 'off',
'SwitchCase': 1,
}],
'quotes': 'off',
'@typescript-eslint/quotes': ['error', 'single', {
'allowTemplateLiterals': true,
'avoidEscape': true,
}],
'@typescript-eslint/no-explicit-any': 'off', // todo: review
'@typescript-eslint/no-unused-vars': ['warn', {
'args': 'none',
'vars': 'all',
'varsIgnorePattern': '^.*_$',
}],
'unicorn/empty-brace-spaces': 'off',
'unicorn/filename-case': [ 'error', {
'cases': {
'kebabCase': true, // packages
'pascalCase': true, // classes
'camelCase': true, // functions
}
}],
'unicorn/no-array-for-each': 'off',
'unicorn/no-array-reduce': 'off',
'unicorn/no-array-callback-reference': 'off',
'unicorn/no-static-only-class': 'off',
'unicorn/numeric-separators-style': 'off',
'unicorn/prefer-module': 'off', // fixme disable when we can provide support for ESM
'unicorn/prefer-node-protocol': 'off', // fixme requires Node 14.13 or newer, disable until we no longer have to support Node 12
'unicorn/prefer-spread': 'off',
'unicorn/prevent-abbreviations': [ 'error', {
'allowList': {
'conf': true,
'wdio': true,
}
}]
}
};