-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
56 lines (50 loc) · 1.23 KB
/
.eslintrc.cjs
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
/* This file is managed by @html-validate/eslint-config */
/* Changes may be overwritten */
require("@html-validate/eslint-config/patch/modern-module-resolution");
module.exports = {
root: true,
extends: ["@html-validate"],
parserOptions: {
/* needed by yocto-queue */
ecmaVersion: 2022,
},
rules: {
"import/extensions": "off",
"sonarjs/no-clear-text-protocols": "off",
/* not redundant as they dont mean the same thing */
"sonarjs/no-redundant-optional": "off",
},
overrides: [
{
/* ensure cjs and mjs files are linted too */
files: ["*.cjs", "*.mjs"],
},
{
files: "*.ts",
extends: ["@html-validate/typescript"],
},
{
files: ["src/**/*.ts"],
excludedFiles: ["src/**/*.spec.ts", "**/__mocks__/*.ts"],
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"],
},
extends: ["@html-validate/typescript-typeinfo"],
},
{
files: "*.spec.[jt]s",
excludedFiles: ["cypress/**", "tests/e2e/**"],
extends: ["@html-validate/jest"],
},
{
/* files which should lint even if project isn't build yet */
files: ["./*.d.ts", "bin/*.js"],
rules: {
"import/export": "off",
"import/extensions": "off",
"import/no-unresolved": "off",
},
},
],
};