Skip to content

Commit 6415182

Browse files
build(deps-dev): bump eslint from 8.57.1 to 9.39.1 [skip ci] (#423)
* build(deps-dev): bump eslint from 8.57.1 to 9.39.1 Bumps [eslint](https://github.com/eslint/eslint) from 8.57.1 to 9.39.1. - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](eslint/eslint@v8.57.1...v9.39.1) --- updated-dependencies: - dependency-name: eslint dependency-version: 9.39.1 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * refactor: migrate ESLint configuration to eslint.config.mjs and remove legacy files * refactor: update ESLint configuration to use typescript-eslint and improve TypeScript support * refactor: remove unused import plugin from ESLint configuration --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Misha Kav <misha.kav@gmail.com>
1 parent 2e27ed2 commit 6415182

File tree

8 files changed

+744
-672
lines changed

8 files changed

+744
-672
lines changed

.eslintignore

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

.github/linters/.eslintrc.yml

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

eslint.config.mjs

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
import eslint from '@eslint/js'
2+
import tseslint from 'typescript-eslint'
3+
import jestPlugin from 'eslint-plugin-jest'
4+
import githubPlugin from 'eslint-plugin-github'
5+
import prettierPlugin from 'eslint-plugin-prettier'
6+
import globals from 'globals'
7+
8+
export default [
9+
// Global ignores
10+
{
11+
ignores: ['**/node_modules/**', '**/dist/**', '**/coverage/**', '**/*.json']
12+
},
13+
14+
// Base ESLint recommended config for all files
15+
eslint.configs.recommended,
16+
17+
// TypeScript files configuration
18+
{
19+
files: ['**/*.ts'],
20+
languageOptions: {
21+
parser: tseslint.parser,
22+
parserOptions: {
23+
ecmaVersion: 2023,
24+
sourceType: 'module',
25+
project: ['./.github/linters/tsconfig.json', './tsconfig.json'],
26+
tsconfigRootDir: import.meta.dirname
27+
},
28+
globals: {
29+
...globals.node,
30+
...globals.es2021,
31+
...globals.jest
32+
}
33+
},
34+
plugins: {
35+
'@typescript-eslint': tseslint.plugin,
36+
jest: jestPlugin,
37+
github: githubPlugin,
38+
prettier: prettierPlugin
39+
},
40+
rules: {
41+
// TypeScript recommended rules
42+
...tseslint.configs.recommended[0].rules,
43+
...tseslint.configs.stylistic[0].rules,
44+
45+
// Jest recommended rules
46+
...jestPlugin.configs.recommended.rules,
47+
48+
// Prettier integration
49+
'prettier/prettier': 'error',
50+
51+
// Custom overrides
52+
camelcase: 'off',
53+
'no-console': 'off',
54+
'no-unused-vars': 'off',
55+
semi: ['error', 'never'],
56+
57+
// TypeScript-specific custom rules
58+
'@typescript-eslint/array-type': 'error',
59+
'@typescript-eslint/await-thenable': 'error',
60+
'@typescript-eslint/ban-ts-comment': 'error',
61+
'@typescript-eslint/consistent-type-assertions': 'error',
62+
'@typescript-eslint/explicit-member-accessibility': [
63+
'error',
64+
{ accessibility: 'no-public' }
65+
],
66+
'@typescript-eslint/explicit-function-return-type': [
67+
'error',
68+
{ allowExpressions: true }
69+
],
70+
'func-call-spacing': ['error', 'never'],
71+
'@typescript-eslint/no-array-constructor': 'error',
72+
'@typescript-eslint/no-empty-interface': 'error',
73+
'@typescript-eslint/no-explicit-any': 'error',
74+
'@typescript-eslint/no-extraneous-class': 'error',
75+
'@typescript-eslint/no-for-in-array': 'error',
76+
'@typescript-eslint/no-inferrable-types': 'error',
77+
'@typescript-eslint/no-misused-new': 'error',
78+
'@typescript-eslint/no-namespace': 'error',
79+
'@typescript-eslint/no-non-null-assertion': 'warn',
80+
'@typescript-eslint/no-require-imports': 'error',
81+
'@typescript-eslint/no-unnecessary-qualifier': 'error',
82+
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
83+
'@typescript-eslint/no-unused-vars': 'error',
84+
'@typescript-eslint/no-useless-constructor': 'error',
85+
'@typescript-eslint/no-var-requires': 'error',
86+
'@typescript-eslint/prefer-for-of': 'warn',
87+
'@typescript-eslint/prefer-function-type': 'warn',
88+
'@typescript-eslint/prefer-includes': 'error',
89+
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
90+
'@typescript-eslint/promise-function-async': 'error',
91+
'@typescript-eslint/require-array-sort-compare': 'error',
92+
'@typescript-eslint/restrict-plus-operands': 'error',
93+
'@typescript-eslint/space-before-function-paren': 'off',
94+
'@typescript-eslint/unbound-method': 'error'
95+
}
96+
},
97+
98+
// JavaScript files configuration
99+
{
100+
files: ['**/*.js', '**/*.mjs'],
101+
languageOptions: {
102+
ecmaVersion: 2023,
103+
sourceType: 'module',
104+
globals: {
105+
...globals.node,
106+
...globals.es2021
107+
}
108+
},
109+
plugins: {
110+
prettier: prettierPlugin
111+
},
112+
rules: {
113+
'no-console': 'off',
114+
'prettier/prettier': 'error',
115+
semi: ['error', 'never']
116+
}
117+
}
118+
]

0 commit comments

Comments
 (0)