Skip to content

Commit

Permalink
chore(eslint): allow type annotations (#13920)
Browse files Browse the repository at this point in the history
  • Loading branch information
cunzaizhuyi authored Jul 22, 2023
1 parent 85c38ab commit d1264fd
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion packages/plugin-legacy/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion packages/vite/src/node/packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d1264fd

Please sign in to comment.