markuplint 3.12.0 → 4.0.0-alpha.1

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.
Files changed (54) hide show
  1. package/README.md +1 -0
  2. package/bin/markuplint.mjs +3 -0
  3. package/lib/api/index.d.ts +2 -2
  4. package/lib/api/index.js +2 -10
  5. package/lib/api/lint.d.ts +2 -2
  6. package/lib/api/lint.js +5 -10
  7. package/lib/api/ml-engine.d.ts +7 -2
  8. package/lib/api/ml-engine.js +99 -99
  9. package/lib/api/types.js +1 -2
  10. package/lib/api/v1.d.ts +1 -1
  11. package/lib/api/v1.js +12 -20
  12. package/lib/cli/bootstrap.d.ts +4 -5
  13. package/lib/cli/bootstrap.js +7 -10
  14. package/lib/cli/command.d.ts +2 -2
  15. package/lib/cli/command.js +19 -25
  16. package/lib/cli/create-rule/index.js +26 -32
  17. package/lib/cli/index.js +26 -29
  18. package/lib/cli/init/create-config.d.ts +1 -1
  19. package/lib/cli/init/create-config.js +3 -8
  20. package/lib/cli/init/get-default-rules.d.ts +1 -1
  21. package/lib/cli/init/get-default-rules.js +8 -13
  22. package/lib/cli/init/index.js +30 -34
  23. package/lib/cli/init/install-module.d.ts +1 -1
  24. package/lib/cli/init/install-module.js +12 -18
  25. package/lib/cli/init/types.js +1 -2
  26. package/lib/cli/output.d.ts +2 -2
  27. package/lib/cli/output.js +8 -14
  28. package/lib/cli/prompt.js +15 -25
  29. package/lib/cli/search/index.d.ts +1 -1
  30. package/lib/cli/search/index.js +7 -11
  31. package/lib/debug.js +8 -13
  32. package/lib/get-json-module.d.ts +1 -0
  33. package/lib/get-json-module.js +10 -0
  34. package/lib/global-settings.js +2 -7
  35. package/lib/i18n.js +8 -15
  36. package/lib/index.d.ts +6 -5
  37. package/lib/index.js +6 -10
  38. package/lib/reporter/github-reporter.d.ts +1 -1
  39. package/lib/reporter/github-reporter.js +3 -7
  40. package/lib/reporter/index.d.ts +3 -3
  41. package/lib/reporter/index.js +3 -6
  42. package/lib/reporter/simple-reporter.d.ts +2 -2
  43. package/lib/reporter/simple-reporter.js +11 -16
  44. package/lib/reporter/standard-reporter.d.ts +2 -2
  45. package/lib/reporter/standard-reporter.js +17 -23
  46. package/lib/testing-tool/index.js +17 -25
  47. package/lib/types.js +1 -2
  48. package/lib/util.js +21 -33
  49. package/lib/v1.d.ts +1 -1
  50. package/lib/v1.js +1 -5
  51. package/lib/version.d.ts +1 -0
  52. package/lib/version.js +3 -0
  53. package/package.json +30 -25
  54. package/bin/markuplint +0 -3
package/lib/v1.js CHANGED
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.exec = void 0;
4
1
  /**
5
2
  * @deprecated
6
3
  */
7
- var v1_1 = require("./api/v1");
8
- Object.defineProperty(exports, "exec", { enumerable: true, get: function () { return v1_1.lint_v1; } });
4
+ export { lint_v1 as exec } from './api/v1.js';
@@ -0,0 +1 @@
1
+ export declare const version: string;
package/lib/version.js ADDED
@@ -0,0 +1,3 @@
1
+ // @ts-ignore
2
+ import pkg from '../package.json' assert { type: 'json' };
3
+ export const version = pkg.version;
package/package.json CHANGED
@@ -1,18 +1,23 @@
1
1
  {
2
2
  "name": "markuplint",
3
- "version": "3.12.0",
3
+ "version": "4.0.0-alpha.1",
4
4
  "description": "An HTML linter for all markup developers",
5
5
  "author": "Yusuke Hirao",
6
6
  "license": "MIT",
7
7
  "private": false,
8
8
  "repository": "git@github.com:markuplint/markuplint.git",
9
- "main": "lib/index.js",
10
- "types": "lib/index.d.ts",
9
+ "type": "module",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./lib/index.js"
13
+ }
14
+ },
15
+ "types": "./lib/index.d.ts",
11
16
  "typedoc": {
12
17
  "entryPoint": "./src/index.ts"
13
18
  },
14
19
  "bin": {
15
- "markuplint": "bin/markuplint"
20
+ "markuplint": "./bin/markuplint.mjs"
16
21
  },
17
22
  "scripts": {
18
23
  "build": "tsc",
@@ -20,17 +25,17 @@
20
25
  "clean": "tsc --build --clean"
21
26
  },
22
27
  "dependencies": {
23
- "@markuplint/create-rule-helper": "3.12.0",
24
- "@markuplint/file-resolver": "3.12.0",
25
- "@markuplint/html-parser": "3.10.0",
26
- "@markuplint/html-spec": "3.11.0",
27
- "@markuplint/i18n": "3.9.0",
28
- "@markuplint/ml-ast": "3.2.0",
29
- "@markuplint/ml-config": "3.11.0",
30
- "@markuplint/ml-core": "3.12.0",
31
- "@markuplint/ml-spec": "3.11.0",
32
- "@markuplint/rules": "3.12.0",
33
- "@markuplint/shared": "3.8.0",
28
+ "@markuplint/create-rule-helper": "4.0.0-alpha.1",
29
+ "@markuplint/file-resolver": "4.0.0-alpha.1",
30
+ "@markuplint/html-parser": "4.0.0-alpha.1",
31
+ "@markuplint/html-spec": "4.0.0-alpha.1",
32
+ "@markuplint/i18n": "4.0.0-alpha.1",
33
+ "@markuplint/ml-ast": "4.0.0-alpha.1",
34
+ "@markuplint/ml-config": "4.0.0-alpha.1",
35
+ "@markuplint/ml-core": "4.0.0-alpha.1",
36
+ "@markuplint/ml-spec": "4.0.0-alpha.1",
37
+ "@markuplint/rules": "4.0.0-alpha.1",
38
+ "@markuplint/shared": "4.0.0-alpha.1",
34
39
  "@types/cli-color": "^2.0.2",
35
40
  "@types/debug": "^4.1.8",
36
41
  "@types/has-yarn": "^1.0.1",
@@ -41,18 +46,18 @@
41
46
  "debug": "^4.3.4",
42
47
  "detect-installed": "^2.0.4",
43
48
  "eastasianwidth": "^0.2.0",
44
- "enquirer": "^2.3.6",
45
- "get-stdin": "8",
49
+ "enquirer": "^2.4.1",
50
+ "get-stdin": "^9.0.0",
46
51
  "gray-matter": "^4.0.3",
47
- "has-yarn": "2",
48
- "meow": "9",
49
- "node-fetch": "2",
50
- "os-locale": "5",
52
+ "has-yarn": "^3.0.0",
53
+ "meow": "^12.0.1",
54
+ "node-fetch": "^3.3.2",
55
+ "os-locale": "^6.0.2",
51
56
  "strict-event-emitter": "^0.5.0",
52
- "strip-ansi": "6",
53
- "tslib": "^2.6.0",
54
- "type-fest": "^3.12.0",
57
+ "strip-ansi": "^7.1.0",
58
+ "tslib": "^2.6.1",
59
+ "type-fest": "^4.1.0",
55
60
  "uuid": "^9.0.0"
56
61
  },
57
- "gitHead": "4ab20276db48a6acb29a923ea8666890ca853442"
62
+ "gitHead": "22502ee22a378ae766033d687dbc0443e5ed35dc"
58
63
  }
package/bin/markuplint DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- require('../lib/cli');