-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev: updates devDependencies, migratest to eslint.config.js
- Loading branch information
Showing
6 changed files
with
4,191 additions
and
3,947 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,51 @@ | ||
import js from '@eslint/js' | ||
import globals from 'globals' | ||
import prettier from 'eslint-config-prettier' | ||
import pluginImport from 'eslint-plugin-import' | ||
import pluginNode from 'eslint-plugin-n' | ||
|
||
const config = [ | ||
{ | ||
ignores: ['lib'], | ||
languageOptions: { | ||
globals: { | ||
...globals.node | ||
}, | ||
|
||
ecmaVersion: 2020, | ||
sourceType: 'module' | ||
}, | ||
|
||
rules: { | ||
...js.configs.recommended.rules, | ||
'no-console': 'error', | ||
'prefer-const': 'error', | ||
'no-var': 'error', | ||
'no-use-before-define': 'error', | ||
'no-await-in-loop': 'error', | ||
'n/exports-style': [0, 'error'], | ||
'import/first': 'error', | ||
'import/no-anonymous-default-export': 'error', | ||
'import/no-unassigned-import': 'error', | ||
'import/no-internal-modules': [ | ||
'error', | ||
{ | ||
allow: ['src/**'] | ||
} | ||
] | ||
}, | ||
plugins: { | ||
import: pluginImport, | ||
n: pluginNode, | ||
prettier: prettier | ||
} | ||
}, | ||
{ | ||
files: ['test/{**/,}*.js'], | ||
languageOptions: { | ||
globals: { ...globals.mocha } | ||
} | ||
} | ||
] | ||
|
||
export default config |
Oops, something went wrong.