Updated TypeScript rules
Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
parent
65cf95c441
commit
802224efd3
18
ROADMAP.md
18
ROADMAP.md
@ -385,29 +385,30 @@
|
||||
- [ ] "array-type"
|
||||
- [X] "await-thenable"
|
||||
- [ ] "ban-ts-comment"
|
||||
- [ ] "ban-ts-ignore"
|
||||
- [ ] "ban-tslint-comment"
|
||||
- [ ] "ban-types"
|
||||
- [ ] "brace-style"
|
||||
- [ ] "camelcase"
|
||||
- [X] "class-literal-property-style"
|
||||
- [ ] "class-name-casing"
|
||||
- [X] "comma-spacing"
|
||||
- [ ] "consistent-type-assertions"
|
||||
- [ ] "consistent-type-definitions"
|
||||
- [ ] "default-param-last"
|
||||
- [ ] "dot-notation"
|
||||
- [X] "explicit-function-return-type"
|
||||
- [X] "explicit-member-accessibility"
|
||||
- [ ] "explicit-module-boundary-types"
|
||||
- [ ] "func-call-spacing"
|
||||
- [ ] "generic-type-naming"
|
||||
- [X] "indent"
|
||||
- [X] "interface-name-prefix"
|
||||
- [ ] "init-declarations"
|
||||
- [ ] "keyword-spacing"
|
||||
- [ ] "lines-between-class-members"
|
||||
- [ ] "member-delimiter-style"
|
||||
- [ ] "member-naming"
|
||||
- [ ] "member-ordering"
|
||||
- [X] "method-signature-style"
|
||||
- [ ] "naming-convention"
|
||||
- [ ] "no-array-constructor"
|
||||
- [X] "no-base-to-string"
|
||||
- [ ] "no-confusing-non-null-assertion"
|
||||
- [ ] "no-dupe-class-members"
|
||||
- [ ] "no-dynamic-delete"
|
||||
- [ ] "no-empty-function"
|
||||
@ -421,6 +422,8 @@
|
||||
- [ ] "no-for-in-array"
|
||||
- [X] "no-implied-eval"
|
||||
- [X] "no-inferrable-types"
|
||||
- [ ] "no-invalid-this"
|
||||
- [ ] "no-invalid-void-type"
|
||||
- [X] "no-magic-numbers"
|
||||
- [ ] "no-misused-new"
|
||||
- [X] "no-misused-promises"
|
||||
@ -437,6 +440,7 @@
|
||||
- [ ] "no-unnecessary-qualifier"
|
||||
- [ ] "no-unnecessary-type-arguments"
|
||||
- [X] "no-unnecessary-type-assertion"
|
||||
- [ ] "no-unsafe-assignment"
|
||||
- [X] "no-unsafe-call"
|
||||
- [X] "no-unsafe-member-access"
|
||||
- [X] "no-unsafe-return"
|
||||
@ -456,8 +460,10 @@
|
||||
- [ ] "prefer-optional-chain"
|
||||
- [ ] "prefer-readonly"
|
||||
- [X] "prefer-readonly-parameter-types"
|
||||
- [ ] "prefer-reduce-type-parameter"
|
||||
- [ ] "prefer-regexp-exec"
|
||||
- [ ] "prefer-string-starts-ends-with"
|
||||
- [ ] "prefer-ts-expect-error"
|
||||
- [ ] "promise-function-async"
|
||||
- [X] "quotes"
|
||||
- [ ] "require-array-sort-compare"
|
||||
|
52
package-lock.json
generated
52
package-lock.json
generated
@ -103,25 +103,26 @@
|
||||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/eslint-plugin": {
|
||||
"version": "2.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.34.0.tgz",
|
||||
"integrity": "sha512-4zY3Z88rEE99+CNvTbXSyovv2z9PNOVffTWD2W8QF5s2prBQtwN2zadqERcrHpcR7O/+KMI3fcTAmUUhK/iQcQ==",
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.3.0.tgz",
|
||||
"integrity": "sha512-Ybx/wU75Tazz6nU2d7nN6ll0B98odoiYLXwcuwS5WSttGzK46t0n7TPRQ4ozwcTv82UY6TQoIvI+sJfTzqK9dQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/experimental-utils": "2.34.0",
|
||||
"@typescript-eslint/experimental-utils": "3.3.0",
|
||||
"functional-red-black-tree": "^1.0.1",
|
||||
"regexpp": "^3.0.0",
|
||||
"semver": "^7.3.2",
|
||||
"tsutils": "^3.17.1"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/experimental-utils": {
|
||||
"version": "2.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz",
|
||||
"integrity": "sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==",
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.3.0.tgz",
|
||||
"integrity": "sha512-d4pGIAbu/tYsrPrdHCQ5xfadJGvlkUxbeBB56nO/VGmEDi/sKmfa5fGty5t5veL1OyJBrUmSiRn1R1qfVDydrg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.3",
|
||||
"@typescript-eslint/typescript-estree": "2.34.0",
|
||||
"@typescript-eslint/typescript-estree": "3.3.0",
|
||||
"eslint-scope": "^5.0.0",
|
||||
"eslint-utils": "^2.0.0"
|
||||
}
|
||||
@ -136,12 +137,41 @@
|
||||
"@typescript-eslint/experimental-utils": "2.34.0",
|
||||
"@typescript-eslint/typescript-estree": "2.34.0",
|
||||
"eslint-visitor-keys": "^1.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@typescript-eslint/experimental-utils": {
|
||||
"version": "2.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz",
|
||||
"integrity": "sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/json-schema": "^7.0.3",
|
||||
"@typescript-eslint/typescript-estree": "2.34.0",
|
||||
"eslint-scope": "^5.0.0",
|
||||
"eslint-utils": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/typescript-estree": {
|
||||
"version": "2.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz",
|
||||
"integrity": "sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^4.1.1",
|
||||
"eslint-visitor-keys": "^1.1.0",
|
||||
"glob": "^7.1.6",
|
||||
"is-glob": "^4.0.1",
|
||||
"lodash": "^4.17.15",
|
||||
"semver": "^7.3.2",
|
||||
"tsutils": "^3.17.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/typescript-estree": {
|
||||
"version": "2.34.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz",
|
||||
"integrity": "sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==",
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.3.0.tgz",
|
||||
"integrity": "sha512-3SqxylENltEvJsjjMSDCUx/edZNSC7wAqifUU1Ywp//0OWEZwMZJfecJud9XxJ/40rAKEbJMKBOQzeOjrLJFzQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"debug": "^4.1.1",
|
||||
|
@ -14,8 +14,8 @@
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-typescript": "^4.1.2",
|
||||
"@types/node": "^14.0.13",
|
||||
"@typescript-eslint/eslint-plugin": "^2.26.0",
|
||||
"@typescript-eslint/parser": "^2.26.0",
|
||||
"@typescript-eslint/eslint-plugin": "^3.3.0",
|
||||
"@typescript-eslint/parser": "^2.34.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-plugin-eslint-comments": "^3.1.2",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
@ -29,8 +29,8 @@
|
||||
"typescript": "^3.9.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^2.26.0",
|
||||
"@typescript-eslint/parser": "^2.26.0",
|
||||
"@typescript-eslint/eslint-plugin": "^3.3.0",
|
||||
"@typescript-eslint/parser": "^2.34.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-plugin-eslint-comments": "^3.1.2",
|
||||
"eslint-plugin-import": "^2.20.2",
|
||||
|
@ -16,6 +16,7 @@
|
||||
"@typescript-eslint/explicit-function-return-type": [
|
||||
"error",
|
||||
{
|
||||
"allowConciseArrowFunctionExpressionsStartingWithVoid": false,
|
||||
"allowExpressions": false,
|
||||
"allowHigherOrderFunctions": false,
|
||||
"allowTypedFunctionExpressions": false
|
||||
@ -61,12 +62,9 @@
|
||||
"outerIIFEBody": 1
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/interface-name-prefix": [
|
||||
"@typescript-eslint/method-signature-style": [
|
||||
"error",
|
||||
{
|
||||
"allowUnderscorePrefix": false,
|
||||
"prefixWithI": "always"
|
||||
}
|
||||
"property"
|
||||
],
|
||||
"@typescript-eslint/no-base-to-string": [
|
||||
"error"
|
||||
@ -125,9 +123,7 @@
|
||||
"@typescript-eslint/no-unnecessary-condition": [
|
||||
"error",
|
||||
{
|
||||
"allowConstantLoopConditions": false,
|
||||
"checkArrayPredicates": true,
|
||||
"ignoreRhs": true
|
||||
"allowConstantLoopConditions": false
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-unnecessary-type-assertion": [
|
||||
@ -213,9 +209,13 @@
|
||||
"@typescript-eslint/strict-boolean-expressions": [
|
||||
"error",
|
||||
{
|
||||
"allowNullable": false,
|
||||
"allowSafe": false,
|
||||
"ignoreRhs": false
|
||||
"allowAny": false,
|
||||
"allowNullableBoolean": false,
|
||||
"allowNullableNumber": false,
|
||||
"allowNullableObject": false,
|
||||
"allowNullableString": false,
|
||||
"allowNumber": false,
|
||||
"allowString": false
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/type-annotation-spacing": [
|
||||
|
@ -3,7 +3,6 @@ import rDefault from "./rules/typescript/default.json";
|
||||
module.exports = {
|
||||
"extends": [
|
||||
"./javascript",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
||||
"plugin:import/typescript",
|
||||
|
Loading…
x
Reference in New Issue
Block a user