-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
60 lines (57 loc) · 2.01 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
55
56
57
58
59
60
module.exports = {
parser: "@typescript-eslint/parser",
parserOptions: {
project: [
"./packages/examples/core-example/tsconfig.json",
"./packages/examples/web-example/React/tsconfig.json",
"./packages/sdk-core/tsconfig.json",
"./packages/sdk-web/tsconfig.json",
"./packages/sdk-server/tsconfig.json",
"./packages/tests/tsconfig.json",
"./tsconfig.base.json",
],
tsconfigRootDir: __dirname,
},
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
plugins: ["@typescript-eslint", "import", 'jsdoc'],
env: {
es6: true,
node: true,
},
rules: {
//Main rules
"import/extensions": ["warn", "ignorePackages"],
"import/no-named-as-default": "warn",
"import/no-cycle": "warn",
"import/no-unused-modules": "warn",
"import/no-deprecated": "warn",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "warn",
"no-redeclare": "off",
"no-shadow": "off",
"@typescript-eslint/no-shadow": "warn",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-pattern": "off",
"no-empty": ["error", { allowEmptyCatch: true }],
"@typescript-eslint/restrict-template-expressions": "off",
"import/extensions": ["off"],
"@typescript-eslint/no-misused-promises": [
"error",
{ checksVoidReturn: false },
],
"prefer-const": "warn",
"valid-jsdoc": "warn",
//Formatting Rules
"no-multiple-empty-lines": ["warn", { max: 1, maxEOF: 0, maxBOF: 0 }],
indent: ["warn", 4, { SwitchCase: 1 }],
"comma-spacing": ["warn", { before: false, after: true }],
"no-multi-spaces": "warn",
"array-bracket-spacing": ["warn", "never"],
"space-in-parens": ["warn", "never"],
"object-curly-spacing": ["warn", "always"],
"space-infix-ops": ["warn", { "int32Hint": false }],
"jsdoc/check-alignment": 1, // Recommended
},
ignorePatterns: ["dist", "node_modules", "scripts", ".eslintrc.js"],
};