Skip to content

Commit

Permalink
fix(linter): add setParserOptionsProject option to generators missing it
Browse files Browse the repository at this point in the history
  • Loading branch information
luxaritas committed Sep 23, 2021
1 parent a61068d commit 3bebde8
Show file tree
Hide file tree
Showing 34 changed files with 184 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/angular/api-angular/generators/application.md
Expand Up @@ -138,6 +138,14 @@ Type: `boolean`

Generate a routing module.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### skipFormat

Default: `false`
Expand Down
8 changes: 8 additions & 0 deletions docs/angular/api-express/generators/application.md
Expand Up @@ -82,6 +82,14 @@ Type: `boolean`

Use pascal case file names.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### skipFormat

Default: `false`
Expand Down
8 changes: 8 additions & 0 deletions docs/angular/api-nest/generators/application.md
Expand Up @@ -56,6 +56,14 @@ Possible values: `eslint`, `none`

The tool to use for running lint checks.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### skipFormat

Default: `false`
Expand Down
8 changes: 8 additions & 0 deletions docs/angular/api-nest/generators/library.md
Expand Up @@ -104,6 +104,14 @@ Type: `boolean`

Include a service with the library.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### skipFormat

Default: `false`
Expand Down
8 changes: 8 additions & 0 deletions docs/angular/api-node/generators/library.md
Expand Up @@ -114,6 +114,14 @@ Type: `string`

Sets the rootDir for TypeScript compilation. When not defined, it uses the project's root property, or srcRootForCompilationRoot if it is defined.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### simpleModuleName

Default: `false`
Expand Down
8 changes: 8 additions & 0 deletions docs/angular/api-nx-plugin/generators/plugin.md
Expand Up @@ -62,6 +62,14 @@ Possible values: `eslint`, `tslint`

The tool to use for running lint checks.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### skipFormat

Default: `false`
Expand Down
8 changes: 8 additions & 0 deletions docs/node/api-angular/generators/application.md
Expand Up @@ -138,6 +138,14 @@ Type: `boolean`

Generate a routing module.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### skipFormat

Default: `false`
Expand Down
8 changes: 8 additions & 0 deletions docs/node/api-express/generators/application.md
Expand Up @@ -82,6 +82,14 @@ Type: `boolean`

Use pascal case file names.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### skipFormat

Default: `false`
Expand Down
8 changes: 8 additions & 0 deletions docs/node/api-nest/generators/application.md
Expand Up @@ -56,6 +56,14 @@ Possible values: `eslint`, `none`

The tool to use for running lint checks.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### skipFormat

Default: `false`
Expand Down
8 changes: 8 additions & 0 deletions docs/node/api-nest/generators/library.md
Expand Up @@ -104,6 +104,14 @@ Type: `boolean`

Include a service with the library.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### skipFormat

Default: `false`
Expand Down
8 changes: 8 additions & 0 deletions docs/node/api-node/generators/library.md
Expand Up @@ -114,6 +114,14 @@ Type: `string`

Sets the rootDir for TypeScript compilation. When not defined, it uses the project's root property, or srcRootForCompilationRoot if it is defined.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### simpleModuleName

Default: `false`
Expand Down
8 changes: 8 additions & 0 deletions docs/node/api-nx-plugin/generators/plugin.md
Expand Up @@ -62,6 +62,14 @@ Possible values: `eslint`, `tslint`

The tool to use for running lint checks.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### skipFormat

Default: `false`
Expand Down
8 changes: 8 additions & 0 deletions docs/react/api-angular/generators/application.md
Expand Up @@ -138,6 +138,14 @@ Type: `boolean`

Generate a routing module.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### skipFormat

Default: `false`
Expand Down
8 changes: 8 additions & 0 deletions docs/react/api-express/generators/application.md
Expand Up @@ -82,6 +82,14 @@ Type: `boolean`

Use pascal case file names.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### skipFormat

Default: `false`
Expand Down
8 changes: 8 additions & 0 deletions docs/react/api-nest/generators/application.md
Expand Up @@ -56,6 +56,14 @@ Possible values: `eslint`, `none`

The tool to use for running lint checks.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### skipFormat

Default: `false`
Expand Down
8 changes: 8 additions & 0 deletions docs/react/api-nest/generators/library.md
Expand Up @@ -104,6 +104,14 @@ Type: `boolean`

Include a service with the library.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### skipFormat

Default: `false`
Expand Down
8 changes: 8 additions & 0 deletions docs/react/api-node/generators/library.md
Expand Up @@ -114,6 +114,14 @@ Type: `string`

Sets the rootDir for TypeScript compilation. When not defined, it uses the project's root property, or srcRootForCompilationRoot if it is defined.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### simpleModuleName

Default: `false`
Expand Down
8 changes: 8 additions & 0 deletions docs/react/api-nx-plugin/generators/plugin.md
Expand Up @@ -62,6 +62,14 @@ Possible values: `eslint`, `tslint`

The tool to use for running lint checks.

### setParserOptionsProject

Default: `false`

Type: `boolean`

Whether or not to configure the ESLint "parserOptions.project" option. We do not do this by default for lint performance reasons.

### skipFormat

Default: `false`
Expand Down
1 change: 1 addition & 0 deletions packages/angular/src/generators/application/lib/add-e2e.ts
Expand Up @@ -58,6 +58,7 @@ export async function addE2e(
joinPathFragments(options.e2eProjectRoot, '**/*.ts'),
],
skipFormat: true,
setParserOptionsProject: options.setParserOptionsProject,
});
}
}
Expand Down
1 change: 1 addition & 0 deletions packages/angular/src/generators/application/schema.d.ts
Expand Up @@ -25,4 +25,5 @@ export interface Schema {
remotes?: string[];
port?: number;
host?: string;
setParserOptionsProject?: boolean;
}
5 changes: 5 additions & 0 deletions packages/angular/src/generators/application/schema.json
Expand Up @@ -150,6 +150,11 @@
"host": {
"type": "string",
"description": "The name of the host application that the remote application will be consumed by."
},
"setParserOptionsProject": {
"type": "boolean",
"description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.",
"default": false
}
},
"required": []
Expand Down
1 change: 1 addition & 0 deletions packages/express/src/generators/application/schema.d.ts
Expand Up @@ -14,4 +14,5 @@ export interface Schema {
js: boolean;
pascalCaseFiles: boolean;
standaloneConfig?: boolean;
setParserOptionsProject?: boolean;
}
5 changes: 5 additions & 0 deletions packages/express/src/generators/application/schema.json
Expand Up @@ -69,6 +69,11 @@
"description": "Split the project configuration into <projectRoot>/project.json rather than including it inside workspace.json",
"type": "boolean",
"default": false
},
"setParserOptionsProject": {
"type": "boolean",
"description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.",
"default": false
}
},
"required": []
Expand Down
Expand Up @@ -38,5 +38,6 @@ export function toNodeApplicationGeneratorOptions(
standaloneConfig: options.standaloneConfig,
tags: options.tags,
unitTestRunner: options.unitTestRunner,
setParserOptionsProject: options.setParserOptionsProject,
};
}
1 change: 1 addition & 0 deletions packages/nest/src/generators/application/schema.d.ts
Expand Up @@ -11,6 +11,7 @@ export interface ApplicationGeneratorOptions {
standaloneConfig?: boolean;
tags?: string;
unitTestRunner?: UnitTestRunner;
setParserOptionsProject?: boolean;
}

interface NormalizedOptions extends ApplicationGeneratorOptions {
Expand Down
5 changes: 5 additions & 0 deletions packages/nest/src/generators/application/schema.json
Expand Up @@ -52,6 +52,11 @@
"description": "Split the project configuration into <projectRoot>/project.json rather than including it inside workspace.json.",
"type": "boolean",
"default": false
},
"setParserOptionsProject": {
"type": "boolean",
"description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.",
"default": false
}
},
"additionalProperties": false,
Expand Down
Expand Up @@ -59,5 +59,6 @@ export function toNodeLibraryGeneratorOptions(
testEnvironment: options.testEnvironment,
unitTestRunner: options.unitTestRunner,
standaloneConfig: options.standaloneConfig,
setParserOptionsProject: options.setParserOptionsProject,
};
}
1 change: 1 addition & 0 deletions packages/nest/src/generators/library/schema.d.ts
Expand Up @@ -28,6 +28,7 @@ export interface LibraryGeneratorOptions {
testEnvironment?: 'jsdom' | 'node';
unitTestRunner?: UnitTestRunner;
standaloneConfig?: boolean;
setParserOptionsProject?: boolean;
}

export interface NormalizedOptions extends LibraryGeneratorOptions {
Expand Down
5 changes: 5 additions & 0 deletions packages/nest/src/generators/library/schema.json
Expand Up @@ -111,6 +111,11 @@
"description": "Split the project configuration into <projectRoot>/project.json rather than including it inside workspace.json",
"type": "boolean",
"default": false
},
"setParserOptionsProject": {
"type": "boolean",
"description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.",
"default": false
}
},
"additionalProperties": false,
Expand Down
1 change: 1 addition & 0 deletions packages/node/src/generators/library/library.ts
Expand Up @@ -40,6 +40,7 @@ export async function libraryGenerator(tree: Tree, schema: Schema) {
importPath: options.importPath,
testEnvironment: 'node',
skipFormat: true,
setParserOptionsProject: options.setParserOptionsProject,
});
createFiles(tree, options);

Expand Down
1 change: 1 addition & 0 deletions packages/node/src/generators/library/schema.d.ts
Expand Up @@ -19,4 +19,5 @@ export interface Schema {
pascalCaseFiles?: boolean;
strict?: boolean;
standaloneConfig?: boolean;
setParserOptionsProject?: boolean;
}
5 changes: 5 additions & 0 deletions packages/node/src/generators/library/schema.json
Expand Up @@ -106,6 +106,11 @@
"description": "Split the project configuration into <projectRoot>/project.json rather than including it inside workspace.json",
"type": "boolean",
"default": false
},
"setParserOptionsProject": {
"type": "boolean",
"description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.",
"default": false
}
},
"required": ["name"]
Expand Down
1 change: 1 addition & 0 deletions packages/nx-plugin/src/generators/plugin/schema.d.ts
Expand Up @@ -10,4 +10,5 @@ export interface Schema {
unitTestRunner: 'jest' | 'none';
linter: Linter;
standaloneConfig?: boolean;
setParserOptionsProject?: boolean;
}

0 comments on commit 3bebde8

Please sign in to comment.