Skip to content

Commit d1264fd

Browse files
authoredJul 22, 2023
chore(eslint): allow type annotations (#13920)
1 parent 85c38ab commit d1264fd

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed
 

‎.eslintrc.cjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ module.exports = defineConfig({
7777
'@typescript-eslint/no-var-requires': 'off',
7878
'@typescript-eslint/consistent-type-imports': [
7979
'error',
80-
{ prefer: 'type-imports' },
80+
{ prefer: 'type-imports', disallowTypeAnnotations: false },
8181
],
8282
// disable rules set in @typescript-eslint/stylistic v6 that wasn't set in @typescript-eslint/recommended v5 and which conflict with current code
8383
// maybe we should turn them on in a new PR

‎packages/plugin-legacy/src/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import {
3636
} from './snippets'
3737

3838
// lazy load babel since it's not used during dev
39-
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
4039
let babel: typeof import('@babel/core') | undefined
4140
async function loadBabel() {
4241
if (!babel) {

‎packages/vite/src/node/packages.ts

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { createRequire } from 'node:module'
44
import { createFilter, isInNodeModules, safeRealpathSync } from './utils'
55
import type { Plugin } from './plugin'
66

7-
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
87
let pnp: typeof import('pnpapi') | undefined
98
if (process.versions.pnp) {
109
try {

0 commit comments

Comments
 (0)
Please sign in to comment.