-
-
Notifications
You must be signed in to change notification settings - Fork 631
Expand file tree
/
Copy pathxo.config.js
More file actions
63 lines (61 loc) · 1.61 KB
/
xo.config.js
File metadata and controls
63 lines (61 loc) · 1.61 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
"use strict";
const globals = require("globals");
const { defineConfig } = require("eslint/config");
const compatPlugin = require("eslint-plugin-compat");
module.exports = defineConfig([
{
extends: [compatPlugin.configs["flat/recommended"]],
languageOptions: {
sourceType: "script",
globals: {
...globals.browser,
...globals.jquery,
},
},
prettier: true,
space: 2,
ignores: ["**/vendor/**"],
rules: {
"@stylistic/spaced-comment": "off",
camelcase: [
"error",
{
properties: "never",
},
],
"capitalized-comments": "off",
"new-cap": [
"error",
{
properties: false,
},
],
"no-alert": "off",
"no-console": "error",
// This should be removed later
"no-implicit-globals": "off",
"no-negated-condition": "off",
"promise/prefer-await-to-then": "off",
"prefer-arrow-callback": "error",
"prefer-destructuring": [
// This should be enabled later
"off",
{
object: true,
array: false,
},
],
// This should be reverted to "error" later
strict: ["error", "global"],
"unicorn/no-anonymous-default-export": "off",
"unicorn/no-document-cookie": "off",
"unicorn/no-negated-condition": "off",
"unicorn/prefer-module": "off",
"unicorn/prefer-query-selector": "off",
"unicorn/prefer-string-slice": "off",
"unicorn/prefer-string-raw": "off",
"unicorn/prevent-abbreviations": "off",
"unicorn/switch-case-braces": "off",
},
},
]);