Skip to content

Commit 374aa73

Browse files
committed
fix: turn on ts-eslint version of no-unused-vars for ts & vue files
Fixes #14 Fixes vuejs/create-vue#158 Technically turning new rules on would be a breaking change because it introduces more errors in an existing codebase. However, in our README we've already made it clear that this ruleset should only be used with `@vue/cli` or `create-vue`, so an existing `eslint:recommended` config is expected, thus no breaking changes. Nevertheless, I choose to make it `warn` instead of `error` to minimize the impact.
1 parent 75a6bde commit 374aa73

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ module.exports = {
2727

2828
overrides: [
2929
{
30-
files: ['*.ts', '*.tsx'],
30+
files: ['*.ts', '*.tsx', '.vue'],
3131
rules: {
3232
// The core 'no-unused-vars' rules (in the eslint:recommeded ruleset)
3333
// does not work with type definitions
3434
'no-unused-vars': 'off',
35+
'@typescript-eslint/no-unused-vars': 'warn'
3536
}
3637
}
3738
]

0 commit comments

Comments
 (0)