40 lines
835 B
JavaScript
40 lines
835 B
JavaScript
|
import js from "@eslint/js";
|
||
|
import globals from "globals";
|
||
|
|
||
|
export default [
|
||
|
{
|
||
|
files: ["**/*.{js,mjs,cjs}"],
|
||
|
languageOptions: {
|
||
|
ecmaVersion: 2022,
|
||
|
sourceType: "module",
|
||
|
globals: {
|
||
|
...globals.node,
|
||
|
...globals.es2022,
|
||
|
},
|
||
|
},
|
||
|
rules: {
|
||
|
...js.configs.recommended.rules,
|
||
|
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
|
||
|
"no-console": "off",
|
||
|
"prefer-const": "error",
|
||
|
"no-var": "error",
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
files: ["tests/**/*.js"],
|
||
|
languageOptions: {
|
||
|
globals: {
|
||
|
...globals.node,
|
||
|
...globals.es2022,
|
||
|
describe: "readonly",
|
||
|
it: "readonly",
|
||
|
test: "readonly",
|
||
|
expect: "readonly",
|
||
|
beforeEach: "readonly",
|
||
|
afterEach: "readonly",
|
||
|
vi: "readonly",
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
];
|