Skip to content

Commit

Permalink
feat(*): added new ts rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Малашков Максим Александрович authored and Малашков Максим Александрович committed Jan 9, 2025
1 parent 919d78b commit 33131f4
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 144 deletions.
1 change: 1 addition & 0 deletions eslint/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ module.exports = {
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-shadow': 'warn',
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-use-before-define': [
'error',
{ functions: false, classes: true, variables: true },
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-simple-import-sort": "12.1.1",
"eslint-plugin-unicorn": "56.0.1",
"execa": "9.5.1",
"execa": "9.5.2",
"kebab-case": "1.0.0",
"lefthook": "1.8.4",
"prettier": "3.3.3",
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"strict": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react"
"jsx": "react",
"moduleResolution": "bundler"
},
"include": ["**/*"]
}
164 changes: 22 additions & 142 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/helper-validator-identifier@npm:^7.22.20":
version: 7.22.20
resolution: "@babel/helper-validator-identifier@npm:7.22.20"
checksum: 10c0/dcad63db345fb110e032de46c3688384b0008a42a4845180ce7cd62b1a9c0507a1bed727c4d1060ed1a03ae57b4d918570259f81724aaac1a5b776056f37504e
languageName: node
linkType: hard

"@babel/helper-validator-identifier@npm:^7.24.7":
"@babel/helper-validator-identifier@npm:^7.22.20, @babel/helper-validator-identifier@npm:^7.24.7":
version: 7.25.9
resolution: "@babel/helper-validator-identifier@npm:7.25.9"
checksum: 10c0/4fc6f830177b7b7e887ad3277ddb3b91d81e6c4a24151540d9d1023e8dc6b1c0505f0f0628ae653601eb4388a8db45c1c14b2c07a9173837aef7e4116456259d
Expand Down Expand Up @@ -1634,7 +1627,7 @@ __metadata:
languageName: node
linkType: hard

"ajv@npm:^8.0.1":
"ajv@npm:^8.0.1, ajv@npm:^8.11.0":
version: 8.17.1
resolution: "ajv@npm:8.17.1"
dependencies:
Expand All @@ -1646,18 +1639,6 @@ __metadata:
languageName: node
linkType: hard

"ajv@npm:^8.11.0":
version: 8.12.0
resolution: "ajv@npm:8.12.0"
dependencies:
fast-deep-equal: "npm:^3.1.1"
json-schema-traverse: "npm:^1.0.0"
require-from-string: "npm:^2.0.2"
uri-js: "npm:^4.2.2"
checksum: 10c0/ac4f72adf727ee425e049bc9d8b31d4a57e1c90da8d28bcd23d60781b12fcd6fc3d68db5df16994c57b78b94eed7988f5a6b482fd376dc5b084125e20a0a622e
languageName: node
linkType: hard

"ansi-escapes@npm:^6.2.0":
version: 6.2.1
resolution: "ansi-escapes@npm:6.2.1"
Expand Down Expand Up @@ -1908,7 +1889,7 @@ __metadata:
eslint-plugin-react-hooks: "npm:4.6.2"
eslint-plugin-simple-import-sort: "npm:12.1.1"
eslint-plugin-unicorn: "npm:56.0.1"
execa: "npm:9.5.1"
execa: "npm:9.5.2"
kebab-case: "npm:1.0.0"
lefthook: "npm:1.8.4"
prettier: "npm:3.3.3"
Expand Down Expand Up @@ -2767,15 +2748,15 @@ __metadata:
languageName: node
linkType: hard

"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.3.4":
version: 4.3.4
resolution: "debug@npm:4.3.4"
"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:^4.3.7":
version: 4.3.7
resolution: "debug@npm:4.3.7"
dependencies:
ms: "npm:2.1.2"
ms: "npm:^2.1.3"
peerDependenciesMeta:
supports-color:
optional: true
checksum: 10c0/cedbec45298dd5c501d01b92b119cd3faebe5438c3917ff11ae1bff86a6c722930ac9c8659792824013168ba6db7c4668225d845c633fbdafbbf902a6389f736
checksum: 10c0/1471db19c3b06d485a622d62f65947a19a23fbd0dd73f7fd3eafb697eec5360cde447fb075919987899b1a2096e85d35d4eb5a4de09a57600ac9cf7e6c8e768b
languageName: node
linkType: hard

Expand All @@ -2788,18 +2769,6 @@ __metadata:
languageName: node
linkType: hard

"debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.5, debug@npm:^4.3.7":
version: 4.3.7
resolution: "debug@npm:4.3.7"
dependencies:
ms: "npm:^2.1.3"
peerDependenciesMeta:
supports-color:
optional: true
checksum: 10c0/1471db19c3b06d485a622d62f65947a19a23fbd0dd73f7fd3eafb697eec5360cde447fb075919987899b1a2096e85d35d4eb5a4de09a57600ac9cf7e6c8e768b
languageName: node
linkType: hard

"decamelize-keys@npm:^1.1.0":
version: 1.1.1
resolution: "decamelize-keys@npm:1.1.1"
Expand Down Expand Up @@ -3358,7 +3327,7 @@ __metadata:
languageName: node
linkType: hard

"eslint-module-utils@npm:^2.12.0":
"eslint-module-utils@npm:^2.12.0, eslint-module-utils@npm:^2.8.1":
version: 2.12.0
resolution: "eslint-module-utils@npm:2.12.0"
dependencies:
Expand All @@ -3370,18 +3339,6 @@ __metadata:
languageName: node
linkType: hard

"eslint-module-utils@npm:^2.8.1":
version: 2.11.1
resolution: "eslint-module-utils@npm:2.11.1"
dependencies:
debug: "npm:^3.2.7"
peerDependenciesMeta:
eslint:
optional: true
checksum: 10c0/d1c23397eddc42a7824de08348095483bc270a4a3222bc0d54a76382c6411111c33e44a0a1819489e1e209d9e4721de2a8438e7ca4e6fe6be32ff818af9b11b4
languageName: node
linkType: hard

"eslint-plugin-cypress@npm:3.6.0":
version: 3.6.0
resolution: "eslint-plugin-cypress@npm:3.6.0"
Expand Down Expand Up @@ -3655,9 +3612,9 @@ __metadata:
languageName: node
linkType: hard

"execa@npm:9.5.1":
version: 9.5.1
resolution: "execa@npm:9.5.1"
"execa@npm:9.5.2":
version: 9.5.2
resolution: "execa@npm:9.5.2"
dependencies:
"@sindresorhus/merge-streams": "npm:^4.0.0"
cross-spawn: "npm:^7.0.3"
Expand All @@ -3671,7 +3628,7 @@ __metadata:
signal-exit: "npm:^4.1.0"
strip-final-newline: "npm:^4.0.0"
yoctocolors: "npm:^2.0.0"
checksum: 10c0/1a628d535c5a088f9e17a735bb3143efc4198095392b319ba877b2975d5c3c57724536dccb6f68f1cd9b3af331c5a9e8c1aeb338d52ab316b1e008ff453374a7
checksum: 10c0/94782a6282e03253224406c29068d18f9095cc251a45d1f19ac3d8f2a9db2cbe32fb8ceb039db1451d8fce3531135a6c0c559f76d634f85416268fc4a6995365
languageName: node
linkType: hard

Expand Down Expand Up @@ -4782,16 +4739,7 @@ __metadata:
languageName: node
linkType: hard

"is-core-module@npm:^2.13.0, is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.1":
version: 2.13.1
resolution: "is-core-module@npm:2.13.1"
dependencies:
hasown: "npm:^2.0.0"
checksum: 10c0/2cba9903aaa52718f11c4896dabc189bab980870aae86a62dc0d5cedb546896770ee946fb14c84b7adf0735f5eaea4277243f1b95f5cefa90054f92fbcac2518
languageName: node
linkType: hard

"is-core-module@npm:^2.15.1":
"is-core-module@npm:^2.13.0, is-core-module@npm:^2.15.1, is-core-module@npm:^2.5.0, is-core-module@npm:^2.8.1":
version: 2.15.1
resolution: "is-core-module@npm:2.15.1"
dependencies:
Expand Down Expand Up @@ -6107,7 +6055,7 @@ __metadata:
languageName: node
linkType: hard

"minimatch@npm:^9.0.0, minimatch@npm:^9.0.4":
"minimatch@npm:^9.0.0, minimatch@npm:^9.0.3, minimatch@npm:^9.0.4":
version: 9.0.5
resolution: "minimatch@npm:9.0.5"
dependencies:
Expand All @@ -6116,15 +6064,6 @@ __metadata:
languageName: node
linkType: hard

"minimatch@npm:^9.0.3":
version: 9.0.4
resolution: "minimatch@npm:9.0.4"
dependencies:
brace-expansion: "npm:^2.0.1"
checksum: 10c0/2c16f21f50e64922864e560ff97c587d15fd491f65d92a677a344e970fe62aafdbeafe648965fa96d33c061b4d0eabfe0213466203dd793367e7f28658cf6414
languageName: node
linkType: hard

"minimist-options@npm:4.1.0":
version: 4.1.0
resolution: "minimist-options@npm:4.1.0"
Expand Down Expand Up @@ -6246,13 +6185,6 @@ __metadata:
languageName: node
linkType: hard

"ms@npm:2.1.2":
version: 2.1.2
resolution: "ms@npm:2.1.2"
checksum: 10c0/a437714e2f90dbf881b5191d35a6db792efbca5badf112f87b9e1c712aace4b4b9b742dd6537f3edf90fd6f684de897cec230abde57e87883766712ddda297cc
languageName: node
linkType: hard

"ms@npm:^2.1.1, ms@npm:^2.1.2, ms@npm:^2.1.3":
version: 2.1.3
resolution: "ms@npm:2.1.3"
Expand Down Expand Up @@ -6316,7 +6248,7 @@ __metadata:
languageName: node
linkType: hard

"node-gyp@npm:^10.0.0":
"node-gyp@npm:^10.0.0, node-gyp@npm:^10.0.1":
version: 10.2.0
resolution: "node-gyp@npm:10.2.0"
dependencies:
Expand All @@ -6336,26 +6268,6 @@ __metadata:
languageName: node
linkType: hard

"node-gyp@npm:^10.0.1":
version: 10.1.0
resolution: "node-gyp@npm:10.1.0"
dependencies:
env-paths: "npm:^2.2.0"
exponential-backoff: "npm:^3.1.1"
glob: "npm:^10.3.10"
graceful-fs: "npm:^4.2.6"
make-fetch-happen: "npm:^13.0.0"
nopt: "npm:^7.0.0"
proc-log: "npm:^3.0.0"
semver: "npm:^7.3.5"
tar: "npm:^6.1.2"
which: "npm:^4.0.0"
bin:
node-gyp: bin/node-gyp.js
checksum: 10c0/9cc821111ca244a01fb7f054db7523ab0a0cd837f665267eb962eb87695d71fb1e681f9e21464cc2fd7c05530dc4c81b810bca1a88f7d7186909b74477491a3c
languageName: node
linkType: hard

"node-releases@npm:^2.0.18":
version: 2.0.18
resolution: "node-releases@npm:2.0.18"
Expand Down Expand Up @@ -7074,20 +6986,13 @@ __metadata:
languageName: node
linkType: hard

"picocolors@npm:^1.0.0, picocolors@npm:^1.1.1":
"picocolors@npm:^1.0.0, picocolors@npm:^1.1.0, picocolors@npm:^1.1.1":
version: 1.1.1
resolution: "picocolors@npm:1.1.1"
checksum: 10c0/e2e3e8170ab9d7c7421969adaa7e1b31434f789afb9b3f115f6b96d91945041ac3ceb02e9ec6fe6510ff036bcc0bf91e69a1772edc0b707e12b19c0f2d6bcf58
languageName: node
linkType: hard

"picocolors@npm:^1.1.0":
version: 1.1.0
resolution: "picocolors@npm:1.1.0"
checksum: 10c0/86946f6032148801ef09c051c6fb13b5cf942eaf147e30ea79edb91dd32d700934edebe782a1078ff859fb2b816792e97ef4dab03d7f0b804f6b01a0df35e023
languageName: node
linkType: hard

"picomatch@npm:^2.3.1":
version: 2.3.1
resolution: "picomatch@npm:2.3.1"
Expand Down Expand Up @@ -7763,7 +7668,7 @@ __metadata:
languageName: node
linkType: hard

"regexp.prototype.flags@npm:^1.5.1":
"regexp.prototype.flags@npm:^1.5.1, regexp.prototype.flags@npm:^1.5.2":
version: 1.5.3
resolution: "regexp.prototype.flags@npm:1.5.3"
dependencies:
Expand All @@ -7775,18 +7680,6 @@ __metadata:
languageName: node
linkType: hard

"regexp.prototype.flags@npm:^1.5.2":
version: 1.5.2
resolution: "regexp.prototype.flags@npm:1.5.2"
dependencies:
call-bind: "npm:^1.0.6"
define-properties: "npm:^1.2.1"
es-errors: "npm:^1.3.0"
set-function-name: "npm:^2.0.1"
checksum: 10c0/0f3fc4f580d9c349f8b560b012725eb9c002f36daa0041b3fbf6f4238cb05932191a4d7d5db3b5e2caa336d5150ad0402ed2be81f711f9308fe7e1a9bf9bd552
languageName: node
linkType: hard

"registry-auth-token@npm:^5.0.0":
version: 5.0.2
resolution: "registry-auth-token@npm:5.0.2"
Expand Down Expand Up @@ -8070,7 +7963,7 @@ __metadata:
languageName: node
linkType: hard

"semver@npm:7.6.0, semver@npm:^7.0.0":
"semver@npm:7.6.0":
version: 7.6.0
resolution: "semver@npm:7.6.0"
dependencies:
Expand All @@ -8090,7 +7983,7 @@ __metadata:
languageName: node
linkType: hard

"semver@npm:^7.1.1, semver@npm:^7.1.2, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.6.0, semver@npm:^7.6.3":
"semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.1.2, semver@npm:^7.3.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.6.0, semver@npm:^7.6.3":
version: 7.6.3
resolution: "semver@npm:7.6.3"
bin:
Expand Down Expand Up @@ -8724,7 +8617,7 @@ __metadata:
languageName: node
linkType: hard

"tar@npm:^6.1.11, tar@npm:^6.1.2, tar@npm:^6.2.0, tar@npm:^6.2.1":
"tar@npm:^6.1.11, tar@npm:^6.2.0, tar@npm:^6.2.1":
version: 6.2.1
resolution: "tar@npm:6.2.1"
dependencies:
Expand Down Expand Up @@ -9431,7 +9324,7 @@ __metadata:
languageName: node
linkType: hard

"which-typed-array@npm:^1.1.13":
"which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15":
version: 1.1.16
resolution: "which-typed-array@npm:1.1.16"
dependencies:
Expand All @@ -9444,19 +9337,6 @@ __metadata:
languageName: node
linkType: hard

"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15":
version: 1.1.15
resolution: "which-typed-array@npm:1.1.15"
dependencies:
available-typed-arrays: "npm:^1.0.7"
call-bind: "npm:^1.0.7"
for-each: "npm:^0.3.3"
gopd: "npm:^1.0.1"
has-tostringtag: "npm:^1.0.2"
checksum: 10c0/4465d5348c044032032251be54d8988270e69c6b7154f8fcb2a47ff706fe36f7624b3a24246b8d9089435a8f4ec48c1c1025c5d6b499456b9e5eff4f48212983
languageName: node
linkType: hard

"which@npm:^1.3.1":
version: 1.3.1
resolution: "which@npm:1.3.1"
Expand Down

0 comments on commit 33131f4

Please sign in to comment.