@angular-eslint/builder 14.1.2-alpha.0 → 14.1.3-alpha.0
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/builders.json +0 -7
- package/dist/lint.impl.d.ts +2 -4
- package/dist/lint.impl.js +8 -8
- package/package.json +2 -6
- package/dist/compat.d.ts +0 -2
- package/dist/compat.js +0 -8
package/builders.json
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"builders": {
|
|
3
|
-
"lint": {
|
|
4
|
-
"implementation": "./dist/compat",
|
|
5
|
-
"schema": "./dist/schema.json",
|
|
6
|
-
"description": "Run ESLint over a TypeScript project"
|
|
7
|
-
}
|
|
8
|
-
},
|
|
9
|
-
"executors": {
|
|
10
3
|
"lint": {
|
|
11
4
|
"implementation": "./dist/lint.impl.js",
|
|
12
5
|
"schema": "./dist/schema.json",
|
package/dist/lint.impl.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { ExecutorContext } from '@nrwl/devkit';
|
|
2
1
|
import type { Schema } from './schema';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}>;
|
|
2
|
+
declare const _default: import("@angular-devkit/architect/src/internal").Builder<Schema & import("@angular-devkit/core").JsonObject>;
|
|
3
|
+
export default _default;
|
package/dist/lint.impl.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const architect_1 = require("@angular-devkit/architect");
|
|
3
4
|
const fs_1 = require("fs");
|
|
4
5
|
const path_1 = require("path");
|
|
5
6
|
const create_directory_1 = require("./utils/create-directory");
|
|
6
7
|
const eslint_utils_1 = require("./utils/eslint-utils");
|
|
7
|
-
|
|
8
|
-
var _a, _b;
|
|
9
|
-
const workspaceRoot = context.
|
|
8
|
+
exports.default = (0, architect_1.createBuilder)(async (options, context) => {
|
|
9
|
+
var _a, _b, _c;
|
|
10
|
+
const workspaceRoot = context.workspaceRoot;
|
|
10
11
|
process.chdir(workspaceRoot);
|
|
11
|
-
const projectName = context.
|
|
12
|
+
const projectName = ((_a = context.target) === null || _a === void 0 ? void 0 : _a.project) || '<???>';
|
|
12
13
|
const printInfo = options.format && !options.silent;
|
|
13
14
|
const reportOnlyErrors = options.quiet;
|
|
14
15
|
const maxWarnings = options.maxWarnings;
|
|
@@ -16,7 +17,7 @@ async function run(options, context) {
|
|
|
16
17
|
console.info(`\nLinting ${JSON.stringify(projectName)}...`);
|
|
17
18
|
}
|
|
18
19
|
const projectESLint = await (0, eslint_utils_1.loadESLint)();
|
|
19
|
-
const version = (
|
|
20
|
+
const version = (_c = (_b = projectESLint.ESLint) === null || _b === void 0 ? void 0 : _b.version) === null || _c === void 0 ? void 0 : _c.split('.');
|
|
20
21
|
if (!version ||
|
|
21
22
|
version.length < 2 ||
|
|
22
23
|
Number(version[0]) < 7 ||
|
|
@@ -72,7 +73,7 @@ async function run(options, context) {
|
|
|
72
73
|
*/
|
|
73
74
|
const formattedResults = await formatter.format(finalLintResults);
|
|
74
75
|
if (options.outputFile) {
|
|
75
|
-
const pathToOutputFile = (0, path_1.join)(context.
|
|
76
|
+
const pathToOutputFile = (0, path_1.join)(context.workspaceRoot, options.outputFile);
|
|
76
77
|
(0, create_directory_1.createDirectory)((0, path_1.dirname)(pathToOutputFile));
|
|
77
78
|
(0, fs_1.writeFileSync)(pathToOutputFile, formattedResults);
|
|
78
79
|
}
|
|
@@ -97,5 +98,4 @@ async function run(options, context) {
|
|
|
97
98
|
return {
|
|
98
99
|
success: options.force || (totalErrors === 0 && !tooManyWarnings),
|
|
99
100
|
};
|
|
100
|
-
}
|
|
101
|
-
exports.default = run;
|
|
101
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/builder",
|
|
3
|
-
"version": "14.1.
|
|
3
|
+
"version": "14.1.3-alpha.0+d3df935",
|
|
4
4
|
"description": "Angular CLI builder for ESLint",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -18,13 +18,9 @@
|
|
|
18
18
|
"builders.json"
|
|
19
19
|
],
|
|
20
20
|
"builders": "./builders.json",
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"@nrwl/devkit": "^14.7.5",
|
|
23
|
-
"nx": "^14.7.5"
|
|
24
|
-
},
|
|
25
21
|
"peerDependencies": {
|
|
26
22
|
"eslint": "^7.0.0 || ^8.0.0",
|
|
27
23
|
"typescript": "*"
|
|
28
24
|
},
|
|
29
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "d3df93596ac128c7028a051780f43d8e8adb6e6f"
|
|
30
26
|
}
|
package/dist/compat.d.ts
DELETED
package/dist/compat.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const devkit_1 = require("@nrwl/devkit");
|
|
7
|
-
const lint_impl_1 = __importDefault(require("./lint.impl"));
|
|
8
|
-
exports.default = (0, devkit_1.convertNxExecutor)(lint_impl_1.default);
|