diff --git a/packages/vue/src/utils/add-linting.ts b/packages/vue/src/utils/add-linting.ts index 7d30581e6e034..9ec081169501f 100644 --- a/packages/vue/src/utils/add-linting.ts +++ b/packages/vue/src/utils/add-linting.ts @@ -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,