Skip to content

Commit 5cfa3cb

Browse files
committed
fix: turn off no-unused-vars for TypeScript
1 parent ddf11f8 commit 5cfa3cb

File tree

3 files changed

+76
-68
lines changed

3 files changed

+76
-68
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
},
2222
"prettier": "prettier-config-atomic",
2323
"dependencies": {
24-
"@babel/core": "^7.21.8",
24+
"@babel/core": "^7.22.1",
2525
"@babel/eslint-parser": "^7.21.8",
2626
"@babel/plugin-syntax-flow": "^7.21.4",
2727
"@babel/plugin-syntax-jsx": "^7.21.4",
@@ -44,7 +44,7 @@
4444
"typescript": "^5.0.4"
4545
},
4646
"devDependencies": {
47-
"@types/node": "^20.2.3",
47+
"@types/node": "^20.2.5",
4848
"@types/semver": "^7.5.0",
4949
"execa": "^5.1.1",
5050
"gitly": "^2.4.2",

pnpm-lock.yaml

Lines changed: 69 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/typescript.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ if (!projectedBasedRules) {
1313
)
1414
}
1515

16+
// turn-off no-unused-vars for typescript files
17+
const typeScriptEslintExtra = { ...eslintRulesExtra }
18+
typeScriptEslintExtra["no-unused-vars"] = "off"
19+
1620
const pluginTypeScriptRulesExtra = {
1721
"@typescript-eslint/no-unused-vars": [
1822
"error",
@@ -76,7 +80,7 @@ exports.tsConfig = {
7680
"prettier",
7781
],
7882
rules: {
79-
...eslintRulesExtra,
83+
...typeScriptEslintExtra,
8084
...pluginTypeScriptRulesExtra,
8185
...pluginTypeScriptProjectRules,
8286
...pluginNodeRules,

0 commit comments

Comments
 (0)