@markuplint/ml-core 3.6.1 → 3.8.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/lib/ml-core.d.ts +22 -11
- package/lib/ml-rule/ml-rule.js +3 -2
- package/package.json +8 -8
package/lib/ml-core.d.ts
CHANGED
|
@@ -3,17 +3,28 @@ import type { PlainData, RuleConfigValue, Violation } from '@markuplint/ml-confi
|
|
|
3
3
|
import { ParserError } from '@markuplint/parser-utils';
|
|
4
4
|
import { Document } from './ml-dom';
|
|
5
5
|
export type MLCoreParams = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
readonly sourceCode: string;
|
|
7
|
+
readonly filename: string;
|
|
8
|
+
readonly debug?: boolean;
|
|
9
9
|
} & MLFabric;
|
|
10
10
|
export declare class MLCore {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
#private;
|
|
12
|
+
constructor({
|
|
13
|
+
parser,
|
|
14
|
+
sourceCode,
|
|
15
|
+
ruleset,
|
|
16
|
+
rules,
|
|
17
|
+
locale,
|
|
18
|
+
schemas,
|
|
19
|
+
parserOptions,
|
|
20
|
+
pretenders,
|
|
21
|
+
filename,
|
|
22
|
+
debug,
|
|
23
|
+
}: MLCoreParams);
|
|
24
|
+
get document(): ParserError | Document<RuleConfigValue, PlainData>;
|
|
25
|
+
setCode(sourceCode: string): void;
|
|
26
|
+
update({ parser, ruleset, rules, locale, schemas, parserOptions }: Partial<MLFabric>): void;
|
|
27
|
+
verify(fix?: boolean): Promise<Violation[]>;
|
|
28
|
+
private _createDocument;
|
|
29
|
+
private _parse;
|
|
19
30
|
}
|
package/lib/ml-rule/ml-rule.js
CHANGED
|
@@ -8,12 +8,13 @@ const is_plain_object_1 = require("is-plain-object");
|
|
|
8
8
|
const ml_rule_context_1 = require("./ml-rule-context");
|
|
9
9
|
class MLRule {
|
|
10
10
|
constructor(o) {
|
|
11
|
-
var _a
|
|
11
|
+
var _a;
|
|
12
12
|
_MLRule_f.set(this, void 0);
|
|
13
13
|
_MLRule_v.set(this, void 0);
|
|
14
14
|
this.name = o.name;
|
|
15
15
|
this.defaultSeverity = (_a = o.defaultSeverity) !== null && _a !== void 0 ? _a : 'error';
|
|
16
|
-
|
|
16
|
+
// TODO: https://github.com/markuplint/markuplint/issues/808
|
|
17
|
+
this.defaultValue = (o.defaultValue !== undefined ? o.defaultValue : true);
|
|
17
18
|
this.defaultOptions = o.defaultOptions;
|
|
18
19
|
tslib_1.__classPrivateFieldSet(this, _MLRule_v, o.verify, "f");
|
|
19
20
|
tslib_1.__classPrivateFieldSet(this, _MLRule_f, o.fix, "f");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/ml-core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"description": "The core module of markuplint",
|
|
5
5
|
"repository": "git@github.com:markuplint/markuplint.git",
|
|
6
6
|
"author": "Yusuke Hirao <yusukehirao@me.com>",
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"./lib/configs.js": "./lib/configs.browser.js"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@markuplint/config-presets": "3.
|
|
26
|
+
"@markuplint/config-presets": "3.6.0",
|
|
27
27
|
"@markuplint/html-parser": "3.6.1",
|
|
28
|
-
"@markuplint/html-spec": "3.
|
|
29
|
-
"@markuplint/i18n": "3.
|
|
28
|
+
"@markuplint/html-spec": "3.7.0",
|
|
29
|
+
"@markuplint/i18n": "3.7.0",
|
|
30
30
|
"@markuplint/ml-ast": "3.1.0",
|
|
31
|
-
"@markuplint/ml-config": "3.
|
|
32
|
-
"@markuplint/ml-spec": "3.
|
|
31
|
+
"@markuplint/ml-config": "3.7.0",
|
|
32
|
+
"@markuplint/ml-spec": "3.7.0",
|
|
33
33
|
"@markuplint/parser-utils": "3.6.1",
|
|
34
|
-
"@markuplint/selector": "3.
|
|
34
|
+
"@markuplint/selector": "3.7.0",
|
|
35
35
|
"debug": "^4.3.4",
|
|
36
36
|
"is-plain-object": "^5.0.0",
|
|
37
37
|
"tslib": "^2.4.1"
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"@types/debug": "^4.1.7",
|
|
41
41
|
"type-fest": "^3.6.1"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "42b97b47d22b37437024e693a72a458e2963e261"
|
|
44
44
|
}
|