Skip to content

Commit

Permalink
Merge pull request eManPrague#7 from gius/master
Browse files Browse the repository at this point in the history
Added new typescript rules
  • Loading branch information
Strnadj authored Apr 30, 2021
2 parents 54c4d3c + 2264f98 commit 838b29d
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1,491 deletions.
16 changes: 15 additions & 1 deletion eslint-default.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module.exports = {
],
rules: {
curly: ["error", "all"],
"no-unneeded-ternary": "error",
"no-redeclare": "off", // warns on typescript function overrides
//"@typescript-eslint/no-redeclare": ["error"], // this should be enabled, but causes 'Definition for rule '@typescript-eslint/no-redeclare' was not found'

Expand All @@ -31,10 +32,23 @@ module.exports = {
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
1,
"warn",
{ args: "none", ignoreRestSiblings: true },
],
"@typescript-eslint/no-use-before-define": "off", // disabled because it can report incorrect errors https://stackoverflow.com/a/64024916/19712
"@typescript-eslint/consistent-type-imports": "warn",
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-unnecessary-condition": [
"error",
{ allowConstantLoopConditions: true },
],
"@typescript-eslint/non-nullable-type-assertion-style": "warn",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-includes": "warn",
"@typescript-eslint/prefer-nullish-coalescing": "warn",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/prefer-reduce-type-parameter": "warn",
"@typescript-eslint/no-throw-literal": "error",
},
settings: {
react: {
Expand Down
Loading

0 comments on commit 838b29d

Please sign in to comment.