@naturalcycles/dev-lib 13.38.2 → 13.38.4
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.
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.eslintAllCommand = void 0;
|
|
4
4
|
const fs = require("node:fs");
|
|
5
|
+
const js_lib_1 = require("@naturalcycles/js-lib");
|
|
6
|
+
const colors_1 = require("@naturalcycles/nodejs-lib/dist/colors");
|
|
5
7
|
const yargs = require("yargs");
|
|
6
8
|
const paths_cnst_1 = require("../cnst/paths.cnst");
|
|
7
9
|
const lint_util_1 = require("../util/lint.util");
|
|
@@ -9,6 +11,7 @@ const lint_util_1 = require("../util/lint.util");
|
|
|
9
11
|
* Runs `eslint` command for all predefined paths (e.g /src, /scripts, etc).
|
|
10
12
|
*/
|
|
11
13
|
async function eslintAllCommand() {
|
|
14
|
+
const started = Date.now();
|
|
12
15
|
const { ext, fix } = yargs.options({
|
|
13
16
|
ext: {
|
|
14
17
|
type: 'string',
|
|
@@ -48,5 +51,6 @@ async function eslintAllCommand() {
|
|
|
48
51
|
// /e2e
|
|
49
52
|
await (0, lint_util_1.runESLintAsync)(`./e2e`, eslintConfigPathE2e, tsconfigPathE2e, undefined, fix);
|
|
50
53
|
}
|
|
54
|
+
console.log(`${(0, colors_1.boldGrey)('eslint-all')} ${(0, colors_1.dimGrey)(`took ` + (0, js_lib_1._since)(started))}`);
|
|
51
55
|
}
|
|
52
56
|
exports.eslintAllCommand = eslintAllCommand;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.lintAllCommand = void 0;
|
|
4
4
|
const fs = require("node:fs");
|
|
5
|
+
const colors_1 = require("@naturalcycles/nodejs-lib/dist/colors");
|
|
5
6
|
const js_lib_1 = require("@naturalcycles/js-lib");
|
|
6
7
|
const yargs = require("yargs");
|
|
7
8
|
const nodejs_lib_1 = require("@naturalcycles/nodejs-lib");
|
|
@@ -12,6 +13,7 @@ const eslint_all_command_1 = require("./eslint-all.command");
|
|
|
12
13
|
* We run eslint BEFORE Prettier, because eslint can delete e.g unused imports.
|
|
13
14
|
*/
|
|
14
15
|
async function lintAllCommand() {
|
|
16
|
+
const started = Date.now();
|
|
15
17
|
const { commitOnChanges, failOnChanges } = yargs.options({
|
|
16
18
|
commitOnChanges: {
|
|
17
19
|
type: 'boolean',
|
|
@@ -33,6 +35,7 @@ async function lintAllCommand() {
|
|
|
33
35
|
const ktlintLib = require('@naturalcycles/ktlint');
|
|
34
36
|
await ktlintLib.ktlintAll();
|
|
35
37
|
}
|
|
38
|
+
console.log(`${(0, colors_1.boldGrey)('lint-all')} ${(0, colors_1.dimGrey)(`took ` + (0, js_lib_1._since)(started))}`);
|
|
36
39
|
if (commitOnChanges || failOnChanges) {
|
|
37
40
|
// detect changes
|
|
38
41
|
const hasChanges = (0, nodejs_lib_1.gitHasUncommittedChanges)();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/dev-lib",
|
|
3
|
-
"version": "13.38.
|
|
3
|
+
"version": "13.38.4",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"prepare": "husky install",
|
|
6
6
|
"tsn-debug": "tsn testScript.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
40
40
|
"@typescript-eslint/parser": "^6.0.0",
|
|
41
41
|
"eslint": "^8.0.0",
|
|
42
|
-
"eslint-config-prettier": "^
|
|
42
|
+
"eslint-config-prettier": "^9.0.0",
|
|
43
43
|
"eslint-plugin-import": "^2.22.1",
|
|
44
44
|
"eslint-plugin-jest": "^27.0.1",
|
|
45
45
|
"eslint-plugin-jsdoc": "^46.0.0",
|