39 lines
1.2 KiB
JavaScript
39 lines
1.2 KiB
JavaScript
export default [
|
|
{
|
|
files: ["**/*.js"],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: "commonjs",
|
|
globals: {
|
|
// Node.js globals
|
|
console: "readonly",
|
|
process: "readonly",
|
|
Buffer: "readonly",
|
|
__dirname: "readonly",
|
|
__filename: "readonly",
|
|
module: "readonly",
|
|
require: "readonly",
|
|
exports: "readonly",
|
|
global: "readonly",
|
|
setTimeout: "readonly",
|
|
clearTimeout: "readonly",
|
|
setInterval: "readonly",
|
|
clearInterval: "readonly",
|
|
URLSearchParams: "readonly",
|
|
// Browser globals (for public/ files)
|
|
window: "readonly",
|
|
document: "readonly",
|
|
fetch: "readonly",
|
|
event: "readonly"
|
|
}
|
|
},
|
|
rules: {
|
|
"indent": ["error", 4],
|
|
"quotes": ["error", "single"],
|
|
"semi": ["error", "always"],
|
|
"no-unused-vars": "warn",
|
|
"no-console": "off",
|
|
"no-undef": "error"
|
|
}
|
|
}
|
|
]; |