Skip to content

Commit

Permalink
Merge pull request #444 from sir-gon/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
sir-gon authored Aug 22, 2024
2 parents 25946bc + 350180f commit 3f3e4ab
Show file tree
Hide file tree
Showing 72 changed files with 1,952 additions and 637 deletions.
52 changes: 44 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,22 @@
"parserOptions": {
"project": true
},
"plugins": ["@typescript-eslint", "jest", "prettier"],
"plugins": [
"@typescript-eslint",
"import",
"jest",
"prettier"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
// "plugin:@typescript-eslint/recommended-type-checked",
// "plugin:@typescript-eslint/stylistic-type-checked"
"airbnb-base",
"prettier",
// "plugin:import/errors",
// "plugin:import/warnings",
"plugin:import/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:jest/all"
],
"rules": {
Expand All @@ -21,13 +28,31 @@
// CUSTOM OVERRIDES
// TODO: remove no-restricted-syntax override and replace for...Of due
/// "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."
"import/extensions": [
"error",
"always",
{
"pattern": {
"ts": "never"
}
}
],
"no-restricted-syntax": 0,
"no-console": "off",
"no-underscore-dangle": 0,
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }]
// ,
// "import/no-unresolved": [2, {"commonjs": true, "amd": true}],
// "import/extensions": ["error", { "js": "always", "json": "always"}]
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
// Note: you must disable the base rule as it can report incorrect errors
// https://stackoverflow.com/a/63961972/6366150
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
// Note: you must disable the base rule as it can report incorrect errors
// https://github.com/typescript-eslint/typescript-eslint/issues/2621#issuecomment-701970389
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
// Note: you must disable the base rule as it can report incorrect errors
// https://stackoverflow.com/a/77212380/6366150
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "error"
},
"overrides": [
{
Expand All @@ -37,5 +62,16 @@
"@typescript-eslint/explicit-function-return-type": "error"
}
}
]
],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true, // always try to resolve types under `<root>@types` directory even it doesn"t contain any source code, like `@types/unist`
"project": "."
}
}
}
}
Loading

0 comments on commit 3f3e4ab

Please sign in to comment.