@nx/vue 23.0.0-beta.16 → 23.0.0-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +12 -12
- package/src/utils/add-linting.d.ts.map +1 -1
- package/src/utils/add-linting.js +18 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/vue",
|
|
3
|
-
"version": "23.0.0-beta.
|
|
3
|
+
"version": "23.0.0-beta.17",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Vue plugin for Nx contains executors and generators for managing Vue applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -30,27 +30,27 @@
|
|
|
30
30
|
"migrations": "./migrations.json"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@nx/devkit": "23.0.0-beta.
|
|
34
|
-
"@nx/eslint": "23.0.0-beta.
|
|
35
|
-
"@nx/js": "23.0.0-beta.
|
|
36
|
-
"@nx/vite": "23.0.0-beta.
|
|
37
|
-
"@nx/vitest": "23.0.0-beta.
|
|
38
|
-
"@nx/web": "23.0.0-beta.
|
|
33
|
+
"@nx/devkit": "23.0.0-beta.17",
|
|
34
|
+
"@nx/eslint": "23.0.0-beta.17",
|
|
35
|
+
"@nx/js": "23.0.0-beta.17",
|
|
36
|
+
"@nx/vite": "23.0.0-beta.17",
|
|
37
|
+
"@nx/vitest": "23.0.0-beta.17",
|
|
38
|
+
"@nx/web": "23.0.0-beta.17",
|
|
39
39
|
"picomatch": "4.0.4",
|
|
40
40
|
"semver": "^7.6.3",
|
|
41
41
|
"tslib": "^2.3.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"nx": "23.0.0-beta.
|
|
44
|
+
"nx": "23.0.0-beta.17"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@nx/cypress": "23.0.0-beta.
|
|
51
|
-
"@nx/playwright": "23.0.0-beta.
|
|
52
|
-
"@nx/rsbuild": "23.0.0-beta.
|
|
53
|
-
"@nx/storybook": "23.0.0-beta.
|
|
50
|
+
"@nx/cypress": "23.0.0-beta.17",
|
|
51
|
+
"@nx/playwright": "23.0.0-beta.17",
|
|
52
|
+
"@nx/rsbuild": "23.0.0-beta.17",
|
|
53
|
+
"@nx/storybook": "23.0.0-beta.17"
|
|
54
54
|
},
|
|
55
55
|
"peerDependenciesMeta": {
|
|
56
56
|
"@nx/cypress": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-linting.d.ts","sourceRoot":"","sources":["../../../../../packages/vue/src/utils/add-linting.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAElB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAwB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"add-linting.d.ts","sourceRoot":"","sources":["../../../../../packages/vue/src/utils/add-linting.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAElB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAwB,MAAM,YAAY,CAAC;AActE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAU9C,wBAAsB,UAAU,CAC9B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE;IACP,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACnC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB,EACD,WAAW,EAAE,KAAK,GAAG,KAAK,8BAiE3B"}
|
package/src/utils/add-linting.js
CHANGED
|
@@ -3,9 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.addLinting = addLinting;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const eslint_1 = require("@nx/eslint");
|
|
6
|
-
const
|
|
7
|
-
const flat_config_1 = require("@nx/eslint/src/utils/flat-config");
|
|
8
|
-
const version_utils_1 = require("@nx/eslint/src/utils/version-utils");
|
|
6
|
+
const internal_1 = require("@nx/eslint/internal");
|
|
9
7
|
const path_1 = require("nx/src/utils/path");
|
|
10
8
|
const versions_1 = require("./versions");
|
|
11
9
|
const semver_1 = require("semver");
|
|
@@ -25,10 +23,10 @@ async function addLinting(host, options, projectType) {
|
|
|
25
23
|
addPlugin: options.addPlugin,
|
|
26
24
|
});
|
|
27
25
|
tasks.push(lintTask);
|
|
28
|
-
if ((0,
|
|
26
|
+
if ((0, internal_1.useFlatConfig)(host)) {
|
|
29
27
|
}
|
|
30
28
|
else {
|
|
31
|
-
const addExtendsTask = (0,
|
|
29
|
+
const addExtendsTask = (0, internal_1.addExtendsToLintConfig)(host, options.projectRoot, [
|
|
32
30
|
'plugin:vue/vue3-essential',
|
|
33
31
|
'eslint:recommended',
|
|
34
32
|
'@vue/eslint-config-typescript',
|
|
@@ -37,7 +35,7 @@ async function addLinting(host, options, projectType) {
|
|
|
37
35
|
tasks.push(addExtendsTask);
|
|
38
36
|
}
|
|
39
37
|
editEslintConfigFiles(host, options.projectRoot);
|
|
40
|
-
const eslintVersion = (0,
|
|
38
|
+
const eslintVersion = (0, internal_1.getInstalledEslintVersion)(host);
|
|
41
39
|
const devDependencies = {
|
|
42
40
|
'@vue/eslint-config-prettier': versions_1.vueEslintConfigPrettierVersion,
|
|
43
41
|
'@vue/eslint-config-typescript': eslintVersion && (0, semver_1.lt)(eslintVersion, '9.0.0')
|
|
@@ -45,10 +43,10 @@ async function addLinting(host, options, projectType) {
|
|
|
45
43
|
: versions_1.eslint9__VueEslintConfigTypescriptVersion,
|
|
46
44
|
'eslint-plugin-vue': versions_1.eslintPluginVueVersion,
|
|
47
45
|
};
|
|
48
|
-
if ((0,
|
|
49
|
-
(0,
|
|
46
|
+
if ((0, internal_1.isEslintConfigSupported)(host, options.projectRoot) &&
|
|
47
|
+
(0, internal_1.useFlatConfig)(host)) {
|
|
50
48
|
devDependencies['@typescript-eslint/parser'] =
|
|
51
|
-
(0,
|
|
49
|
+
(0, internal_1.getTypeScriptEslintVersionToInstall)(host);
|
|
52
50
|
}
|
|
53
51
|
if (!options.skipPackageJson) {
|
|
54
52
|
const installTask = (0, devkit_1.addDependenciesToPackageJson)(host, {}, devDependencies);
|
|
@@ -76,11 +74,11 @@ function editEslintConfigFiles(tree, projectRoot) {
|
|
|
76
74
|
o.files = [o.files, '*.vue'];
|
|
77
75
|
}
|
|
78
76
|
};
|
|
79
|
-
if ((0,
|
|
80
|
-
if ((0,
|
|
81
|
-
(0,
|
|
77
|
+
if ((0, internal_1.isEslintConfigSupported)(tree, projectRoot)) {
|
|
78
|
+
if ((0, internal_1.useFlatConfig)(tree)) {
|
|
79
|
+
(0, internal_1.addPredefinedConfigToFlatLintConfig)(tree, projectRoot, 'flat/recommended', { moduleName: 'vue', moduleImportPath: 'eslint-plugin-vue' });
|
|
82
80
|
// This allows .vue files to be parsed
|
|
83
|
-
(0,
|
|
81
|
+
(0, internal_1.addOverrideToLintConfig)(tree, projectRoot, {
|
|
84
82
|
files: ['**/*.vue'],
|
|
85
83
|
languageOptions: {
|
|
86
84
|
parserOptions: {
|
|
@@ -90,20 +88,20 @@ function editEslintConfigFiles(tree, projectRoot) {
|
|
|
90
88
|
} // languageOptions is not present on eslintrc override, but it is for flat config
|
|
91
89
|
);
|
|
92
90
|
// Add an empty rules object to users know how to add/override rules
|
|
93
|
-
(0,
|
|
91
|
+
(0, internal_1.addOverrideToLintConfig)(tree, projectRoot, {
|
|
94
92
|
files: ['*.ts', '*.tsx', '*.js', '*.jsx', '*.vue'],
|
|
95
93
|
rules: { 'vue/multi-word-component-names': 'off' },
|
|
96
94
|
});
|
|
97
95
|
}
|
|
98
96
|
else {
|
|
99
|
-
if ((0,
|
|
100
|
-
(0,
|
|
97
|
+
if ((0, internal_1.lintConfigHasOverride)(tree, projectRoot, (o) => o.parserOptions && !hasVueFiles(o), true)) {
|
|
98
|
+
(0, internal_1.updateOverrideInLintConfig)(tree, projectRoot, (o) => !!o.parserOptions, (o) => {
|
|
101
99
|
addVueFiles(o);
|
|
102
100
|
return o;
|
|
103
101
|
});
|
|
104
102
|
}
|
|
105
103
|
else {
|
|
106
|
-
(0,
|
|
104
|
+
(0, internal_1.replaceOverridesInLintConfig)(tree, projectRoot, [
|
|
107
105
|
{
|
|
108
106
|
files: ['*.ts', '*.tsx', '*.js', '*.jsx', '*.vue'],
|
|
109
107
|
rules: { 'vue/multi-word-component-names': 'off' },
|
|
@@ -113,11 +111,11 @@ function editEslintConfigFiles(tree, projectRoot) {
|
|
|
113
111
|
}
|
|
114
112
|
}
|
|
115
113
|
// Edit root config too
|
|
116
|
-
if (!(0,
|
|
114
|
+
if (!(0, internal_1.isEslintConfigSupported)(tree)) {
|
|
117
115
|
return;
|
|
118
116
|
}
|
|
119
|
-
if ((0,
|
|
120
|
-
(0,
|
|
117
|
+
if ((0, internal_1.lintConfigHasOverride)(tree, '', (o) => o.rules?.['@nx/enforce-module-boundaries'] && !hasVueFiles(o), true)) {
|
|
118
|
+
(0, internal_1.updateOverrideInLintConfig)(tree, '', (o) => !!o.rules?.['@nx/enforce-module-boundaries'], (o) => {
|
|
121
119
|
addVueFiles(o);
|
|
122
120
|
return o;
|
|
123
121
|
});
|