@angular-eslint/schematics 18.0.0-alpha.11 → 18.0.0-alpha.13
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/dist/add-eslint-to-project/index.d.ts.map +1 -1
- package/dist/devkit-imports.d.ts +7 -0
- package/dist/devkit-imports.d.ts.map +1 -1
- package/dist/devkit-imports.js +9 -0
- package/dist/ng-add/index.d.ts.map +1 -1
- package/dist/ng-add/index.js +7 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +4 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/add-eslint-to-project/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/add-eslint-to-project/index.ts"],"names":[],"mappings":"AAQA,UAAU,MAAM;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;;AAED,wBAqBG"}
|
package/dist/devkit-imports.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In order to prevent the project graph cache from showing up at the root of the user's
|
|
3
|
+
* workspace, we set a custom cache directory before importing anything from `@nx/devkit`.
|
|
4
|
+
*
|
|
5
|
+
* `no-restricted-imports` eslint rule has been configured for this project to prevent
|
|
6
|
+
* accidental imports in other files. All imports should come from here to ensure consistency.
|
|
7
|
+
*/
|
|
1
8
|
export { convertNxGenerator, offsetFromRoot, readJson, writeJson, } from '@nx/devkit';
|
|
2
9
|
export type { ProjectConfiguration, Tree } from '@nx/devkit';
|
|
3
10
|
export { wrapAngularDevkitSchematic } from '@nx/devkit/ngcli-adapter';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devkit-imports.d.ts","sourceRoot":"","sources":["../src/devkit-imports.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"devkit-imports.d.ts","sourceRoot":"","sources":["../src/devkit-imports.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAWH,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,QAAQ,EACR,SAAS,GACV,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,oBAAoB,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/devkit-imports.js
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* In order to prevent the project graph cache from showing up at the root of the user's
|
|
4
|
+
* workspace, we set a custom cache directory before importing anything from `@nx/devkit`.
|
|
5
|
+
*
|
|
6
|
+
* `no-restricted-imports` eslint rule has been configured for this project to prevent
|
|
7
|
+
* accidental imports in other files. All imports should come from here to ensure consistency.
|
|
8
|
+
*/
|
|
2
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
10
|
exports.wrapAngularDevkitSchematic = exports.writeJson = exports.readJson = exports.offsetFromRoot = exports.convertNxGenerator = void 0;
|
|
4
11
|
const node_path_1 = require("node:path");
|
|
5
12
|
process.env.NX_PROJECT_GRAPH_CACHE_DIRECTORY = (0, node_path_1.join)(__dirname, '..', '.nx-cache');
|
|
13
|
+
/* eslint-disable no-restricted-imports */
|
|
6
14
|
var devkit_1 = require("@nx/devkit");
|
|
7
15
|
Object.defineProperty(exports, "convertNxGenerator", { enumerable: true, get: function () { return devkit_1.convertNxGenerator; } });
|
|
8
16
|
Object.defineProperty(exports, "offsetFromRoot", { enumerable: true, get: function () { return devkit_1.offsetFromRoot; } });
|
|
@@ -10,3 +18,4 @@ Object.defineProperty(exports, "readJson", { enumerable: true, get: function ()
|
|
|
10
18
|
Object.defineProperty(exports, "writeJson", { enumerable: true, get: function () { return devkit_1.writeJson; } });
|
|
11
19
|
var ngcli_adapter_1 = require("@nx/devkit/ngcli-adapter");
|
|
12
20
|
Object.defineProperty(exports, "wrapAngularDevkitSchematic", { enumerable: true, get: function () { return ngcli_adapter_1.wrapAngularDevkitSchematic; } });
|
|
21
|
+
/* eslint-enable no-restricted-imports */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAc/E,eAAO,MAAM,uBAAuB,WAAW,CAAC;AAChD,eAAO,MAAM,kCAAkC,WAAW,CAAC;AA+K3D,MAAM,CAAC,OAAO,cAAc,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ng-add/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAA0B,MAAM,4BAA4B,CAAC;AAc/E,eAAO,MAAM,uBAAuB,WAAW,CAAC;AAChD,eAAO,MAAM,kCAAkC,WAAW,CAAC;AA+K3D,MAAM,CAAC,OAAO,cAAc,IAAI,CA2B/B"}
|
package/dist/ng-add/index.js
CHANGED
|
@@ -144,8 +144,14 @@ function default_1() {
|
|
|
144
144
|
* as a signal for what kind of config and dependencies to set up.
|
|
145
145
|
*/
|
|
146
146
|
json.devDependencies = json.devDependencies || {};
|
|
147
|
+
let useFlatConfig = true;
|
|
147
148
|
const existingESLintVersion = json.devDependencies['eslint'];
|
|
148
|
-
|
|
149
|
+
if (existingESLintVersion) {
|
|
150
|
+
const v = semver_1.default.minVersion(existingESLintVersion);
|
|
151
|
+
if (v) {
|
|
152
|
+
useFlatConfig = semver_1.default.gte(v.raw, '9.0.0');
|
|
153
|
+
}
|
|
154
|
+
}
|
|
149
155
|
return (0, schematics_1.chain)([
|
|
150
156
|
addAngularESLintPackages(json, useFlatConfig),
|
|
151
157
|
applyESLintConfigIfSingleProjectWithNoExistingTSLint(useFlatConfig),
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Path } from '@angular-devkit/core';
|
|
2
2
|
import type { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
|
|
3
|
-
import { Tree as NxTree } from './devkit-imports';
|
|
3
|
+
import type { Tree as NxTree } from './devkit-imports';
|
|
4
4
|
/**
|
|
5
5
|
* This method is specifically for reading JSON files in a Tree
|
|
6
6
|
* @param host The host tree
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAM/E,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAM/E,OAAO,KAAK,EAAE,IAAI,IAAI,MAAM,EAAwB,MAAM,kBAAkB,CAAC;AAK7E;;;;;GAKG;AAEH,wBAAgB,cAAc,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAcnE;AAED;;;;;GAKG;AAEH,wBAAgB,gBAAgB,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,EAC7C,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,gBAAgB,KAAK,CAAC,GAClD,IAAI,CAYN;AAED,KAAK,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE;IAAE,OAAO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AE,GAAG,CAAC,EAChC,iBAAiB,EAAE,MAAM,EACzB,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,uBAUvC"}
|
package/dist/utils.js
CHANGED
|
@@ -96,7 +96,10 @@ function addESLintTargetToProject(tree, projectName, targetName) {
|
|
|
96
96
|
};
|
|
97
97
|
let eslintConfig;
|
|
98
98
|
if (existingProjectConfig.root !== '') {
|
|
99
|
-
|
|
99
|
+
const flatConfigPath = (0, core_1.join)(existingProjectConfig.root, 'eslint.config.js');
|
|
100
|
+
if (tree.exists(flatConfigPath)) {
|
|
101
|
+
eslintConfig = flatConfigPath;
|
|
102
|
+
}
|
|
100
103
|
}
|
|
101
104
|
eslintTargetConfig.options.eslintConfig = eslintConfig;
|
|
102
105
|
existingProjectConfig.architect = existingProjectConfig.architect || {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/schematics",
|
|
3
|
-
"version": "18.0.0-alpha.
|
|
3
|
+
"version": "18.0.0-alpha.13",
|
|
4
4
|
"description": "Angular Schematics for angular-eslint",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"save": false
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@angular-eslint/eslint-plugin": "18.0.0-alpha.
|
|
38
|
-
"@angular-eslint/eslint-plugin-template": "18.0.0-alpha.
|
|
37
|
+
"@angular-eslint/eslint-plugin": "18.0.0-alpha.13",
|
|
38
|
+
"@angular-eslint/eslint-plugin-template": "18.0.0-alpha.13",
|
|
39
39
|
"@nx/devkit": "^19.0.6",
|
|
40
40
|
"ignore": "5.3.1",
|
|
41
41
|
"nx": "^19.0.6",
|