Skip to content

Commit b4038c0

Browse files
authored
chore(bot): update eslint (#300)
- Update `eslint` to `~9.35.0` - Update `eslint-config-prettier` to `^10.1.8` - Update `eslint-plugin-prettier` to `^5.5.4` - Update `prettier` to `^3.6.2` - Replace deprecated `@typescript-eslint/eslint-plugin` and `@typescript-eslint/parser` with `typescript-eslint` package - Migrate ESLint configuration to `eslint.config.mjs` using the new flat config format
1 parent 7d3d71b commit b4038c0

File tree

10 files changed

+673
-441
lines changed

10 files changed

+673
-441
lines changed

.eslintignore

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

.eslintrc

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

docs/babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')]
33
};

eslint.config.mjs

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import { defineConfig, globalIgnores } from 'eslint/config';
2+
import eslint from '@eslint/js';
3+
import prettierConfig from 'eslint-config-prettier';
4+
import prettierPlugin from 'eslint-plugin-prettier';
5+
import tseslint from 'typescript-eslint';
6+
7+
export default defineConfig([
8+
eslint.configs.recommended,
9+
tseslint.configs.recommended,
10+
{
11+
...prettierConfig,
12+
name: 'prettier-config',
13+
plugins: { prettier: prettierPlugin },
14+
rules: {
15+
'prettier/prettier': 'error'
16+
}
17+
},
18+
{
19+
files: ['**/*.js'],
20+
languageOptions: {
21+
parserOptions: {
22+
sourceType: 'commonjs'
23+
}
24+
}
25+
},
26+
{
27+
files: ['**/*.ts', '**/*.tsx'],
28+
languageOptions: {
29+
parser: tseslint.parser,
30+
parserOptions: {
31+
project: './tsconfig.json',
32+
sourceType: 'module',
33+
tsconfigRootDir: import.meta.dirname
34+
}
35+
},
36+
name: 'wise-old-man/client-js',
37+
rules: {
38+
'@typescript-eslint/no-unused-vars': [
39+
'error',
40+
{
41+
argsIgnorePattern: '^_',
42+
caughtErrorsIgnorePattern: '^_'
43+
}
44+
],
45+
'@typescript-eslint/explicit-module-boundary-types': 'off',
46+
'@typescript-eslint/no-non-null-assertion': 'off'
47+
}
48+
},
49+
globalIgnores(['dist', 'docs', 'node_modules'])
50+
]);

0 commit comments

Comments
 (0)