Skip to content

Commit

Permalink
feat(eslint): disallow unused vars (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreDemailly authored Jan 4, 2025
1 parent 878e2c4 commit fa184a2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/eslint/src/rules/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ export default {
"no-undefined": "off",

// See: https://eslint.org/docs/rules/no-unused-vars
"no-unused-vars": "off"
"no-unused-vars": ["error", { "ignoreRestSiblings": true }]
};
1 change: 1 addition & 0 deletions src/eslint/test/fixtures/fail.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
const foo = "bar"
console.log(foo);
1 change: 1 addition & 0 deletions src/eslint/test/fixtures/fail.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
const foo: string = "bar"
console.log(foo);
1 change: 1 addition & 0 deletions src/eslint/test/fixtures/pass.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
const foo = "bar";
console.log(foo);
1 change: 1 addition & 0 deletions src/eslint/test/fixtures/pass.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
const foo: string = "bar";
console.log(foo);

0 comments on commit fa184a2

Please sign in to comment.