-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
57 lines (56 loc) · 1.84 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
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/stylistic',
'plugin:playwright/recommended'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
root: true,
parserOptions: {
ecmaVersion: 'latest',
parser: '@typescript-eslint/parser'
},
rules: {
// 'prettier/prettier': ['warn'],
// 'import/no-extraneous-dependencies': ['error', { devDependencies: false }],
// 'import/no-cycle': ['error'],
// ...typescriptConfigs.recommended.rules,
// ...playwright.configs['flat/recommended'].rules
'no-void': ['error', { allowAsStatement: true }],
'no-console': ['warn'],
'max-classes-per-file': ['error', 1],
'class-methods-use-this': 'off',
'no-param-reassign': 'warn',
'no-underscore-dangle': 'error',
'@typescript-eslint/no-inferrable-types': ['off'],
'@typescript-eslint/typedef': [
'warn',
{
arrayDestructuring: true,
arrowParameter: true,
memberVariableDeclaration: true,
objectDestructuring: true,
parameter: true,
propertyDeclaration: true,
variableDeclaration: true,
variableDeclarationIgnoreFunction: true
}
],
// '@typescript-eslint/unbound-method': 'error',
// '@typescript-eslint/explicit-member-accessibility': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '_.+' }],
// "@typescript-eslint/no-unnecessary-condition": "error",
'@typescript-eslint/no-empty-interface': [
'error',
{
allowSingleExtends: true
}
],
// currently disabled rules - TODO: fix them
'playwright/no-conditional-in-test': 'off'
}
}