New eslint config
This commit is contained in:
parent
2660d9ba40
commit
55127056e9
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": ["airbnb-base", "prettier", "plugin:node/recommended"],
|
|
||||||
"env": {
|
|
||||||
"node": true
|
|
||||||
},
|
|
||||||
"plugins": ["prettier"],
|
|
||||||
"rules": {
|
|
||||||
"prettier/prettier": "error",
|
|
||||||
"no-console": "off"
|
|
||||||
}
|
|
||||||
}
|
|
17
eslint.config.mjs
Normal file
17
eslint.config.mjs
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import js from '@eslint/js';
|
||||||
|
import globals from 'globals';
|
||||||
|
import { defineConfig, globalIgnores } from 'eslint/config';
|
||||||
|
|
||||||
|
export default defineConfig([
|
||||||
|
globalIgnores(['test/**/*', 'node_modules/**/*']),
|
||||||
|
{
|
||||||
|
files: ['**/*.{js,mjs,cjs}'],
|
||||||
|
plugins: { js },
|
||||||
|
extends: ['js/recommended'],
|
||||||
|
},
|
||||||
|
{ files: ['**/*.js'], languageOptions: { sourceType: 'commonjs' } },
|
||||||
|
{
|
||||||
|
files: ['**/*.{js,mjs,cjs}'],
|
||||||
|
languageOptions: { globals: globals.browser },
|
||||||
|
},
|
||||||
|
]);
|
Loading…
x
Reference in New Issue
Block a user