44 lines
880 B
JavaScript
44 lines
880 B
JavaScript
import js from "@eslint/js";
|
|
import globals from "globals";
|
|
|
|
export default [
|
|
{
|
|
files: ["src/index.js"],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: "module",
|
|
globals: {
|
|
...globals.browser
|
|
}
|
|
},
|
|
rules: {
|
|
"no-unused-vars": "warn",
|
|
"no-empty": "warn",
|
|
"no-useless-escape": "warn"
|
|
}
|
|
},
|
|
{
|
|
files: ["tests/*.js"],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: "commonjs",
|
|
globals: {
|
|
...globals.node,
|
|
...globals.browser,
|
|
require: "readonly",
|
|
module: "readonly",
|
|
process: "readonly",
|
|
console: "readonly",
|
|
setTimeout: "readonly",
|
|
clearTimeout: "readonly"
|
|
}
|
|
},
|
|
rules: {
|
|
"no-unused-vars": "warn",
|
|
"no-empty": "warn",
|
|
"no-useless-escape": "warn"
|
|
}
|
|
},
|
|
js.configs.recommended
|
|
];
|