mirror of
https://github.com/vitejs/vite.git
synced 2024-11-21 22:59:10 +00:00
chore(eslint): allow type annotations (#13920)
This commit is contained in:
parent
85c38abda0
commit
d1264fd343
@ -77,7 +77,7 @@ module.exports = defineConfig({
|
||||
'@typescript-eslint/no-var-requires': 'off',
|
||||
'@typescript-eslint/consistent-type-imports': [
|
||||
'error',
|
||||
{ prefer: 'type-imports' },
|
||||
{ prefer: 'type-imports', disallowTypeAnnotations: false },
|
||||
],
|
||||
// disable rules set in @typescript-eslint/stylistic v6 that wasn't set in @typescript-eslint/recommended v5 and which conflict with current code
|
||||
// maybe we should turn them on in a new PR
|
||||
|
@ -36,7 +36,6 @@ import {
|
||||
} from './snippets'
|
||||
|
||||
// lazy load babel since it's not used during dev
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
||||
let babel: typeof import('@babel/core') | undefined
|
||||
async function loadBabel() {
|
||||
if (!babel) {
|
||||
|
@ -4,7 +4,6 @@ import { createRequire } from 'node:module'
|
||||
import { createFilter, isInNodeModules, safeRealpathSync } from './utils'
|
||||
import type { Plugin } from './plugin'
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
||||
let pnp: typeof import('pnpapi') | undefined
|
||||
if (process.versions.pnp) {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user