-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
44 lines (43 loc) · 1.15 KB
/
.eslintrc.js
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
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: "@guardian/eslint-config-typescript",
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 12,
tsconfigRootDir: __dirname,
project: ["./tsconfig.eslint.json"],
},
plugins: ["@typescript-eslint", "custom-rules", "@guardian/tsdoc-required"],
rules: {
"@typescript-eslint/no-inferrable-types": 0,
"import/no-namespace": 2,
"custom-rules/valid-constructors": 2,
"custom-rules/experimental-classes": 0,
},
root: true,
ignorePatterns: ["**/*.js", "node_modules"],
overrides: [
{
files: ["src/bin/**"],
rules: {
"custom-rules/valid-constructors": 0,
},
},
// This rule is applied within `overrides` as it only applies to the `experimental` directory, and the rule's test.
{
files: ["src/experimental/**", "tools/eslint/rules/experimental-classes.test.ts"],
rules: {
"custom-rules/experimental-classes": 2,
},
},
{
files: ["src/patterns/**"], // Incremental rollout.
rules: {
"@guardian/tsdoc-required/tsdoc-required": 2,
}
}
],
};