forked from mindcraft-bots/mindcraft
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
39 lines (36 loc) · 1.38 KB
/
Copy patheslint.config.js
File metadata and controls
39 lines (36 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// eslint.config.js
import globals from "globals";
import pluginJs from "@eslint/js";
import noFloatingPromise from "eslint-plugin-no-floating-promise";
/** @type {import('eslint').Linter.Config[]} */
export default [
{
ignores: ["node_modules/**", "bots/**"],
},
// First, import the recommended configuration
pluginJs.configs.recommended,
// Then override or customize specific rules
{
plugins: {
"no-floating-promise": noFloatingPromise,
},
languageOptions: {
globals: {
...globals.browser,
...globals.node,
Compartment: "readonly",
},
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
"no-undef": "error", // Disallow the use of undeclared variables or functions.
"semi": "off", // Existing code intentionally mixes semicolon styles.
"curly": "off", // Do not 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.
"require-await": "off", // Command handlers share async signatures even when a handler returns immediately.
"no-floating-promise/no-floating-promise": "off", // Existing modes intentionally fire and track background actions.
},
},
];