From 8b48ba9ac25ce15adec257a92c05c570ed8fa5a2 Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Fri, 14 Apr 2023 13:56:57 -0400 Subject: [PATCH] feat(react): remove standaloneConfig since it does nothing (#16313) --- .../react/generators/application.json | 6 ---- .../packages/react/generators/host.json | 6 ---- .../packages/react/generators/library.json | 6 ---- .../packages/react/generators/remote.json | 6 ---- .../generators/storybook-configuration.json | 6 ---- .../application/application.spec.ts | 1 - .../src/generators/application/schema.d.ts | 1 - .../src/generators/application/schema.json | 6 ---- .../react/src/generators/host/schema.d.ts | 1 - .../react/src/generators/host/schema.json | 6 ---- .../react/src/generators/library/schema.d.ts | 1 - .../react/src/generators/library/schema.json | 6 ---- .../react/src/generators/remote/schema.d.ts | 1 - .../react/src/generators/remote/schema.json | 6 ---- .../storybook-configuration/configuration.ts | 1 - .../storybook-configuration/schema.d.ts | 1 - .../storybook-configuration/schema.json | 6 ---- .../react/src/utils/testing-generators.ts | 32 ++++++------------- 18 files changed, 9 insertions(+), 90 deletions(-) diff --git a/docs/generated/packages/react/generators/application.json b/docs/generated/packages/react/generators/application.json index a2918ea2f81d6..b3c1dcd22e714 100644 --- a/docs/generated/packages/react/generators/application.json +++ b/docs/generated/packages/react/generators/application.json @@ -153,12 +153,6 @@ "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", "default": false }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean", - "default": true, - "x-deprecated": "Nx only supports standaloneConfig" - }, "compiler": { "type": "string", "description": "The compiler to use.", diff --git a/docs/generated/packages/react/generators/host.json b/docs/generated/packages/react/generators/host.json index c1542af4b1c0b..3e6ef743992e1 100644 --- a/docs/generated/packages/react/generators/host.json +++ b/docs/generated/packages/react/generators/host.json @@ -128,12 +128,6 @@ "description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.", "default": false }, - "standaloneConfig": { - "description": "Split the project configuration into /project.json rather than including it inside workspace.json", - "type": "boolean", - "default": true, - "x-deprecated": "Nx only supports standaloneConfig" - }, "compiler": { "type": "string", "description": "The compiler to use", diff --git a/docs/generated/packages/react/generators/library.json b/docs/generated/packages/react/generators/library.json index 0a8c7c55c8fc6..21f89bdf1616f 100644 --- a/docs/generated/packages/react/generators/library.json +++ b/docs/generated/packages/react/generators/library.json @@ -159,12 +159,6 @@ "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", "default": false }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean", - "default": true, - "x-deprecated": "Nx only supports standaloneConfig" - }, "bundler": { "type": "string", "description": "The bundler to use. Choosing 'none' means this library is not buildable.", diff --git a/docs/generated/packages/react/generators/remote.json b/docs/generated/packages/react/generators/remote.json index 62acbdd29558a..cd99a9e0f414a 100644 --- a/docs/generated/packages/react/generators/remote.json +++ b/docs/generated/packages/react/generators/remote.json @@ -133,12 +133,6 @@ "description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.", "default": false }, - "standaloneConfig": { - "description": "Split the project configuration into /project.json rather than including it inside workspace.json", - "type": "boolean", - "default": true, - "x-deprecated": "Nx only supports standaloneConfig" - }, "compiler": { "type": "string", "description": "The compiler to use.", diff --git a/docs/generated/packages/react/generators/storybook-configuration.json b/docs/generated/packages/react/generators/storybook-configuration.json index da74a8b3006db..561d62618d2b7 100644 --- a/docs/generated/packages/react/generators/storybook-configuration.json +++ b/docs/generated/packages/react/generators/storybook-configuration.json @@ -66,12 +66,6 @@ "enum": ["eslint"], "default": "eslint" }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean", - "default": true, - "x-deprecated": "Nx only supports standaloneConfig" - }, "ignorePaths": { "type": "array", "description": "Paths to ignore when looking for components.", diff --git a/packages/react/src/generators/application/application.spec.ts b/packages/react/src/generators/application/application.spec.ts index 6604a74c47ee6..cc95017942bad 100644 --- a/packages/react/src/generators/application/application.spec.ts +++ b/packages/react/src/generators/application/application.spec.ts @@ -24,7 +24,6 @@ describe('app', () => { linter: Linter.EsLint, style: 'css', strict: true, - standaloneConfig: false, }; let mockedInstalledCypressVersion: jest.Mock< ReturnType diff --git a/packages/react/src/generators/application/schema.d.ts b/packages/react/src/generators/application/schema.d.ts index 883bb4c0dfc4f..53586f8b196f8 100644 --- a/packages/react/src/generators/application/schema.d.ts +++ b/packages/react/src/generators/application/schema.d.ts @@ -23,7 +23,6 @@ export interface Schema { globalCss?: boolean; strict?: boolean; setParserOptionsProject?: boolean; - standaloneConfig?: boolean; compiler?: 'babel' | 'swc'; remotes?: string[]; devServerPort?: number; diff --git a/packages/react/src/generators/application/schema.json b/packages/react/src/generators/application/schema.json index a97c894cb317d..73e6e573b8624 100644 --- a/packages/react/src/generators/application/schema.json +++ b/packages/react/src/generators/application/schema.json @@ -159,12 +159,6 @@ "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", "default": false }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean", - "default": true, - "x-deprecated": "Nx only supports standaloneConfig" - }, "compiler": { "type": "string", "description": "The compiler to use.", diff --git a/packages/react/src/generators/host/schema.d.ts b/packages/react/src/generators/host/schema.d.ts index c43a7f9418272..b109f622bfd91 100644 --- a/packages/react/src/generators/host/schema.d.ts +++ b/packages/react/src/generators/host/schema.d.ts @@ -17,7 +17,6 @@ export interface Schema { skipFormat?: boolean; skipWorkspaceJson?: boolean; ssr?: boolean; - standaloneConfig?: boolean; strict?: boolean; style: SupportedStyles; tags?: string; diff --git a/packages/react/src/generators/host/schema.json b/packages/react/src/generators/host/schema.json index 8a778a46f8383..628dcc0920164 100644 --- a/packages/react/src/generators/host/schema.json +++ b/packages/react/src/generators/host/schema.json @@ -134,12 +134,6 @@ "description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.", "default": false }, - "standaloneConfig": { - "description": "Split the project configuration into /project.json rather than including it inside workspace.json", - "type": "boolean", - "default": true, - "x-deprecated": "Nx only supports standaloneConfig" - }, "compiler": { "type": "string", "description": "The compiler to use", diff --git a/packages/react/src/generators/library/schema.d.ts b/packages/react/src/generators/library/schema.d.ts index 1633b34d17bda..507ea0f489803 100644 --- a/packages/react/src/generators/library/schema.d.ts +++ b/packages/react/src/generators/library/schema.d.ts @@ -21,7 +21,6 @@ export interface Schema { skipFormat?: boolean; skipPackageJson?: boolean; skipTsConfig?: boolean; - standaloneConfig?: boolean; strict?: boolean; style: SupportedStyles; tags?: string; diff --git a/packages/react/src/generators/library/schema.json b/packages/react/src/generators/library/schema.json index 2cca03128b2b6..b8cea3a24e060 100644 --- a/packages/react/src/generators/library/schema.json +++ b/packages/react/src/generators/library/schema.json @@ -162,12 +162,6 @@ "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.", "default": false }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean", - "default": true, - "x-deprecated": "Nx only supports standaloneConfig" - }, "bundler": { "type": "string", "description": "The bundler to use. Choosing 'none' means this library is not buildable.", diff --git a/packages/react/src/generators/remote/schema.d.ts b/packages/react/src/generators/remote/schema.d.ts index 852260e787267..4c5eb8c8820a5 100644 --- a/packages/react/src/generators/remote/schema.d.ts +++ b/packages/react/src/generators/remote/schema.d.ts @@ -19,7 +19,6 @@ export interface Schema { skipFormat: boolean; skipWorkspaceJson?: boolean; ssr?: boolean; - standaloneConfig?: boolean; strict?: boolean; style: SupportedStyles; tags?: string; diff --git a/packages/react/src/generators/remote/schema.json b/packages/react/src/generators/remote/schema.json index a410a547b326a..7e8b9acb9b4fa 100644 --- a/packages/react/src/generators/remote/schema.json +++ b/packages/react/src/generators/remote/schema.json @@ -139,12 +139,6 @@ "description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.", "default": false }, - "standaloneConfig": { - "description": "Split the project configuration into /project.json rather than including it inside workspace.json", - "type": "boolean", - "default": true, - "x-deprecated": "Nx only supports standaloneConfig" - }, "compiler": { "type": "string", "description": "The compiler to use.", diff --git a/packages/react/src/generators/storybook-configuration/configuration.ts b/packages/react/src/generators/storybook-configuration/configuration.ts index 8aafdd192156a..9ddb6bc3b2042 100644 --- a/packages/react/src/generators/storybook-configuration/configuration.ts +++ b/packages/react/src/generators/storybook-configuration/configuration.ts @@ -62,7 +62,6 @@ export async function storybookConfigurationGenerator( js: schema.js, linter: schema.linter, cypressDirectory: schema.cypressDirectory, - standaloneConfig: schema.standaloneConfig, tsConfiguration: schema.tsConfiguration, configureTestRunner: schema.configureTestRunner, configureStaticServe: schema.configureStaticServe, diff --git a/packages/react/src/generators/storybook-configuration/schema.d.ts b/packages/react/src/generators/storybook-configuration/schema.d.ts index ebb38ada921b4..71129cbc948fd 100644 --- a/packages/react/src/generators/storybook-configuration/schema.d.ts +++ b/packages/react/src/generators/storybook-configuration/schema.d.ts @@ -9,7 +9,6 @@ export interface StorybookConfigureSchema { tsConfiguration?: boolean; linter?: Linter; cypressDirectory?: string; - standaloneConfig?: boolean; ignorePaths?: string[]; bundler?: 'webpack' | 'vite'; configureTestRunner?: boolean; diff --git a/packages/react/src/generators/storybook-configuration/schema.json b/packages/react/src/generators/storybook-configuration/schema.json index a5d7af41925ce..9079e8cd4a427 100644 --- a/packages/react/src/generators/storybook-configuration/schema.json +++ b/packages/react/src/generators/storybook-configuration/schema.json @@ -66,12 +66,6 @@ "enum": ["eslint"], "default": "eslint" }, - "standaloneConfig": { - "description": "Split the project configuration into `/project.json` rather than including it inside `workspace.json`.", - "type": "boolean", - "default": true, - "x-deprecated": "Nx only supports standaloneConfig" - }, "ignorePaths": { "type": "array", "description": "Paths to ignore when looking for components.", diff --git a/packages/react/src/utils/testing-generators.ts b/packages/react/src/utils/testing-generators.ts index 34112cb060493..69abd898992ad 100644 --- a/packages/react/src/utils/testing-generators.ts +++ b/packages/react/src/utils/testing-generators.ts @@ -2,11 +2,7 @@ import { addProjectConfiguration, names, Tree } from '@nrwl/devkit'; import applicationGenerator from '../generators/application/application'; import { Linter } from '@nrwl/linter'; -export async function createApp( - tree: Tree, - appName: string, - standaloneConfig?: boolean -): Promise { +export async function createApp(tree: Tree, appName: string): Promise { await applicationGenerator(tree, { e2eTestRunner: 'none', linter: Linter.EsLint, @@ -14,29 +10,19 @@ export async function createApp( style: 'css', unitTestRunner: 'none', name: appName, - standaloneConfig, }); } -export async function createLib( - tree: Tree, - libName: string, - standaloneConfig?: boolean -): Promise { +export async function createLib(tree: Tree, libName: string): Promise { const { fileName } = names(libName); tree.write(`/libs/${fileName}/src/index.ts`, `import React from 'react';\n`); - addProjectConfiguration( - tree, - fileName, - { - tags: [], - root: `libs/${fileName}`, - projectType: 'library', - sourceRoot: `libs/${fileName}/src`, - targets: {}, - }, - standaloneConfig - ); + addProjectConfiguration(tree, fileName, { + tags: [], + root: `libs/${fileName}`, + projectType: 'library', + sourceRoot: `libs/${fileName}/src`, + targets: {}, + }); }