-
-
Notifications
You must be signed in to change notification settings - Fork 528
/
Copy path.eslintrc.cjs
25 lines (25 loc) · 889 Bytes
/
.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
/** @type {import('@types/eslint').Linter.BaseConfig} */
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
project: ["./tsconfig.json"],
},
extends: ["eslint:recommended", "plugin:@typescript-eslint/strict"],
plugins: ["@typescript-eslint", "prettier"],
rules: {
"@typescript-eslint/consistent-indexed-object-style": "off", // sometimes naming keys is more user-friendly
"@typescript-eslint/no-dynamic-delete": "off", // delete is OK
"@typescript-eslint/no-unnecessary-condition": "off", // this gives bad advice
"no-console": "error",
"no-unused-vars": "off",
},
overrides: [
{
files: ["**/*.test.*"],
rules: {
"@typescript-eslint/ban-ts-comment": "off", // allow @ts-ignore only in tests
"@typescript-eslint/no-empty-function": "off", // don’t enforce this in tests
},
},
],
};