@nx/web 23.2.0-beta.1 → 23.2.0-beta.3
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.
|
@@ -213,8 +213,13 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
213
213
|
await setupBundler(host, options);
|
|
214
214
|
}
|
|
215
215
|
createApplicationFiles(host, options);
|
|
216
|
+
let enableTypedLinting = false;
|
|
216
217
|
if (options.linter === 'eslint') {
|
|
217
218
|
const { lintProjectGenerator } = (0, devkit_1.ensurePackage)('@nx/eslint', versions_1.nxVersion);
|
|
219
|
+
// CommonJS `require` instead of dynamic ESM `import`: `ensurePackage`
|
|
220
|
+
// exposes the temp install via `Module._initPaths`, which ESM ignores.
|
|
221
|
+
const { isTypedLintingEnabled, addIgnoresToLintConfig, } = require('@nx/eslint/internal');
|
|
222
|
+
enableTypedLinting = isTypedLintingEnabled(options);
|
|
218
223
|
const lintTask = await lintProjectGenerator(host, {
|
|
219
224
|
linter: options.linter,
|
|
220
225
|
project: options.projectName,
|
|
@@ -223,15 +228,12 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
223
228
|
],
|
|
224
229
|
unitTestRunner: options.unitTestRunner,
|
|
225
230
|
skipFormat: true,
|
|
226
|
-
|
|
231
|
+
enableTypedLinting,
|
|
227
232
|
addPlugin: options.addPlugin,
|
|
228
233
|
});
|
|
229
234
|
tasks.push(lintTask);
|
|
230
235
|
// Add out-tsc ignore pattern when using TS solution setup
|
|
231
236
|
if (options.isUsingTsSolutionConfig) {
|
|
232
|
-
// CommonJS `require` instead of dynamic ESM `import` — `ensurePackage`
|
|
233
|
-
// exposes the temp install via `Module._initPaths`, which ESM ignores.
|
|
234
|
-
const { addIgnoresToLintConfig, } = require('@nx/eslint/internal');
|
|
235
237
|
addIgnoresToLintConfig(host, options.appProjectRoot, ['**/out-tsc']);
|
|
236
238
|
}
|
|
237
239
|
}
|
|
@@ -263,7 +265,7 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
263
265
|
if (options.bundler !== 'vite' && options.unitTestRunner === 'vitest') {
|
|
264
266
|
const { createOrEditViteConfig } = (0, devkit_1.ensurePackage)('@nx/vite', versions_1.nxVersion);
|
|
265
267
|
(0, devkit_1.ensurePackage)('@nx/vitest', versions_1.nxVersion);
|
|
266
|
-
// CommonJS `require` instead of dynamic ESM `import
|
|
268
|
+
// CommonJS `require` instead of dynamic ESM `import`: `ensurePackage`
|
|
267
269
|
// exposes the temp install via `Module._initPaths`, which ESM ignores.
|
|
268
270
|
const { configurationGenerator, } = require('@nx/vitest/generators');
|
|
269
271
|
const vitestTask = await configurationGenerator(host, {
|
|
@@ -351,6 +353,7 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
351
353
|
baseUrl: e2eWebServerInfo.e2eWebServerAddress,
|
|
352
354
|
directory: 'src',
|
|
353
355
|
skipFormat: true,
|
|
356
|
+
enableTypedLinting,
|
|
354
357
|
webServerCommands: {
|
|
355
358
|
default: e2eWebServerInfo.e2eWebServerCommand,
|
|
356
359
|
production: e2eWebServerInfo.e2eCiWebServerCommand,
|
|
@@ -392,7 +395,7 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
392
395
|
directory: 'src',
|
|
393
396
|
js: false,
|
|
394
397
|
linter: options.linter,
|
|
395
|
-
|
|
398
|
+
enableTypedLinting,
|
|
396
399
|
webServerCommand: e2eWebServerInfo.e2eCiWebServerCommand,
|
|
397
400
|
webServerAddress: e2eWebServerInfo.e2eCiBaseUrl,
|
|
398
401
|
addPlugin: options.addPlugin,
|
|
@@ -13,6 +13,10 @@ export interface Schema {
|
|
|
13
13
|
inSourceTests?: boolean;
|
|
14
14
|
e2eTestRunner?: 'cypress' | 'playwright' | 'none';
|
|
15
15
|
linter?: Linter | LinterType;
|
|
16
|
+
enableTypedLinting?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Use `enableTypedLinting` instead. This option will be removed in Nx v24.
|
|
19
|
+
*/
|
|
16
20
|
setParserOptionsProject?: boolean;
|
|
17
21
|
strict?: boolean;
|
|
18
22
|
addPlugin?: boolean;
|
|
@@ -92,11 +92,17 @@
|
|
|
92
92
|
"type": "string",
|
|
93
93
|
"description": "Add tags to the application (used for linting)"
|
|
94
94
|
},
|
|
95
|
-
"
|
|
95
|
+
"enableTypedLinting": {
|
|
96
96
|
"type": "boolean",
|
|
97
|
-
"description": "Whether
|
|
97
|
+
"description": "Whether to enable typed linting. For flat configs, this configures the recommended `parserOptions.projectService` and `tsconfigRootDir`. For legacy `.eslintrc` configs, this configures `parserOptions.project`. We do not enable this by default for lint performance reasons.",
|
|
98
98
|
"default": false
|
|
99
99
|
},
|
|
100
|
+
"setParserOptionsProject": {
|
|
101
|
+
"type": "boolean",
|
|
102
|
+
"description": "Deprecated alias for `enableTypedLinting`.",
|
|
103
|
+
"default": false,
|
|
104
|
+
"x-deprecated": "Use `enableTypedLinting` instead. This option will be removed in Nx v24."
|
|
105
|
+
},
|
|
100
106
|
"strict": {
|
|
101
107
|
"type": "boolean",
|
|
102
108
|
"description": "Creates an application with strict mode and strict type checking.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/web",
|
|
3
|
-
"version": "23.2.0-beta.
|
|
3
|
+
"version": "23.2.0-beta.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
@@ -79,20 +79,20 @@
|
|
|
79
79
|
"http-server": "^14.1.0",
|
|
80
80
|
"picocolors": "^1.1.0",
|
|
81
81
|
"tslib": "^2.3.0",
|
|
82
|
-
"@nx/devkit": "23.2.0-beta.
|
|
83
|
-
"@nx/js": "23.2.0-beta.
|
|
82
|
+
"@nx/devkit": "23.2.0-beta.3",
|
|
83
|
+
"@nx/js": "23.2.0-beta.3"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"nx": "23.2.0-beta.
|
|
87
|
-
"@nx/vitest": "23.2.0-beta.
|
|
86
|
+
"nx": "23.2.0-beta.3",
|
|
87
|
+
"@nx/vitest": "23.2.0-beta.3"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
|
-
"@nx/cypress": "23.2.0-beta.
|
|
91
|
-
"@nx/eslint": "23.2.0-beta.
|
|
92
|
-
"@nx/playwright": "23.2.0-beta.
|
|
93
|
-
"@nx/webpack": "23.2.0-beta.
|
|
94
|
-
"@nx/
|
|
95
|
-
"@nx/
|
|
90
|
+
"@nx/cypress": "23.2.0-beta.3",
|
|
91
|
+
"@nx/eslint": "23.2.0-beta.3",
|
|
92
|
+
"@nx/playwright": "23.2.0-beta.3",
|
|
93
|
+
"@nx/webpack": "23.2.0-beta.3",
|
|
94
|
+
"@nx/vite": "23.2.0-beta.3",
|
|
95
|
+
"@nx/jest": "23.2.0-beta.3"
|
|
96
96
|
},
|
|
97
97
|
"peerDependenciesMeta": {
|
|
98
98
|
"@nx/cypress": {
|