Skip to content

Commit 8cc55b6

Browse files
committed
chore: 🔧 migrate eslint configuration to new version
1 parent 51583bf commit 8cc55b6

File tree

2 files changed

+31
-14
lines changed

2 files changed

+31
-14
lines changed

.eslintrc.json

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

eslint.config.mjs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import globals from 'globals';
2+
import path from 'node:path';
3+
import { fileURLToPath } from 'node:url';
4+
import js from '@eslint/js';
5+
import { FlatCompat } from '@eslint/eslintrc';
6+
7+
const __filename = fileURLToPath(import.meta.url);
8+
const __dirname = path.dirname(__filename);
9+
const compat = new FlatCompat({
10+
baseDirectory: __dirname,
11+
recommendedConfig: js.configs.recommended,
12+
allConfig: js.configs.all,
13+
});
14+
15+
export default [
16+
...compat.extends('eslint:recommended', 'plugin:prettier/recommended'),
17+
{
18+
languageOptions: {
19+
globals: {
20+
...globals.node,
21+
},
22+
23+
ecmaVersion: 12,
24+
sourceType: 'module',
25+
},
26+
27+
rules: {
28+
'prettier/prettier': 'error',
29+
},
30+
},
31+
];

0 commit comments

Comments
 (0)