Skip to content

Commit 3f3e4ab

Browse files
authored
Merge pull request #444 from sir-gon/develop
Develop
2 parents 25946bc + 350180f commit 3f3e4ab

File tree

72 files changed

+1952
-637
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1952
-637
lines changed

.eslintrc

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,22 @@
44
"parserOptions": {
55
"project": true
66
},
7-
"plugins": ["@typescript-eslint", "jest", "prettier"],
7+
"plugins": [
8+
"@typescript-eslint",
9+
"import",
10+
"jest",
11+
"prettier"],
812
"extends": [
913
"eslint:recommended",
1014
"plugin:@typescript-eslint/eslint-recommended",
1115
"plugin:@typescript-eslint/recommended",
1216
// "plugin:@typescript-eslint/recommended-type-checked",
17+
// "plugin:@typescript-eslint/stylistic-type-checked"
18+
"airbnb-base",
1319
"prettier",
14-
// "plugin:import/errors",
15-
// "plugin:import/warnings",
20+
"plugin:import/recommended",
21+
"plugin:import/errors",
22+
"plugin:import/warnings",
1623
"plugin:jest/all"
1724
],
1825
"rules": {
@@ -21,13 +28,31 @@
2128
// CUSTOM OVERRIDES
2229
// TODO: remove no-restricted-syntax override and replace for...Of due
2330
/// "iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations."
31+
"import/extensions": [
32+
"error",
33+
"always",
34+
{
35+
"pattern": {
36+
"ts": "never"
37+
}
38+
}
39+
],
2440
"no-restricted-syntax": 0,
2541
"no-console": "off",
2642
"no-underscore-dangle": 0,
27-
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }]
28-
// ,
29-
// "import/no-unresolved": [2, {"commonjs": true, "amd": true}],
30-
// "import/extensions": ["error", { "js": "always", "json": "always"}]
43+
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
44+
// Note: you must disable the base rule as it can report incorrect errors
45+
// https://stackoverflow.com/a/63961972/6366150
46+
"no-shadow": "off",
47+
"@typescript-eslint/no-shadow": "error",
48+
// Note: you must disable the base rule as it can report incorrect errors
49+
// https://github.com/typescript-eslint/typescript-eslint/issues/2621#issuecomment-701970389
50+
"no-unused-vars": "off",
51+
"@typescript-eslint/no-unused-vars": "error",
52+
// Note: you must disable the base rule as it can report incorrect errors
53+
// https://stackoverflow.com/a/77212380/6366150
54+
"no-use-before-define": "off",
55+
"@typescript-eslint/no-use-before-define": "error"
3156
},
3257
"overrides": [
3358
{
@@ -37,5 +62,16 @@
3762
"@typescript-eslint/explicit-function-return-type": "error"
3863
}
3964
}
40-
]
65+
],
66+
"settings": {
67+
"import/parsers": {
68+
"@typescript-eslint/parser": [".ts", ".tsx"]
69+
},
70+
"import/resolver": {
71+
"typescript": {
72+
"alwaysTryTypes": true, // always try to resolve types under `<root>@types` directory even it doesn"t contain any source code, like `@types/unist`
73+
"project": "."
74+
}
75+
}
76+
}
4177
}

0 commit comments

Comments
 (0)