-
-
Notifications
You must be signed in to change notification settings - Fork 292
Expand file tree
/
Copy patheslint.config.js
More file actions
56 lines (55 loc) · 1.52 KB
/
Copy patheslint.config.js
File metadata and controls
56 lines (55 loc) · 1.52 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
import js from "@eslint/js";
import html from "eslint-plugin-html";
import globals from "globals";
export default [
{
ignores: [
"app/static/third-party/**",
"app/templates/components/debug-mode.html",
"playwright-report/**",
"**/venv/**",
"e2e-results/**",
],
},
js.configs.recommended,
{
files: ["**/*.js", "**/*.html"],
plugins: { html },
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.node,
...globals.browser,
},
},
rules: {
"block-scoped-var": "error",
"capitalized-comments": [
"error",
"always",
{
ignoreConsecutiveComments: true,
// We want to allow inline comments to document a parameter like
// foo(/*force=*/ true). We're not married to this particular pattern
// for variable names, and we can update it if we have variable names
// that fall outside the pattern.
ignorePattern: `[a-zA-Z]+=`,
},
],
eqeqeq: "error",
// This will produce an error for console.log or console.warn in production
// and a warning in development.
"no-console": [
process.env.NODE_ENV === "production" ? "error" : "warn",
{ allow: ["error", "debug"] },
],
"no-duplicate-imports": "error",
"no-lonely-if": "error",
"no-param-reassign": "error",
"no-useless-return": "error",
"no-var": "error",
"prefer-const": "error",
},
},
];