@nx/angular 0.0.0-pr-27404-9b7456c → 0.0.0-pr-27809-4160bae
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/angular",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-27809-4160bae",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, Playwright and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
72
|
-
"@typescript-eslint/type-utils": "^
|
|
72
|
+
"@typescript-eslint/type-utils": "^7.16.0",
|
|
73
73
|
"chalk": "^4.1.0",
|
|
74
74
|
"find-cache-dir": "^3.3.2",
|
|
75
75
|
"magic-string": "~0.30.2",
|
|
@@ -79,14 +79,14 @@
|
|
|
79
79
|
"webpack-merge": "^5.8.0",
|
|
80
80
|
"webpack": "^5.88.0",
|
|
81
81
|
"@module-federation/enhanced": "~0.6.0",
|
|
82
|
-
"@nx/devkit": "0.0.0-pr-
|
|
83
|
-
"@nx/js": "0.0.0-pr-
|
|
84
|
-
"@nx/eslint": "0.0.0-pr-
|
|
85
|
-
"@nx/webpack": "0.0.0-pr-
|
|
86
|
-
"@nx/web": "0.0.0-pr-
|
|
87
|
-
"@nx/workspace": "0.0.0-pr-
|
|
82
|
+
"@nx/devkit": "0.0.0-pr-27809-4160bae",
|
|
83
|
+
"@nx/js": "0.0.0-pr-27809-4160bae",
|
|
84
|
+
"@nx/eslint": "0.0.0-pr-27809-4160bae",
|
|
85
|
+
"@nx/webpack": "0.0.0-pr-27809-4160bae",
|
|
86
|
+
"@nx/web": "0.0.0-pr-27809-4160bae",
|
|
87
|
+
"@nx/workspace": "0.0.0-pr-27809-4160bae",
|
|
88
88
|
"piscina": "^4.4.0",
|
|
89
|
-
"@nrwl/angular": "0.0.0-pr-
|
|
89
|
+
"@nrwl/angular": "0.0.0-pr-27809-4160bae"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"@angular-devkit/build-angular": ">= 16.0.0 < 19.0.0",
|
|
@@ -8,7 +8,6 @@ const global_eslint_config_1 = require("@nx/eslint/src/generators/init/global-es
|
|
|
8
8
|
const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
|
|
9
9
|
const add_angular_eslint_dependencies_1 = require("./lib/add-angular-eslint-dependencies");
|
|
10
10
|
const buildable_project_1 = require("./lib/buildable-project");
|
|
11
|
-
const flat_config_1 = require("@nx/eslint/src/utils/flat-config");
|
|
12
11
|
async function addLintingGenerator(tree, options) {
|
|
13
12
|
const tasks = [];
|
|
14
13
|
const rootProject = options.projectRoot === '.' || options.projectRoot === '';
|
|
@@ -33,11 +32,21 @@ async function addLintingGenerator(tree, options) {
|
|
|
33
32
|
const hasParserOptions = tree
|
|
34
33
|
.read((0, devkit_1.joinPathFragments)(options.projectRoot, eslintFile), 'utf8')
|
|
35
34
|
.includes(`${options.projectRoot}/tsconfig.*?.json`);
|
|
36
|
-
|
|
37
|
-
(
|
|
38
|
-
|
|
39
|
-
(0, eslint_file_1.addOverrideToLintConfig)(tree, options.projectRoot, {
|
|
35
|
+
(0, eslint_file_1.replaceOverridesInLintConfig)(tree, options.projectRoot, [
|
|
36
|
+
...(rootProject ? [global_eslint_config_1.typeScriptOverride, global_eslint_config_1.javaScriptOverride] : []),
|
|
37
|
+
{
|
|
40
38
|
files: ['*.ts'],
|
|
39
|
+
...(hasParserOptions
|
|
40
|
+
? {
|
|
41
|
+
parserOptions: {
|
|
42
|
+
project: [`${options.projectRoot}/tsconfig.*?.json`],
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
: {}),
|
|
46
|
+
extends: [
|
|
47
|
+
'plugin:@nx/angular',
|
|
48
|
+
'plugin:@angular-eslint/template/process-inline-templates',
|
|
49
|
+
],
|
|
41
50
|
rules: {
|
|
42
51
|
'@angular-eslint/directive-selector': [
|
|
43
52
|
'error',
|
|
@@ -56,90 +65,28 @@ async function addLintingGenerator(tree, options) {
|
|
|
56
65
|
},
|
|
57
66
|
],
|
|
58
67
|
},
|
|
59
|
-
}
|
|
60
|
-
|
|
68
|
+
},
|
|
69
|
+
{
|
|
61
70
|
files: ['*.html'],
|
|
71
|
+
extends: ['plugin:@nx/angular-template'],
|
|
72
|
+
/**
|
|
73
|
+
* Having an empty rules object present makes it more obvious to the user where they would
|
|
74
|
+
* extend things from if they needed to
|
|
75
|
+
*/
|
|
62
76
|
rules: {},
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
'error',
|
|
71
|
-
{
|
|
72
|
-
// With flat configs, we don't want to include imports in the eslint js/cjs/mjs files to be checked
|
|
73
|
-
ignoredFiles: ['**/*/*eslint*'],
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
-
},
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
(0, eslint_file_1.replaceOverridesInLintConfig)(tree, options.projectRoot, [
|
|
82
|
-
...(rootProject ? [global_eslint_config_1.typeScriptOverride, global_eslint_config_1.javaScriptOverride] : []),
|
|
83
|
-
{
|
|
84
|
-
files: ['*.ts'],
|
|
85
|
-
...(hasParserOptions
|
|
86
|
-
? {
|
|
87
|
-
parserOptions: {
|
|
88
|
-
project: [`${options.projectRoot}/tsconfig.*?.json`],
|
|
89
|
-
},
|
|
90
|
-
}
|
|
91
|
-
: {}),
|
|
92
|
-
extends: [
|
|
93
|
-
'plugin:@nx/angular',
|
|
94
|
-
'plugin:@angular-eslint/template/process-inline-templates',
|
|
95
|
-
],
|
|
96
|
-
rules: {
|
|
97
|
-
'@angular-eslint/directive-selector': [
|
|
98
|
-
'error',
|
|
99
|
-
{
|
|
100
|
-
type: 'attribute',
|
|
101
|
-
prefix: (0, string_utils_1.camelize)(options.prefix),
|
|
102
|
-
style: 'camelCase',
|
|
103
|
-
},
|
|
104
|
-
],
|
|
105
|
-
'@angular-eslint/component-selector': [
|
|
106
|
-
'error',
|
|
107
|
-
{
|
|
108
|
-
type: 'element',
|
|
109
|
-
prefix: (0, string_utils_1.dasherize)(options.prefix),
|
|
110
|
-
style: 'kebab-case',
|
|
111
|
-
},
|
|
112
|
-
],
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
files: ['*.html'],
|
|
117
|
-
extends: ['plugin:@nx/angular-template'],
|
|
118
|
-
/**
|
|
119
|
-
* Having an empty rules object present makes it more obvious to the user where they would
|
|
120
|
-
* extend things from if they needed to
|
|
121
|
-
*/
|
|
122
|
-
rules: {},
|
|
123
|
-
},
|
|
124
|
-
...((0, buildable_project_1.isBuildableLibraryProject)(tree, options.projectName)
|
|
125
|
-
? [
|
|
126
|
-
{
|
|
127
|
-
files: ['*.json'],
|
|
128
|
-
parser: 'jsonc-eslint-parser',
|
|
129
|
-
rules: {
|
|
130
|
-
'@nx/dependency-checks': [
|
|
131
|
-
'error',
|
|
132
|
-
{
|
|
133
|
-
// With flat configs, we don't want to include imports in the eslint js/cjs/mjs files to be checked
|
|
134
|
-
ignoredFiles: ['**/*/*eslint*'],
|
|
135
|
-
},
|
|
136
|
-
],
|
|
137
|
-
},
|
|
77
|
+
},
|
|
78
|
+
...((0, buildable_project_1.isBuildableLibraryProject)(tree, options.projectName)
|
|
79
|
+
? [
|
|
80
|
+
{
|
|
81
|
+
files: ['*.json'],
|
|
82
|
+
parser: 'jsonc-eslint-parser',
|
|
83
|
+
rules: {
|
|
84
|
+
'@nx/dependency-checks': 'error',
|
|
138
85
|
},
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
86
|
+
},
|
|
87
|
+
]
|
|
88
|
+
: []),
|
|
89
|
+
]);
|
|
143
90
|
}
|
|
144
91
|
if (!options.skipPackageJson) {
|
|
145
92
|
const installTask = (0, add_angular_eslint_dependencies_1.addAngularEsLintDependencies)(tree, options.projectName);
|
|
@@ -4,19 +4,14 @@ exports.addAngularEsLintDependencies = addAngularEsLintDependencies;
|
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const version_utils_1 = require("../../utils/version-utils");
|
|
6
6
|
const buildable_project_1 = require("./buildable-project");
|
|
7
|
-
const flat_config_1 = require("@nx/eslint/src/utils/flat-config");
|
|
8
7
|
function addAngularEsLintDependencies(tree, projectName) {
|
|
9
8
|
const compatVersions = (0, version_utils_1.versions)(tree);
|
|
10
9
|
const angularEslintVersionToInstall = compatVersions.angularEslintVersion;
|
|
11
|
-
const devDependencies =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
'@angular-eslint/eslint-plugin': angularEslintVersionToInstall,
|
|
17
|
-
'@angular-eslint/eslint-plugin-template': angularEslintVersionToInstall,
|
|
18
|
-
'@angular-eslint/template-parser': angularEslintVersionToInstall,
|
|
19
|
-
};
|
|
10
|
+
const devDependencies = {
|
|
11
|
+
'@angular-eslint/eslint-plugin': angularEslintVersionToInstall,
|
|
12
|
+
'@angular-eslint/eslint-plugin-template': angularEslintVersionToInstall,
|
|
13
|
+
'@angular-eslint/template-parser': angularEslintVersionToInstall,
|
|
14
|
+
};
|
|
20
15
|
if ('typescriptEslintVersion' in compatVersions) {
|
|
21
16
|
devDependencies['@typescript-eslint/utils'] =
|
|
22
17
|
compatVersions.typescriptEslintVersion;
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare const typesExpressVersion = "4.17.14";
|
|
|
14
14
|
export declare const browserSyncVersion = "^3.0.0";
|
|
15
15
|
export declare const moduleFederationNodeVersion = "~2.5.0";
|
|
16
16
|
export declare const moduleFederationEnhancedVersion = "~0.6.0";
|
|
17
|
-
export declare const angularEslintVersion = "^18.
|
|
17
|
+
export declare const angularEslintVersion = "^18.0.1";
|
|
18
18
|
export declare const typescriptEslintVersion = "^7.16.0";
|
|
19
19
|
export declare const tailwindVersion = "^3.0.2";
|
|
20
20
|
export declare const postcssVersion = "^8.4.5";
|
package/src/utils/versions.js
CHANGED
|
@@ -17,7 +17,7 @@ exports.typesExpressVersion = '4.17.14';
|
|
|
17
17
|
exports.browserSyncVersion = '^3.0.0';
|
|
18
18
|
exports.moduleFederationNodeVersion = '~2.5.0';
|
|
19
19
|
exports.moduleFederationEnhancedVersion = '~0.6.0';
|
|
20
|
-
exports.angularEslintVersion = '^18.
|
|
20
|
+
exports.angularEslintVersion = '^18.0.1';
|
|
21
21
|
exports.typescriptEslintVersion = '^7.16.0';
|
|
22
22
|
exports.tailwindVersion = '^3.0.2';
|
|
23
23
|
exports.postcssVersion = '^8.4.5';
|