markuplint 4.10.1 → 4.11.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 +16 -2
- package/README.md +5 -2
- package/lib/api/ml-engine.d.ts +2 -2
- package/lib/cli/bootstrap.d.ts +4 -1
- package/lib/cli/bootstrap.js +5 -1
- package/lib/cli/command.js +22 -0
- package/package.json +15 -14
package/CHANGELOG.md
CHANGED
|
@@ -3,14 +3,28 @@
|
|
|
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
|
-
|
|
6
|
+
# [4.11.0](https://github.com/markuplint/markuplint/compare/markuplint@4.10.1...markuplint@4.11.0) (2024-10-27)
|
|
7
7
|
|
|
8
|
-
**Note:** Version bump only for package markuplint
|
|
9
8
|
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **markuplint:** remove unnecessary a comma ([dc49a54](https://github.com/markuplint/markuplint/commit/dc49a54359a25ca200edd3928f03ed3ca1f1fe41))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Features
|
|
10
15
|
|
|
16
|
+
* **markuplint:** add `--show-config` option to CLI ([a836ddb](https://github.com/markuplint/markuplint/commit/a836ddb50159ec45ac4fc0ced9ca1c66a10c90c1))
|
|
17
|
+
* **markuplint:** change `resolveConfig` memthod to public from private ([f3cadb6](https://github.com/markuplint/markuplint/commit/f3cadb630eca4a4a9b754a3cb904ca0e05665110))
|
|
18
|
+
* **markuplint:** export `package.json` ([c52a5b9](https://github.com/markuplint/markuplint/commit/c52a5b9afd6c5a2a32e9c46af929c28d9673f501))
|
|
11
19
|
|
|
12
20
|
|
|
13
21
|
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## [4.10.1](https://github.com/markuplint/markuplint/compare/markuplint@4.10.0...markuplint@4.10.1) (2024-10-15)
|
|
25
|
+
|
|
26
|
+
**Note:** Version bump only for package markuplint
|
|
27
|
+
|
|
14
28
|
# [4.10.0](https://github.com/markuplint/markuplint/compare/markuplint@4.9.4...markuplint@4.10.0) (2024-10-14)
|
|
15
29
|
|
|
16
30
|
### Features
|
package/README.md
CHANGED
|
@@ -77,16 +77,19 @@ Options
|
|
|
77
77
|
--format, -f FORMAT Output format. Support "JSON", "Simple", "GitHub" and "Standard". Default: "Standard".
|
|
78
78
|
--no-search-config No search a configure file automatically.
|
|
79
79
|
--ignore-ext Evaluate files that are received even though the type of extension.
|
|
80
|
-
--allow-warnings Return status code 0 even if there are warnings.
|
|
81
80
|
--no-import-preset-rules No import preset rules.
|
|
82
81
|
--locale Locale of the message of violation. Default is an OS setting.
|
|
83
82
|
--no-color, Output no color.
|
|
84
83
|
--problem-only, -p Output only problems, without passeds.
|
|
84
|
+
--allow-warnings Return status code 0 even if there are warnings.
|
|
85
|
+
--allow-empty-input Return status code 1 even if there are no input files.
|
|
86
|
+
--show-config Output computed configuration of the target file. Supports "details" and empty. Default: empty.
|
|
85
87
|
--verbose Output with detailed information.
|
|
86
88
|
--include-node-modules Include files in node_modules directory. Default: false.
|
|
87
|
-
--severity-parse-error
|
|
89
|
+
--severity-parse-error Specifies the severity level of parse errors. Supports "error", "warning", and "off". Default: "error".
|
|
88
90
|
|
|
89
91
|
--init Initialize settings interactively.
|
|
92
|
+
--search Search lines of codes that include the target element by selectors.
|
|
90
93
|
|
|
91
94
|
--help, -h Show help.
|
|
92
95
|
--version, -v Show version.
|
package/lib/api/ml-engine.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { APIOptions, MLEngineEventMap } from './types.js';
|
|
2
2
|
import type { MLResultInfo } from '../types.js';
|
|
3
|
-
import type { MLFile, Target } from '@markuplint/file-resolver';
|
|
3
|
+
import type { ConfigSet, MLFile, Target } from '@markuplint/file-resolver';
|
|
4
4
|
import type { PlainData } from '@markuplint/ml-config';
|
|
5
5
|
import type { Document, RuleConfigValue } from '@markuplint/ml-core';
|
|
6
6
|
import { Emitter } from 'strict-event-emitter';
|
|
@@ -26,7 +26,7 @@ export declare class MLEngine extends Emitter<MLEngineEventMap> {
|
|
|
26
26
|
private i18n;
|
|
27
27
|
private onChange;
|
|
28
28
|
private provide;
|
|
29
|
-
|
|
29
|
+
resolveConfig(cache: boolean): Promise<ConfigSet>;
|
|
30
30
|
private resolveParser;
|
|
31
31
|
private resolvePretenders;
|
|
32
32
|
private resolveRules;
|
package/lib/cli/bootstrap.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReadonlyDeep } from 'type-fest';
|
|
2
|
-
export declare const help = "\nUsage\n\t$ markuplint <HTML file paths (glob format)>\n\t$ <stdout> | markuplint\n\nOptions\n\t--config, -c FILE_PATH A configuration file path.\n\t--fix, Fix HTML.\n\t--format, -f FORMAT Output format. Support \"JSON\", \"Simple\", \"GitHub\" and \"Standard\". Default: \"Standard\".\n\t--no-search-config No search a configure file automatically.\n\t--ignore-ext Evaluate files that are received even though the type of extension.\n\t--no-import-preset-rules No import preset rules.\n\t--locale Locale of the message of violation. Default is an OS setting.\n\t--no-color, Output no color.\n\t--problem-only, -p Output only problems, without passeds.\n\t--allow-warnings Return status code 0 even if there are warnings.\n\t--allow-empty-input Return status code 1 even if there are no input files.\n\t--verbose Output with detailed information.\n\t--include-node-modules Include files in node_modules directory. Default: false.\n\t--severity-parse-error
|
|
2
|
+
export declare const help = "\nUsage\n\t$ markuplint <HTML file paths (glob format)>\n\t$ <stdout> | markuplint\n\nOptions\n\t--config, -c FILE_PATH A configuration file path.\n\t--fix, Fix HTML.\n\t--format, -f FORMAT Output format. Support \"JSON\", \"Simple\", \"GitHub\" and \"Standard\". Default: \"Standard\".\n\t--no-search-config No search a configure file automatically.\n\t--ignore-ext Evaluate files that are received even though the type of extension.\n\t--no-import-preset-rules No import preset rules.\n\t--locale Locale of the message of violation. Default is an OS setting.\n\t--no-color, Output no color.\n\t--problem-only, -p Output only problems, without passeds.\n\t--allow-warnings Return status code 0 even if there are warnings.\n\t--allow-empty-input Return status code 1 even if there are no input files.\n\t--show-config Output computed configuration of the target file. Supports \"details\" and empty. Default: empty.\n\t--verbose Output with detailed information.\n\t--include-node-modules Include files in node_modules directory. Default: false.\n\t--severity-parse-error Specifies the severity level of parse errors. Supports \"error\", \"warning\", and \"off\". Default: \"error\".\n\n\t--init Initialize settings interactively.\n\t--search Search lines of codes that include the target element by selectors.\n\n\t--help, -h Show help.\n\t--version, -v Show version.\n\nExamples\n\t$ markuplint verifyee.html --config path/to/.markuplintrc\n\t$ cat verifyee.html | markuplint\n";
|
|
3
3
|
export declare const cli: import("meow").Result<{
|
|
4
4
|
config: {
|
|
5
5
|
type: "string";
|
|
@@ -45,6 +45,9 @@ export declare const cli: import("meow").Result<{
|
|
|
45
45
|
type: "boolean";
|
|
46
46
|
default: true;
|
|
47
47
|
};
|
|
48
|
+
showConfig: {
|
|
49
|
+
type: "string";
|
|
50
|
+
};
|
|
48
51
|
verbose: {
|
|
49
52
|
type: "boolean";
|
|
50
53
|
default: false;
|
package/lib/cli/bootstrap.js
CHANGED
|
@@ -16,9 +16,10 @@ Options
|
|
|
16
16
|
--problem-only, -p Output only problems, without passeds.
|
|
17
17
|
--allow-warnings Return status code 0 even if there are warnings.
|
|
18
18
|
--allow-empty-input Return status code 1 even if there are no input files.
|
|
19
|
+
--show-config Output computed configuration of the target file. Supports "details" and empty. Default: empty.
|
|
19
20
|
--verbose Output with detailed information.
|
|
20
21
|
--include-node-modules Include files in node_modules directory. Default: false.
|
|
21
|
-
--severity-parse-error
|
|
22
|
+
--severity-parse-error Specifies the severity level of parse errors. Supports "error", "warning", and "off". Default: "error".
|
|
22
23
|
|
|
23
24
|
--init Initialize settings interactively.
|
|
24
25
|
--search Search lines of codes that include the target element by selectors.
|
|
@@ -78,6 +79,9 @@ export const cli = meow(help, {
|
|
|
78
79
|
type: 'boolean',
|
|
79
80
|
default: true,
|
|
80
81
|
},
|
|
82
|
+
showConfig: {
|
|
83
|
+
type: 'string',
|
|
84
|
+
},
|
|
81
85
|
verbose: {
|
|
82
86
|
type: 'boolean',
|
|
83
87
|
default: false,
|
package/lib/cli/command.js
CHANGED
|
@@ -46,6 +46,28 @@ export async function command(files, options, apiOptions) {
|
|
|
46
46
|
severity,
|
|
47
47
|
...apiOptions,
|
|
48
48
|
});
|
|
49
|
+
if (options.showConfig != null) {
|
|
50
|
+
const isDetails = options.showConfig === 'details';
|
|
51
|
+
const configSet = await engine.resolveConfig(false);
|
|
52
|
+
let data;
|
|
53
|
+
if (isDetails) {
|
|
54
|
+
const files = [...configSet.files].toReversed();
|
|
55
|
+
const [configurationFile, ...dependencies] = files;
|
|
56
|
+
data = {
|
|
57
|
+
target: file.path,
|
|
58
|
+
computedConfig: configSet.config,
|
|
59
|
+
configurationFile: configurationFile,
|
|
60
|
+
dependencies,
|
|
61
|
+
plugins: configSet.plugins,
|
|
62
|
+
errors: configSet.errs,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
data = configSet.config;
|
|
67
|
+
}
|
|
68
|
+
process.stdout.write(JSON.stringify(data, null, 2) + '\n');
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
49
71
|
const result = await engine.exec();
|
|
50
72
|
if (!result) {
|
|
51
73
|
continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markuplint",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.11.0",
|
|
4
4
|
"description": "An HTML linter for all markup developers",
|
|
5
5
|
"author": "Yusuke Hirao",
|
|
6
6
|
"license": "MIT",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
".": {
|
|
12
12
|
"import": "./lib/index.js",
|
|
13
13
|
"types": "./lib/index.d.ts"
|
|
14
|
-
}
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
15
16
|
},
|
|
16
17
|
"typedoc": {
|
|
17
18
|
"entryPoint": "./src/index.ts"
|
|
@@ -25,17 +26,17 @@
|
|
|
25
26
|
"clean": "tsc --build --clean"
|
|
26
27
|
},
|
|
27
28
|
"dependencies": {
|
|
28
|
-
"@markuplint/cli-utils": "4.4.
|
|
29
|
-
"@markuplint/file-resolver": "4.9.
|
|
30
|
-
"@markuplint/html-parser": "4.6.
|
|
31
|
-
"@markuplint/html-spec": "4.
|
|
32
|
-
"@markuplint/i18n": "4.5.
|
|
33
|
-
"@markuplint/ml-ast": "4.4.
|
|
34
|
-
"@markuplint/ml-config": "4.8.
|
|
35
|
-
"@markuplint/ml-core": "4.10.
|
|
36
|
-
"@markuplint/ml-spec": "4.
|
|
37
|
-
"@markuplint/rules": "4.10.
|
|
38
|
-
"@markuplint/shared": "4.4.
|
|
29
|
+
"@markuplint/cli-utils": "4.4.8",
|
|
30
|
+
"@markuplint/file-resolver": "4.9.5",
|
|
31
|
+
"@markuplint/html-parser": "4.6.10",
|
|
32
|
+
"@markuplint/html-spec": "4.10.0",
|
|
33
|
+
"@markuplint/i18n": "4.5.6",
|
|
34
|
+
"@markuplint/ml-ast": "4.4.7",
|
|
35
|
+
"@markuplint/ml-config": "4.8.2",
|
|
36
|
+
"@markuplint/ml-core": "4.10.2",
|
|
37
|
+
"@markuplint/ml-spec": "4.8.0",
|
|
38
|
+
"@markuplint/rules": "4.10.3",
|
|
39
|
+
"@markuplint/shared": "4.4.8",
|
|
39
40
|
"@types/debug": "4.1.12",
|
|
40
41
|
"chokidar": "4.0.1",
|
|
41
42
|
"debug": "4.3.7",
|
|
@@ -46,5 +47,5 @@
|
|
|
46
47
|
"strip-ansi": "7.1.0",
|
|
47
48
|
"type-fest": "4.26.1"
|
|
48
49
|
},
|
|
49
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "fab5b494f0bdc491aa83cb2c8722738d557fbefd"
|
|
50
51
|
}
|