Skip to content

Commit 555bece

Browse files
committed
fix: Migrate .eslintrc.js to flat format eslint.config.mjs
1 parent 80b6aa0 commit 555bece

File tree

2 files changed

+27
-23
lines changed

2 files changed

+27
-23
lines changed

.eslintrc.js

-23
This file was deleted.

eslint.config.mjs

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { FlatCompat } from '@eslint/eslintrc'
2+
const compat = new FlatCompat()
3+
4+
import eslintPluginLocal from './eslint-plugin-local/index.mjs'
5+
6+
export default [
7+
// standard,
8+
...compat.extends('eslint-config-standard'),
9+
{
10+
files: ['**/**.js', '**/**.mjs'],
11+
languageOptions: {
12+
sourceType: 'module',
13+
ecmaVersion: 'latest',
14+
},
15+
plugins: { 'local': eslintPluginLocal },
16+
rules: {
17+
/*
18+
This is inserted to make this compatible with prettier.
19+
Once https://github.com/prettier/prettier/issues/3845 and https://github.com/prettier/prettier/issues/3847 are solved this might be not needed any more.
20+
*/
21+
'space-before-function-paren': 0,
22+
curly: [2, 'all'],
23+
'local/no-big-int': 'error',
24+
},
25+
},
26+
]
27+

0 commit comments

Comments
 (0)