Skip to content

Commit be91f38

Browse files
committed
feat: Added typescript-eslint strict rules
1 parent 989a59f commit be91f38

File tree

3 files changed

+43
-6
lines changed

3 files changed

+43
-6
lines changed

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@
3030
},
3131
"devDependencies": {
3232
"@codedependant/semantic-release-docker": "^5.0.3",
33+
"@eslint/js": "^9.5.0",
3334
"@semantic-release/changelog": "^6.0.3",
3435
"@semantic-release/commit-analyzer": "^13.0.0",
3536
"@semantic-release/git": "^10.0.1",
3637
"@semantic-release/github": "^10.0.6",
3738
"@semantic-release/npm": "^12.0.1",
3839
"@semantic-release/release-notes-generator": "^14.0.0",
40+
"@types/eslint__js": "^8.42.3",
3941
"@types/requireindex": "^1.2.4",
4042
"@types/xo": "^0.39.8",
4143
"bun-types": "latest",
@@ -47,6 +49,8 @@
4749
"eslint-plugin-unicorn": "^54.0.0",
4850
"mocha": "^10.4.0",
4951
"npm-run-all": "^4.1.5",
52+
"typescript": "^5.4.5",
53+
"typescript-eslint": "^7.13.0",
5054
"xo": "^0.58.0"
5155
},
5256
"peerDependencies": {

src/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ const requireIndex = require('requireindex');
66

77
const recommended = {
88
plugins: ['th-rules', 'sonarjs'],
9-
extends: ['plugin:sonarjs/recommended-legacy'],
9+
extends: [
10+
'plugin:@typescript-eslint/strict-type-checked',
11+
'plugin:@typescript-eslint/stylistic-type-checked',
12+
'plugin:sonarjs/recommended-legacy',
13+
],
1014
rules: {
1115
'th-rules/no-destructuring': 'error',
1216
'th-rules/no-default-export': 'error',

yarn.lock

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ __metadata:
158158
languageName: node
159159
linkType: hard
160160

161-
"@eslint/js@npm:9.5.0":
161+
"@eslint/js@npm:9.5.0, @eslint/js@npm:^9.5.0":
162162
version: 9.5.0
163163
resolution: "@eslint/js@npm:9.5.0"
164164
checksum: 10c0/dacf51ec2d5b4c8d1315d21a0ff761235d9e39b2391cb945138c58dc512a6c18949c40b644235f5c4fdf5b637ef8f881214acc496dddf46b718529bf22af42ac
@@ -874,6 +874,15 @@ __metadata:
874874
languageName: node
875875
linkType: hard
876876

877+
"@types/eslint__js@npm:^8.42.3":
878+
version: 8.42.3
879+
resolution: "@types/eslint__js@npm:8.42.3"
880+
dependencies:
881+
"@types/eslint": "npm:*"
882+
checksum: 10c0/ccc5180b92155929a089ffb03ed62625216dcd5e46dd3197c6f82370ce8b52c7cb9df66c06b0a3017995409e023bc9eafe5a3f009e391960eacefaa1b62d9a56
883+
languageName: node
884+
linkType: hard
885+
877886
"@types/estree@npm:*, @types/estree@npm:^1.0.5":
878887
version: 1.0.5
879888
resolution: "@types/estree@npm:1.0.5"
@@ -950,7 +959,7 @@ __metadata:
950959
languageName: node
951960
linkType: hard
952961

953-
"@typescript-eslint/eslint-plugin@npm:^7.1.1":
962+
"@typescript-eslint/eslint-plugin@npm:7.13.0, @typescript-eslint/eslint-plugin@npm:^7.1.1":
954963
version: 7.13.0
955964
resolution: "@typescript-eslint/eslint-plugin@npm:7.13.0"
956965
dependencies:
@@ -973,7 +982,7 @@ __metadata:
973982
languageName: node
974983
linkType: hard
975984

976-
"@typescript-eslint/parser@npm:^7.1.1":
985+
"@typescript-eslint/parser@npm:7.13.0, @typescript-eslint/parser@npm:^7.1.1":
977986
version: 7.13.0
978987
resolution: "@typescript-eslint/parser@npm:7.13.0"
979988
dependencies:
@@ -3019,12 +3028,14 @@ __metadata:
30193028
resolution: "eslint-plugin-th-rules@workspace:."
30203029
dependencies:
30213030
"@codedependant/semantic-release-docker": "npm:^5.0.3"
3031+
"@eslint/js": "npm:^9.5.0"
30223032
"@semantic-release/changelog": "npm:^6.0.3"
30233033
"@semantic-release/commit-analyzer": "npm:^13.0.0"
30243034
"@semantic-release/git": "npm:^10.0.1"
30253035
"@semantic-release/github": "npm:^10.0.6"
30263036
"@semantic-release/npm": "npm:^12.0.1"
30273037
"@semantic-release/release-notes-generator": "npm:^14.0.0"
3038+
"@types/eslint__js": "npm:^8.42.3"
30283039
"@types/requireindex": "npm:^1.2.4"
30293040
"@types/xo": "npm:^0.39.8"
30303041
bun-types: "npm:latest"
@@ -3044,6 +3055,8 @@ __metadata:
30443055
mocha: "npm:^10.4.0"
30453056
npm-run-all: "npm:^4.1.5"
30463057
requireindex: "npm:^1.2.0"
3058+
typescript: "npm:^5.4.5"
3059+
typescript-eslint: "npm:^7.13.0"
30473060
xo: "npm:^0.58.0"
30483061
peerDependencies:
30493062
eslint: ">=9.5.0"
@@ -7901,7 +7914,23 @@ __metadata:
79017914
languageName: node
79027915
linkType: hard
79037916

7904-
"typescript@npm:^5.4.2":
7917+
"typescript-eslint@npm:^7.13.0":
7918+
version: 7.13.0
7919+
resolution: "typescript-eslint@npm:7.13.0"
7920+
dependencies:
7921+
"@typescript-eslint/eslint-plugin": "npm:7.13.0"
7922+
"@typescript-eslint/parser": "npm:7.13.0"
7923+
"@typescript-eslint/utils": "npm:7.13.0"
7924+
peerDependencies:
7925+
eslint: ^8.56.0
7926+
peerDependenciesMeta:
7927+
typescript:
7928+
optional: true
7929+
checksum: 10c0/ad067868ede764d411f4933285faca0d41c7e3ca439d7aac032ed78db7703e9842f5bbad4344004fa876a3577cda3c56b0716897f94a0d1aec00a90d6c0d3990
7930+
languageName: node
7931+
linkType: hard
7932+
7933+
"typescript@npm:^5.4.2, typescript@npm:^5.4.5":
79057934
version: 5.4.5
79067935
resolution: "typescript@npm:5.4.5"
79077936
bin:
@@ -7911,7 +7940,7 @@ __metadata:
79117940
languageName: node
79127941
linkType: hard
79137942

7914-
"typescript@patch:typescript@npm%3A^5.4.2#optional!builtin<compat/typescript>":
7943+
"typescript@patch:typescript@npm%3A^5.4.2#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.4.5#optional!builtin<compat/typescript>":
79157944
version: 5.4.5
79167945
resolution: "typescript@patch:typescript@npm%3A5.4.5#optional!builtin<compat/typescript>::version=5.4.5&hash=5adc0c"
79177946
bin:

0 commit comments

Comments
 (0)