Skip to content

Commit 9a99bc4

Browse files
authored
chore: enable reportUnusedDisableDirectives (#8384)
1 parent f6bd317 commit 9a99bc4

File tree

5 files changed

+3
-7
lines changed

5 files changed

+3
-7
lines changed

Diff for: .eslintrc.cjs

+2-1
Original file line numberDiff line numberDiff line change
@@ -159,5 +159,6 @@ module.exports = defineConfig({
159159
'no-restricted-globals': ['error', 'require', '__dirname', '__filename']
160160
}
161161
}
162-
]
162+
],
163+
reportUnusedDisableDirectives: true
163164
})

Diff for: packages/plugin-vue/src/template.ts

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ export async function transformTemplateAsModule(
4242
/**
4343
* transform the template directly in the main SFC module
4444
*/
45-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
4645
export function transformTemplateInMain(
4746
code: string,
4847
descriptor: SFCDescriptor,

Diff for: packages/vite/src/node/__tests__/plugins/importGlob/fixture-a/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import '../../../../../../types/importMeta'
22

3-
/* eslint-disable @typescript-eslint/comma-dangle */
43
export interface ModuleType {
54
name: string
65
}

Diff for: packages/vite/src/node/__tests__/plugins/importGlob/parse.test.ts

-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ describe('parse negatives', async () => {
269269
})
270270

271271
it('template', async () => {
272-
// eslint-disable-next-line no-template-curly-in-string
273272
expect(
274273
await runError('import.meta.glob(`hi ${hey}`)')
275274
).toMatchInlineSnapshot(

Diff for: packages/vite/src/node/plugins/css.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ import colors from 'picocolors'
1616
import MagicString from 'magic-string'
1717
import type * as PostCSS from 'postcss'
1818
import type Sass from 'sass'
19-
// We need to disable check of extraneous import which is buggy for stylus,
20-
// and causes the CI tests fail, see: https://github.com/vitejs/vite/pull/2860
21-
import type Stylus from 'stylus' // eslint-disable-line node/no-extraneous-import
19+
import type Stylus from 'stylus'
2220
import type Less from 'less'
2321
import type { Alias } from 'types/alias'
2422
import { formatMessages, transform } from 'esbuild'

0 commit comments

Comments
 (0)