Skip to content

Commit acf86e7

Browse files
committed
chore(deps): upgraded eslint
1 parent dcd12fb commit acf86e7

File tree

6 files changed

+247
-159
lines changed

6 files changed

+247
-159
lines changed

.eslintrc.js

Lines changed: 0 additions & 85 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
node-version: '24.11.1'
2121
- name: Setup Node Modules
2222
uses: bahmutov/npm-install@v1
23+
- name: Run ESLint
24+
run: npm run lint
2325
- name: Run Playwright tests
2426
run: npm test
2527
- uses: actions/upload-artifact@v5

eslint.config.js

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
import eslint from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
import stylistic from '@stylistic/eslint-plugin';
4+
import importPlugin from 'eslint-plugin-import';
5+
import simpleImportSort from 'eslint-plugin-simple-import-sort';
6+
import unusedImports from 'eslint-plugin-unused-imports';
7+
import unicorn from 'eslint-plugin-unicorn';
8+
9+
export default tseslint.config(
10+
// Ignore patterns
11+
{
12+
ignores: ['**/lib/**', 'node_modules/**', 'dist/**', 'target/**', 'test-results/**', 'playwright/.cache', 'playwright-report/**']
13+
},
14+
15+
// Base ESLint recommended config
16+
eslint.configs.recommended,
17+
18+
// TypeScript ESLint recommended configs
19+
...tseslint.configs.recommended,
20+
21+
// Unicorn recommended config
22+
unicorn.configs['flat/recommended'],
23+
24+
// Main configuration
25+
{
26+
files: ['**/*.ts', '**/*.tsx'],
27+
languageOptions: {
28+
parser: tseslint.parser,
29+
parserOptions: {
30+
ecmaVersion: 6,
31+
sourceType: 'module',
32+
project: [
33+
'./tsconfig.eslint.json',
34+
],
35+
},
36+
},
37+
plugins: {
38+
'@typescript-eslint': tseslint.plugin,
39+
'@stylistic': stylistic,
40+
'import': importPlugin,
41+
'simple-import-sort': simpleImportSort,
42+
'unused-imports': unusedImports,
43+
},
44+
rules: {
45+
'simple-import-sort/imports': 'error',
46+
'simple-import-sort/exports': 'error',
47+
'sort-imports': 'off',
48+
'import/order': 'off',
49+
'unused-imports/no-unused-imports': 'error',
50+
51+
'no-multiple-empty-lines': ['warn', {
52+
'max': 1,
53+
}],
54+
55+
'@typescript-eslint/explicit-module-boundary-types': 'off',
56+
57+
// Formatting rules using @stylistic plugin
58+
'@stylistic/indent': ['error', 4, {
59+
'MemberExpression': 'off',
60+
'SwitchCase': 1,
61+
}],
62+
63+
'@stylistic/quotes': ['error', 'single', {
64+
'allowTemplateLiterals': 'always',
65+
'avoidEscape': true,
66+
}],
67+
68+
'@typescript-eslint/no-explicit-any': 'off', // todo: review
69+
70+
'@typescript-eslint/no-unused-vars': ['warn', {
71+
'args': 'none',
72+
'vars': 'all',
73+
'varsIgnorePattern': '^.*_$',
74+
}],
75+
76+
'unicorn/empty-brace-spaces': 'off',
77+
78+
'unicorn/filename-case': [ 'error', {
79+
'cases': {
80+
'kebabCase': true, // packages
81+
'pascalCase': true, // classes
82+
'camelCase': true, // functions
83+
'snakeCase': true, // test scenarios
84+
},
85+
"ignore": ["multi-actor"],
86+
}],
87+
88+
'unicorn/no-array-for-each': 'off',
89+
'unicorn/no-array-reduce': 'off',
90+
'unicorn/no-array-callback-reference': 'off',
91+
'unicorn/no-static-only-class': 'off',
92+
93+
'unicorn/numeric-separators-style': 'off',
94+
95+
'unicorn/prefer-module': 'off', // fixme disable when we can provide support for ESM
96+
'unicorn/prefer-node-protocol': 'off', // fixme requires Node 14.13 or newer, disable until we no longer have to support Node 12
97+
'unicorn/prefer-spread': 'off',
98+
99+
'unicorn/prevent-abbreviations': [ 'error', {
100+
'allowList': {
101+
'conf': true,
102+
'wdio': true,
103+
}
104+
}]
105+
}
106+
}
107+
);
108+

0 commit comments

Comments
 (0)