@angular-eslint/builder 12.7.0 → 13.0.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/CHANGELOG.md +6 -0
- package/dist/compat.js +1 -1
- package/dist/lint.impl.js +6 -6
- package/dist/utils/create-directory.js +3 -3
- package/dist/utils/eslint-utils.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [13.0.0](https://github.com/angular-eslint/angular-eslint/compare/v12.7.0...v13.0.0) (2021-11-18)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- angular-eslint v13 ([#780](https://github.com/angular-eslint/angular-eslint/issues/780)) ([f7ce631](https://github.com/angular-eslint/angular-eslint/commit/f7ce631524dd7834a422a5ac93a4c0534f9f23fa))
|
|
11
|
+
|
|
6
12
|
# [12.7.0](https://github.com/angular-eslint/angular-eslint/compare/v12.6.1...v12.7.0) (2021-11-18)
|
|
7
13
|
|
|
8
14
|
### Features
|
package/dist/compat.js
CHANGED
|
@@ -5,4 +5,4 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const devkit_1 = require("@nrwl/devkit");
|
|
7
7
|
const lint_impl_1 = __importDefault(require("./lint.impl"));
|
|
8
|
-
exports.default = devkit_1.convertNxExecutor(lint_impl_1.default);
|
|
8
|
+
exports.default = (0, devkit_1.convertNxExecutor)(lint_impl_1.default);
|
package/dist/lint.impl.js
CHANGED
|
@@ -15,7 +15,7 @@ async function run(options, context) {
|
|
|
15
15
|
if (printInfo) {
|
|
16
16
|
console.info(`\nLinting ${JSON.stringify(projectName)}...`);
|
|
17
17
|
}
|
|
18
|
-
const projectESLint = await eslint_utils_1.loadESLint();
|
|
18
|
+
const projectESLint = await (0, eslint_utils_1.loadESLint)();
|
|
19
19
|
const version = (_b = (_a = projectESLint.ESLint) === null || _a === void 0 ? void 0 : _a.version) === null || _b === void 0 ? void 0 : _b.split('.');
|
|
20
20
|
if (!version ||
|
|
21
21
|
version.length < 2 ||
|
|
@@ -29,9 +29,9 @@ async function run(options, context) {
|
|
|
29
29
|
* eslint automatically resolve the `.eslintrc` files in each folder.
|
|
30
30
|
*/
|
|
31
31
|
const eslintConfigPath = options.eslintConfig
|
|
32
|
-
? path_1.resolve(workspaceRoot, options.eslintConfig)
|
|
32
|
+
? (0, path_1.resolve)(workspaceRoot, options.eslintConfig)
|
|
33
33
|
: undefined;
|
|
34
|
-
const lintResults = await eslint_utils_1.lint(workspaceRoot, eslintConfigPath, options);
|
|
34
|
+
const lintResults = await (0, eslint_utils_1.lint)(workspaceRoot, eslintConfigPath, options);
|
|
35
35
|
if (lintResults.length === 0) {
|
|
36
36
|
throw new Error('Invalid lint configuration. Nothing to lint.');
|
|
37
37
|
}
|
|
@@ -72,9 +72,9 @@ async function run(options, context) {
|
|
|
72
72
|
*/
|
|
73
73
|
const formattedResults = formatter.format(finalLintResults);
|
|
74
74
|
if (options.outputFile) {
|
|
75
|
-
const pathToOutputFile = path_1.join(context.root, options.outputFile);
|
|
76
|
-
create_directory_1.createDirectory(path_1.dirname(pathToOutputFile));
|
|
77
|
-
fs_1.writeFileSync(pathToOutputFile, formattedResults);
|
|
75
|
+
const pathToOutputFile = (0, path_1.join)(context.root, options.outputFile);
|
|
76
|
+
(0, create_directory_1.createDirectory)((0, path_1.dirname)(pathToOutputFile));
|
|
77
|
+
(0, fs_1.writeFileSync)(pathToOutputFile, formattedResults);
|
|
78
78
|
}
|
|
79
79
|
else {
|
|
80
80
|
console.info(formattedResults);
|
|
@@ -4,18 +4,18 @@ exports.createDirectory = void 0;
|
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const fs_1 = require("fs");
|
|
6
6
|
function createDirectory(directoryPath) {
|
|
7
|
-
const parentPath = path_1.dirname(directoryPath);
|
|
7
|
+
const parentPath = (0, path_1.dirname)(directoryPath);
|
|
8
8
|
if (!directoryExists(parentPath)) {
|
|
9
9
|
createDirectory(parentPath);
|
|
10
10
|
}
|
|
11
11
|
if (!directoryExists(directoryPath)) {
|
|
12
|
-
fs_1.mkdirSync(directoryPath);
|
|
12
|
+
(0, fs_1.mkdirSync)(directoryPath);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
exports.createDirectory = createDirectory;
|
|
16
16
|
function directoryExists(name) {
|
|
17
17
|
try {
|
|
18
|
-
return fs_1.statSync(name).isDirectory();
|
|
18
|
+
return (0, fs_1.statSync)(name).isDirectory();
|
|
19
19
|
}
|
|
20
20
|
catch (_a) {
|
|
21
21
|
return false;
|
|
@@ -59,6 +59,6 @@ async function lint(workspaceRoot, eslintConfigPath, options) {
|
|
|
59
59
|
});
|
|
60
60
|
return await eslint.lintFiles(
|
|
61
61
|
// lintFilePatterns are defined relative to the root of the Angular-CLI workspace
|
|
62
|
-
options.lintFilePatterns.map((p) => path_1.join(workspaceRoot, p)));
|
|
62
|
+
options.lintFilePatterns.map((p) => (0, path_1.join)(workspaceRoot, p)));
|
|
63
63
|
}
|
|
64
64
|
exports.lint = lint;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-eslint/builder",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0",
|
|
4
4
|
"description": "Angular CLI builder for ESLint",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
],
|
|
20
20
|
"builders": "./builders.json",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@nrwl/devkit": "
|
|
22
|
+
"@nrwl/devkit": "13.1.3"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"eslint": "
|
|
25
|
+
"eslint": "^7.0.0 || ^8.0.0",
|
|
26
26
|
"typescript": "*"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "3c3f54614742941d39e2dae941febdee05525ff1"
|
|
29
29
|
}
|