fix(vue): ensure standalone has proper lint rule (#19505)

This commit is contained in:
Miroslav Jonaš 2023-10-09 16:08:35 +02:00 committed by GitHub
parent 4aa1201d63
commit c38bd375c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,7 @@ import {
addExtendsToLintConfig,
isEslintConfigSupported,
} from '@nx/linter/src/generators/utils/eslint-file';
import { mapLintPattern } from '@nx/linter/src/generators/lint-project/lint-project';
export async function addLinting(
host: Tree,
@ -33,7 +34,13 @@ export async function addLinting(
joinPathFragments(options.projectRoot, `tsconfig.${projectType}.json`),
],
unitTestRunner: options.unitTestRunner,
eslintFilePatterns: [`${options.projectRoot}/**/*.{ts,tsx,js,jsx,vue}`],
eslintFilePatterns: [
mapLintPattern(
options.projectRoot,
'{ts,tsx,js,jsx,vue}',
options.rootProject
),
],
skipFormat: true,
setParserOptionsProject: options.setParserOptionsProject,
rootProject: options.rootProject,