Skip to content

Commit 7a502f3

Browse files
chore: migrate eslint v9
1 parent 31727d5 commit 7a502f3

13 files changed

+1562
-1026
lines changed

.eslintignore

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

.eslintrc.json

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

eslint.config.mjs

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import {FlatCompat} from '@eslint/eslintrc';
2+
import js from '@eslint/js';
3+
import love from 'eslint-config-love';
4+
import globals from 'globals';
5+
import path from 'node:path';
6+
import {fileURLToPath} from 'node:url';
7+
8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = path.dirname(__filename);
10+
const compat = new FlatCompat({
11+
baseDirectory: __dirname,
12+
recommendedConfig: js.configs.recommended,
13+
allConfig: js.configs.all
14+
});
15+
16+
export default [
17+
{
18+
ignores: ['**/dist', '**/templates']
19+
},
20+
{
21+
...love,
22+
files: ['**/*.js', '**/*.ts']
23+
},
24+
...compat.extends('plugin:prettier/recommended'),
25+
{
26+
languageOptions: {
27+
globals: {
28+
...globals.node
29+
},
30+
31+
ecmaVersion: 'latest',
32+
sourceType: 'module',
33+
34+
parserOptions: {
35+
project: ['./tsconfig.json'],
36+
warnOnUnsupportedTypeScriptVersion: false
37+
}
38+
},
39+
40+
rules: {
41+
'@typescript-eslint/explicit-function-return-type': 'off',
42+
'@typescript-eslint/ban-ts-comment': 'off',
43+
'@typescript-eslint/no-misused-promises': 'off',
44+
'@typescript-eslint/naming-convention': 'off',
45+
'@typescript-eslint/prefer-nullish-coalescing': 'off',
46+
'@typescript-eslint/no-non-null-assertion': 'off',
47+
'@typescript-eslint/no-magic-numbers': 'off',
48+
'@typescript-eslint/no-redundant-type-constituents': 'off',
49+
'@typescript-eslint/no-unsafe-assignment': 'off',
50+
'eslint-comments/require-description': 'off',
51+
complexity: 'off',
52+
'@typescript-eslint/no-unused-vars': [
53+
'warn',
54+
{
55+
argsIgnorePattern: '^_',
56+
varsIgnorePattern: '^_',
57+
caughtErrorsIgnorePattern: '^_'
58+
}
59+
]
60+
}
61+
}
62+
];

0 commit comments

Comments
 (0)