Skip to content

Commit b4c9879

Browse files
committed
chore: Use latest eslint config
1 parent 837a227 commit b4c9879

File tree

3 files changed

+47
-16
lines changed

3 files changed

+47
-16
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc.cjs

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

eslint.config.cjs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
const { defineConfig } = require('eslint/config');
2+
3+
const globals = require('globals');
4+
const tsParser = require('@typescript-eslint/parser');
5+
const typescriptEslint = require('@typescript-eslint/eslint-plugin');
6+
const js = require('@eslint/js');
7+
8+
const { FlatCompat } = require('@eslint/eslintrc');
9+
10+
const compat = new FlatCompat({
11+
baseDirectory: __dirname,
12+
recommendedConfig: js.configs.recommended,
13+
allConfig: js.configs.all,
14+
});
15+
16+
module.exports = defineConfig([
17+
// DO NOT PUT OTHER PROPS IN THIS OBJECT
18+
{ ignores: ['**/node_modules/**', 'dist/', 'coverage/', 'eslint.config.cjs'] },
19+
{
20+
languageOptions: {
21+
globals: {
22+
...globals.node,
23+
...globals.commonjs,
24+
},
25+
26+
parser: tsParser,
27+
},
28+
29+
extends: compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended'),
30+
31+
plugins: {
32+
'@typescript-eslint': typescriptEslint,
33+
},
34+
35+
rules: {
36+
quotes: [
37+
2,
38+
'single',
39+
{
40+
avoidEscape: true,
41+
},
42+
],
43+
44+
'comma-dangle': ['error', 'only-multiline'],
45+
},
46+
},
47+
]);

0 commit comments

Comments
 (0)