Skip to content

Commit

Permalink
feat(react): remove standaloneConfig since it does nothing (#16313)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo authored Apr 14, 2023
1 parent c3c77d5 commit 8b48ba9
Show file tree
Hide file tree
Showing 18 changed files with 9 additions and 90 deletions.
6 changes: 0 additions & 6 deletions docs/generated/packages/react/generators/application.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<projectRoot>/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.",
Expand Down
6 changes: 0 additions & 6 deletions docs/generated/packages/react/generators/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <projectRoot>/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",
Expand Down
6 changes: 0 additions & 6 deletions docs/generated/packages/react/generators/library.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<projectRoot>/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.",
Expand Down
6 changes: 0 additions & 6 deletions docs/generated/packages/react/generators/remote.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <projectRoot>/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.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@
"enum": ["eslint"],
"default": "eslint"
},
"standaloneConfig": {
"description": "Split the project configuration into `<projectRoot>/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.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ describe('app', () => {
linter: Linter.EsLint,
style: 'css',
strict: true,
standaloneConfig: false,
};
let mockedInstalledCypressVersion: jest.Mock<
ReturnType<typeof installedCypressVersion>
Expand Down
1 change: 0 additions & 1 deletion packages/react/src/generators/application/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export interface Schema {
globalCss?: boolean;
strict?: boolean;
setParserOptionsProject?: boolean;
standaloneConfig?: boolean;
compiler?: 'babel' | 'swc';
remotes?: string[];
devServerPort?: number;
Expand Down
6 changes: 0 additions & 6 deletions packages/react/src/generators/application/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<projectRoot>/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.",
Expand Down
1 change: 0 additions & 1 deletion packages/react/src/generators/host/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export interface Schema {
skipFormat?: boolean;
skipWorkspaceJson?: boolean;
ssr?: boolean;
standaloneConfig?: boolean;
strict?: boolean;
style: SupportedStyles;
tags?: string;
Expand Down
6 changes: 0 additions & 6 deletions packages/react/src/generators/host/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <projectRoot>/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",
Expand Down
1 change: 0 additions & 1 deletion packages/react/src/generators/library/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export interface Schema {
skipFormat?: boolean;
skipPackageJson?: boolean;
skipTsConfig?: boolean;
standaloneConfig?: boolean;
strict?: boolean;
style: SupportedStyles;
tags?: string;
Expand Down
6 changes: 0 additions & 6 deletions packages/react/src/generators/library/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<projectRoot>/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.",
Expand Down
1 change: 0 additions & 1 deletion packages/react/src/generators/remote/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export interface Schema {
skipFormat: boolean;
skipWorkspaceJson?: boolean;
ssr?: boolean;
standaloneConfig?: boolean;
strict?: boolean;
style: SupportedStyles;
tags?: string;
Expand Down
6 changes: 0 additions & 6 deletions packages/react/src/generators/remote/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <projectRoot>/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.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export interface StorybookConfigureSchema {
tsConfiguration?: boolean;
linter?: Linter;
cypressDirectory?: string;
standaloneConfig?: boolean;
ignorePaths?: string[];
bundler?: 'webpack' | 'vite';
configureTestRunner?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,6 @@
"enum": ["eslint"],
"default": "eslint"
},
"standaloneConfig": {
"description": "Split the project configuration into `<projectRoot>/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.",
Expand Down
32 changes: 9 additions & 23 deletions packages/react/src/utils/testing-generators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,27 @@ 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<any> {
export async function createApp(tree: Tree, appName: string): Promise<any> {
await applicationGenerator(tree, {
e2eTestRunner: 'none',
linter: Linter.EsLint,
skipFormat: true,
style: 'css',
unitTestRunner: 'none',
name: appName,
standaloneConfig,
});
}

export async function createLib(
tree: Tree,
libName: string,
standaloneConfig?: boolean
): Promise<any> {
export async function createLib(tree: Tree, libName: string): Promise<any> {
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: {},
});
}

1 comment on commit 8b48ba9

@vercel
Copy link

@vercel vercel bot commented on 8b48ba9 Apr 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx.dev
nx-dev-nrwl.vercel.app

Please sign in to comment.