Skip to content

Commit 9288c04

Browse files
committed
chore: modernize ESLint config to ES modules
- Convert eslint.config.js to eslint.config.mjs using ES module syntax - Replace require() with import statements - Replace module.exports with export default - Change @typescript-eslint/no-explicit-any from 'warn' to 'error' for stricter type safety - Maintain all existing rules and configurations
1 parent 2d9a652 commit 9288c04

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

eslint.config.js renamed to eslint.config.mjs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
/* eslint-env node */
2-
const js = require('@eslint/js')
1+
import js from '@eslint/js'
2+
import tsPlugin from '@typescript-eslint/eslint-plugin'
3+
import tsParser from '@typescript-eslint/parser'
34

4-
module.exports = [
5+
export default [
56
{
6-
ignores: ['coverage/**', 'lib/**', 'node_modules/**', 'eslint.config.js', 'scripts/**']
7+
ignores: ['coverage/**', 'lib/**', 'node_modules/**', 'scripts/**']
78
},
89
js.configs.recommended,
910
{
1011
files: ['src/**/*.ts'],
1112
languageOptions: {
1213
ecmaVersion: 2022,
1314
sourceType: 'module',
14-
parser: require('@typescript-eslint/parser'),
15+
parser: tsParser,
1516
parserOptions: {
1617
project: './tsconfig.json'
1718
},
@@ -22,11 +23,11 @@ module.exports = [
2223
}
2324
},
2425
plugins: {
25-
'@typescript-eslint': require('@typescript-eslint/eslint-plugin')
26+
'@typescript-eslint': tsPlugin
2627
},
2728
rules: {
2829
semi: ['error', 'always'],
29-
'@typescript-eslint/no-explicit-any': 'warn',
30+
'@typescript-eslint/no-explicit-any': 'error',
3031
'no-unused-vars': 'off',
3132
'@typescript-eslint/no-unused-vars': [
3233
'error',

0 commit comments

Comments
 (0)