markuplint 4.0.0-alpha.4 → 4.0.0-alpha.5
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/LICENSE +1 -1
- package/README.md +1 -1
- package/lib/api/index.d.ts +1 -1
- package/lib/api/index.js +1 -1
- package/lib/api/lint.js +1 -1
- package/lib/api/ml-engine.d.ts +1 -1
- package/lib/api/ml-engine.js +1 -2
- package/lib/cli/index.js +1 -1
- package/lib/cli/search/index.d.ts +1 -1
- package/lib/cli/search/index.js +1 -1
- package/lib/reporter/standard-reporter.js +1 -1
- package/package.json +13 -13
package/LICENSE
CHANGED
package/README.md
CHANGED
package/lib/api/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { MLEngine, FromCodeOptions } from './ml-engine.js';
|
|
2
2
|
export { lint } from './lint.js';
|
package/lib/api/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { MLEngine } from './ml-engine.js';
|
|
2
2
|
export { lint } from './lint.js';
|
package/lib/api/lint.js
CHANGED
package/lib/api/ml-engine.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export type FromCodeOptions = APIOptions & MLEngineOptions & {
|
|
|
12
12
|
readonly name?: string;
|
|
13
13
|
readonly dirname?: string;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export declare class MLEngine extends Emitter<MLEngineEventMap> {
|
|
16
16
|
#private;
|
|
17
17
|
static fromCode(sourceCode: string, options?: FromCodeOptions): Promise<MLEngine>;
|
|
18
18
|
static toMLFile(target: Target): Promise<MLFile | undefined>;
|
package/lib/api/ml-engine.js
CHANGED
|
@@ -19,7 +19,7 @@ import { i18n } from '../i18n.js';
|
|
|
19
19
|
const log = coreLog.extend('ml-engine');
|
|
20
20
|
const fileLog = log.extend('file');
|
|
21
21
|
const configLog = log.extend('config');
|
|
22
|
-
class MLEngine extends Emitter {
|
|
22
|
+
export class MLEngine extends Emitter {
|
|
23
23
|
static async fromCode(sourceCode, options) {
|
|
24
24
|
if (options?.debug) {
|
|
25
25
|
verbosely();
|
|
@@ -318,4 +318,3 @@ class MLEngine extends Emitter {
|
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
_MLEngine_configProvider = new WeakMap(), _MLEngine_core = new WeakMap(), _MLEngine_file = new WeakMap(), _MLEngine_options = new WeakMap(), _MLEngine_watcher = new WeakMap();
|
|
321
|
-
export default MLEngine;
|
package/lib/cli/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { cli } from './bootstrap.js';
|
|
|
4
4
|
import { command } from './command.js';
|
|
5
5
|
import { createRule } from './create-rule/index.js';
|
|
6
6
|
import { initialize } from './init/index.js';
|
|
7
|
-
import search from './search/index.js';
|
|
7
|
+
import { search } from './search/index.js';
|
|
8
8
|
/* eslint-disable unicorn/no-process-exit */
|
|
9
9
|
if (cli.flags.v) {
|
|
10
10
|
cli.showVersion(); // And exit successfully.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { CLIOptions } from '../bootstrap.js';
|
|
2
|
-
export
|
|
2
|
+
export declare function search(files: readonly string[], options: CLIOptions, selectors: string): Promise<void>;
|
package/lib/cli/search/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRule, MLRule } from '@markuplint/ml-core';
|
|
2
2
|
import { command } from '../command.js';
|
|
3
|
-
export
|
|
3
|
+
export async function search(files, options, selectors) {
|
|
4
4
|
const name = '__CLI_SEARCH__';
|
|
5
5
|
const locations = [];
|
|
6
6
|
await command(files, {
|
|
@@ -16,7 +16,7 @@ export function standardReporter(results, options) {
|
|
|
16
16
|
}
|
|
17
17
|
const out = [];
|
|
18
18
|
if (results.violations.length > 0) {
|
|
19
|
-
const lines = results.sourceCode.split(/\r?\n/
|
|
19
|
+
const lines = results.sourceCode.split(/\r?\n/);
|
|
20
20
|
for (const violation of results.violations) {
|
|
21
21
|
const prev = lines[violation.line - 2] ?? '';
|
|
22
22
|
const line = lines[violation.line - 1] ?? '';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markuplint",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.5",
|
|
4
4
|
"description": "An HTML linter for all markup developers",
|
|
5
5
|
"author": "Yusuke Hirao",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"clean": "tsc --build --clean"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@markuplint/create-rule-helper": "4.0.0-alpha.
|
|
29
|
-
"@markuplint/file-resolver": "4.0.0-alpha.
|
|
30
|
-
"@markuplint/html-parser": "4.0.0-alpha.
|
|
31
|
-
"@markuplint/html-spec": "4.0.0-alpha.
|
|
32
|
-
"@markuplint/i18n": "4.0.0-alpha.
|
|
33
|
-
"@markuplint/ml-ast": "4.0.0-alpha.
|
|
34
|
-
"@markuplint/ml-config": "4.0.0-alpha.
|
|
35
|
-
"@markuplint/ml-core": "4.0.0-alpha.
|
|
36
|
-
"@markuplint/ml-spec": "4.0.0-alpha.
|
|
37
|
-
"@markuplint/rules": "4.0.0-alpha.
|
|
38
|
-
"@markuplint/shared": "4.0.0-alpha.
|
|
28
|
+
"@markuplint/create-rule-helper": "4.0.0-alpha.5",
|
|
29
|
+
"@markuplint/file-resolver": "4.0.0-alpha.5",
|
|
30
|
+
"@markuplint/html-parser": "4.0.0-alpha.5",
|
|
31
|
+
"@markuplint/html-spec": "4.0.0-alpha.5",
|
|
32
|
+
"@markuplint/i18n": "4.0.0-alpha.5",
|
|
33
|
+
"@markuplint/ml-ast": "4.0.0-alpha.5",
|
|
34
|
+
"@markuplint/ml-config": "4.0.0-alpha.5",
|
|
35
|
+
"@markuplint/ml-core": "4.0.0-alpha.5",
|
|
36
|
+
"@markuplint/ml-spec": "4.0.0-alpha.5",
|
|
37
|
+
"@markuplint/rules": "4.0.0-alpha.5",
|
|
38
|
+
"@markuplint/shared": "4.0.0-alpha.5",
|
|
39
39
|
"@types/cli-color": "^2.0.4",
|
|
40
40
|
"@types/debug": "^4.1.10",
|
|
41
41
|
"@types/uuid": "^9.0.6",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"type-fest": "^4.5.0",
|
|
57
57
|
"uuid": "^9.0.1"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "0c3e4690662edf1765bcc4b6411ec5507c1e2ea3"
|
|
60
60
|
}
|