mindcraft/eslint.config.js

26 lines
887 B
JavaScript
Raw Normal View History

2024-11-03 03:52:00 +08:00
// eslint.config.js
import globals from "globals";
import pluginJs from "@eslint/js";
/** @type {import('eslint').Linter.Config[]} */
export default [
2024-11-03 04:01:11 +08:00
// First, import the recommended configuration
2024-11-03 03:52:00 +08:00
pluginJs.configs.recommended,
2024-11-03 04:01:11 +08:00
// Then override or customize specific rules
2024-11-03 03:52:00 +08:00
{
languageOptions: {
globals: globals.browser,
ecmaVersion: 2021,
sourceType: "module",
},
rules: {
2024-11-03 04:01:11 +08:00
"no-undef": "error", // Disallow the use of undeclared variables or functions.
"semi": ["error", "always"], // Require the use of semicolons at the end of statements.
"curly": "warn", // Enforce the use of curly braces around blocks of code.
"no-unused-vars": "off", // Disable warnings for unused variables.
"no-unreachable": "off", // Disable warnings for unreachable code.
2024-11-03 03:52:00 +08:00
},
},
];