Skip to content

Commit

Permalink
fix nuxt linting if @nx-plus/vue is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
ZachJW34 authored and BuckyMaler committed Mar 27, 2021
1 parent f242d98 commit dbdfb48
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
9 changes: 9 additions & 0 deletions libs/vue/migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@
"alwaysAddToPackageJson": false
}
}
},
"11.0.0": {
"version": "11.0.0",
"packages": {
"eslint-plugin-vue": {
"version": "^7.8.0",
"alwaysAddToPackageJson": false
}
}
}
}
}
10 changes: 9 additions & 1 deletion libs/vue/src/migrations/update-11.0.0/update-11.0.0.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { chain, Rule } from '@angular-devkit/schematics';
import { addDepsToPackageJson, readWorkspace } from '@nrwl/workspace';
import {
addDepsToPackageJson,
readWorkspace,
updatePackagesInPackageJson,
} from '@nrwl/workspace';
import * as path from 'path';

function deleteExtendInEslintConfig(): Rule {
Expand Down Expand Up @@ -28,6 +32,10 @@ function deleteExtendInEslintConfig(): Rule {

export default function update(): Rule {
return chain([
updatePackagesInPackageJson(
path.join(__dirname, '../../../', 'migrations.json'),
'11.0.0'
),
addDepsToPackageJson({}, { 'eslint-config-prettier': '8.1.0' }),
deleteExtendInEslintConfig(),
]);
Expand Down
2 changes: 1 addition & 1 deletion libs/vue/src/schematics/application/schematic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ export default function (options: ApplicationSchematicSchema): Rule {
? { '@vue/compiler-sfc': '^3.0.0' }
: {}),
'@vue/eslint-config-typescript': '^5.0.2',
'eslint-plugin-vue': normalizedOptions.isVue3 ? '^7.0.0-0' : '^6.2.2',
'eslint-plugin-vue': '^7.8.0',
...(!normalizedOptions.isVue3
? { 'vue-template-compiler': '^2.6.11' }
: {}),
Expand Down
2 changes: 1 addition & 1 deletion libs/vue/src/schematics/library/schematic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export default function (options: LibrarySchematicSchema): Rule {
? { '@vue/compiler-sfc': '^3.0.0' }
: {}),
'@vue/eslint-config-typescript': '^5.0.2',
'eslint-plugin-vue': normalizedOptions.isVue3 ? '^7.0.0-0' : '^6.2.2',
'eslint-plugin-vue': '^7.8.0',
...(!normalizedOptions.isVue3
? { 'vue-template-compiler': '^2.6.11' }
: {}),
Expand Down

0 comments on commit dbdfb48

Please sign in to comment.