UNPKG

2.29 kBJavaScriptView Raw
1module.exports = {
2 env: {
3 browser: true,
4 es6: true,
5 node: true,
6 },
7 extends: ["plugin:@typescript-eslint/recommended", "plugin:jest/recommended", "prettier"],
8 parser: "@typescript-eslint/parser",
9 parserOptions: {
10 project: "tsconfig.spec.json",
11 sourceType: "module",
12 },
13 plugins: ["eslint-plugin-jest", "eslint-plugin-jsdoc", "@typescript-eslint"],
14 rules: {
15 "@typescript-eslint/naming-convention": "error",
16 "@typescript-eslint/no-empty-function": "error",
17 "@typescript-eslint/no-unused-expressions": "error",
18
19 // Something is grumpy about these rules re: node imports - TODO
20 "@typescript-eslint/no-require-imports": "off",
21 "@typescript-eslint/no-var-requires": "off",
22
23 curly: "error",
24 "jsdoc/check-alignment": "error",
25 "jsdoc/check-indentation": "off",
26 "jsdoc/newline-after-description": "off",
27 "no-empty": "error",
28 // This is used intentionally in a bunch of ci_source/providers
29 "no-empty-function": "off",
30 "no-redeclare": "error",
31 "no-var": "error",
32 // There are a bunch of existing uses of 'let' where this rule would trigger
33 "prefer-const": "off",
34
35 // This project has a ton of interacting APIs, and sometimes it's helpful to be explicit, even if the type is trivial
36 "@typescript-eslint/no-inferrable-types": "off",
37
38 "no-unused-expressions": "off",
39 "@typescript-eslint/no-unused-expressions": "error",
40
41 "no-unused-vars": "off",
42 "@typescript-eslint/no-unused-vars": [
43 "warn",
44 {
45 // Allow function args to be unused
46 args: "none",
47 argsIgnorePattern: "^_",
48 varsIgnorePattern: "^_",
49 caughtErrorsIgnorePattern: "^_",
50 },
51 ],
52
53 "jest/no-disabled-tests": "warn",
54 "jest/no-focused-tests": "error",
55 "jest/no-identical-title": "error",
56 "jest/prefer-to-have-length": "off",
57 "jest/valid-expect": "error",
58 "@typescript-eslint/no-non-null-assertion": "off",
59 // Tons of violations in the codebase
60 "@typescript-eslint/naming-convention": "off",
61 // Used liberally in the codebase
62 "@typescript-eslint/no-explicit-any": "off",
63 // This has value in communicating with other Developers even if it has no functional effect.
64 "@typescript-eslint/no-empty-interface": "off",
65 },
66}