-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Migrate .eslintrc.js to flat format eslint.config.mjs
- Loading branch information
Showing
2 changed files
with
27 additions
and
23 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { FlatCompat } from '@eslint/eslintrc' | ||
const compat = new FlatCompat() | ||
|
||
import eslintPluginLocal from './eslint-plugin-local/index.mjs' | ||
|
||
export default [ | ||
// standard, | ||
...compat.extends('eslint-config-standard'), | ||
{ | ||
files: ['**/**.js', '**/**.mjs'], | ||
languageOptions: { | ||
sourceType: 'module', | ||
ecmaVersion: 'latest', | ||
}, | ||
plugins: { 'local': eslintPluginLocal }, | ||
rules: { | ||
/* | ||
This is inserted to make this compatible with prettier. | ||
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. | ||
*/ | ||
'space-before-function-paren': 0, | ||
curly: [2, 'all'], | ||
'local/no-big-int': 'error', | ||
}, | ||
}, | ||
] | ||
|