forked from dittofeed/dittofeed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
54 lines (54 loc) · 1.67 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
45
46
47
48
49
50
51
52
53
54
module.exports = {
ignorePatterns: ["**/*.js", "**/dist/**/*"],
extends: [
"eslint:recommended",
"airbnb",
"airbnb-typescript",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/strict",
"prettier",
],
parser: "@typescript-eslint/parser",
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.eslint.json", "./packages/*/tsconfig.json"],
},
plugins: ["@typescript-eslint", "simple-import-sort", "filenames"],
rules: {
"@typescript-eslint/no-redeclare": "off",
"consistent-return": "off",
// There's some kind of bug with this rule, which throws the error "Cannot read properties of undefined (reading 'kind')"
"@typescript-eslint/return-await": "off",
"default-case": "off",
"filenames/no-index": "error",
"import/prefer-default-export": "off",
"no-continue": "off",
"no-labels": "off",
"no-plusplus": ["error", { allowForLoopAfterthoughts: true }],
"no-restricted-syntax": "off",
"no-void": "off",
"no-shadow": "off",
"guard-for-in": "off",
"simple-import-sort/exports": "error",
"simple-import-sort/imports": "error",
"import/no-extraneous-dependencies": ["error", { includeTypes: false }],
"no-param-reassign": [
"error",
{
props: true,
// naming convention so that can use array reduce
ignorePropertyModificationsFor: ["memo", "acc"],
},
],
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
"@typescript-eslint/no-unsafe-enum-comparison": "error",
},
root: true,
};