chore(eslint): allow type annotations (#13920)

This commit is contained in:
cunzaizhuyi 2023-07-22 17:37:17 +08:00 committed by GitHub
parent 85c38abda0
commit d1264fd343
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 3 deletions

View File

@ -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

View File

@ -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) {

View File

@ -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 {