Skip to content

Commit 18e4579

Browse files
authored
Upgrade to ESLint 9 (#5)
1 parent faaf5b4 commit 18e4579

4 files changed

Lines changed: 2044 additions & 2998 deletions

File tree

.eslintrc.json

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

eslint.config.mjs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import js from '@eslint/js';
2+
import eslintConfigPrettier from 'eslint-config-prettier';
3+
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
4+
import {defineConfig} from 'eslint/config';
5+
import globals from 'globals';
6+
7+
export default defineConfig([
8+
js.configs.recommended,
9+
eslintPluginUnicorn.configs.recommended,
10+
eslintConfigPrettier,
11+
{
12+
languageOptions: {
13+
globals: {...globals.node},
14+
15+
ecmaVersion: 2025,
16+
sourceType: 'module',
17+
},
18+
19+
rules: {
20+
// Disable rules
21+
'no-console': 'off',
22+
'no-plusplus': 'off',
23+
'no-await-in-loop': 'off',
24+
'no-restricted-syntax': 'off',
25+
26+
// Enable rules
27+
'no-param-reassign': 'error',
28+
'consistent-return': 'error',
29+
'no-else-return': 'error',
30+
'no-var': 'error',
31+
'prefer-const': 'error',
32+
},
33+
},
34+
]);

0 commit comments

Comments
 (0)