Skip to content

Commit 43f82ee

Browse files
internal: adopt new internal eslint package
1 parent 8ce7a6e commit 43f82ee

15 files changed

+982
-1025
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ root = true
77
[*]
88

99
indent_style = space
10-
indent_size = 2
10+
indent_size = 4
1111

1212
end_of_line = lf
1313
charset = utf-8
1414
trim_trailing_whitespace = true
15-
insert_final_newline = true
15+
insert_final_newline = true

eslint.config.mjs

Lines changed: 15 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,17 @@
1-
import typescriptEslint from '@typescript-eslint/eslint-plugin'
2-
import unicorn from 'eslint-plugin-unicorn'
3-
import globals from 'globals'
4-
import tsParser from '@typescript-eslint/parser'
1+
import wdioEslint from '@wdio/eslint'
52

6-
export default [{
7-
plugins: {
8-
'@typescript-eslint': typescriptEslint,
9-
unicorn,
10-
},
11-
ignores: ['node_modules/**', 'dist/**', 'build/**'],
12-
13-
languageOptions: {
14-
globals: {
15-
...globals.node,
3+
export default wdioEslint.config([
4+
{
5+
ignores: ['dist']
166
},
17-
18-
parser: tsParser,
19-
ecmaVersion: 2020,
20-
sourceType: 'module',
21-
},
22-
23-
rules: {
24-
quotes: ['error', 'single', {
25-
avoidEscape: true,
26-
}],
27-
28-
camelcase: ['error', {
29-
properties: 'never',
30-
}],
31-
32-
semi: ['error', 'never'],
33-
indent: [2, 2],
34-
eqeqeq: ['error', 'always'],
35-
'prefer-const': 'error',
36-
37-
'no-multiple-empty-lines': [2, {
38-
max: 1,
39-
maxEOF: 1,
40-
}],
41-
42-
'array-bracket-spacing': ['error', 'never'],
43-
44-
'brace-style': ['error', '1tbs', {
45-
allowSingleLine: true,
46-
}],
47-
48-
'comma-spacing': ['error', {
49-
before: false,
50-
after: true,
51-
}],
52-
53-
'no-lonely-if': 'error',
54-
'dot-notation': 'error',
55-
'no-else-return': 'error',
56-
'no-tabs': 'error',
57-
58-
'no-trailing-spaces': ['error', {
59-
skipBlankLines: false,
60-
ignoreComments: false,
61-
}],
62-
63-
'no-var': 'error',
64-
'unicode-bom': ['error', 'never'],
65-
curly: ['error', 'all'],
66-
'object-curly-spacing': ['error', 'always'],
67-
'keyword-spacing': ['error'],
68-
'require-atomic-updates': 0,
69-
'linebreak-style': ['error', 'unix'],
70-
'@typescript-eslint/no-unused-vars': 'error',
71-
'@typescript-eslint/consistent-type-imports': 'error',
72-
'unicorn/prefer-node-protocol': ['error'],
73-
'no-restricted-syntax': ['error', 'IfStatement > ExpressionStatement > AssignmentExpression'],
74-
'unicorn/prefer-ternary': 'error',
75-
},
76-
}, {
77-
files: ['**/*.ts'],
78-
ignores: ['node_modules/**', 'dist/**', 'build/**'],
79-
rules: {
80-
'no-unused-vars': 'off',
81-
'no-undef': 'off',
82-
'no-redeclare': 'off',
83-
'dot-notation': 'off',
84-
},
85-
}]
7+
/**
8+
* custom test configuration
9+
*/
10+
{
11+
files: ['tests/**/*'],
12+
rules: {
13+
'@typescript-eslint/no-require-imports': 'off',
14+
'@typescript-eslint/no-explicit-any': 'off'
15+
}
16+
}
17+
])

0 commit comments

Comments
 (0)