markuplint 3.13.0 → 4.0.0-alpha.2

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 (53) hide show
  1. package/bin/markuplint.mjs +3 -0
  2. package/lib/api/index.d.ts +2 -2
  3. package/lib/api/index.js +2 -10
  4. package/lib/api/lint.d.ts +2 -2
  5. package/lib/api/lint.js +5 -10
  6. package/lib/api/ml-engine.d.ts +7 -2
  7. package/lib/api/ml-engine.js +99 -99
  8. package/lib/api/types.js +1 -2
  9. package/lib/api/v1.d.ts +1 -1
  10. package/lib/api/v1.js +12 -20
  11. package/lib/cli/bootstrap.d.ts +4 -5
  12. package/lib/cli/bootstrap.js +7 -10
  13. package/lib/cli/command.d.ts +2 -2
  14. package/lib/cli/command.js +19 -25
  15. package/lib/cli/create-rule/index.js +26 -32
  16. package/lib/cli/index.js +26 -29
  17. package/lib/cli/init/create-config.d.ts +1 -1
  18. package/lib/cli/init/create-config.js +3 -8
  19. package/lib/cli/init/get-default-rules.d.ts +1 -1
  20. package/lib/cli/init/get-default-rules.js +8 -13
  21. package/lib/cli/init/index.js +30 -34
  22. package/lib/cli/init/install-module.d.ts +1 -1
  23. package/lib/cli/init/install-module.js +12 -18
  24. package/lib/cli/init/types.js +1 -2
  25. package/lib/cli/output.d.ts +2 -2
  26. package/lib/cli/output.js +8 -14
  27. package/lib/cli/prompt.js +15 -25
  28. package/lib/cli/search/index.d.ts +1 -1
  29. package/lib/cli/search/index.js +7 -11
  30. package/lib/debug.js +8 -13
  31. package/lib/get-json-module.d.ts +1 -0
  32. package/lib/get-json-module.js +10 -0
  33. package/lib/global-settings.js +2 -7
  34. package/lib/i18n.js +8 -15
  35. package/lib/index.d.ts +6 -5
  36. package/lib/index.js +6 -10
  37. package/lib/reporter/github-reporter.d.ts +1 -1
  38. package/lib/reporter/github-reporter.js +3 -7
  39. package/lib/reporter/index.d.ts +3 -3
  40. package/lib/reporter/index.js +3 -6
  41. package/lib/reporter/simple-reporter.d.ts +2 -2
  42. package/lib/reporter/simple-reporter.js +11 -16
  43. package/lib/reporter/standard-reporter.d.ts +2 -2
  44. package/lib/reporter/standard-reporter.js +17 -23
  45. package/lib/testing-tool/index.js +17 -25
  46. package/lib/types.js +1 -2
  47. package/lib/util.js +21 -33
  48. package/lib/v1.d.ts +1 -1
  49. package/lib/v1.js +1 -5
  50. package/lib/version.d.ts +1 -0
  51. package/lib/version.js +3 -0
  52. package/package.json +34 -26
  53. 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,58 +1,66 @@
1
1
  {
2
2
  "name": "markuplint",
3
- "version": "3.13.0",
3
+ "version": "4.0.0-alpha.2",
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",
19
24
  "dev": "tsc --build --watch",
20
25
  "clean": "tsc --build --clean"
21
26
  },
27
+ "devDependencies": {
28
+ "execa": "^8.0.1"
29
+ },
22
30
  "dependencies": {
23
- "@markuplint/create-rule-helper": "3.13.0",
24
- "@markuplint/file-resolver": "3.13.0",
25
- "@markuplint/html-parser": "3.11.0",
26
- "@markuplint/html-spec": "3.12.0",
27
- "@markuplint/i18n": "3.10.0",
28
- "@markuplint/ml-ast": "3.2.0",
29
- "@markuplint/ml-config": "3.12.0",
30
- "@markuplint/ml-core": "3.13.0",
31
- "@markuplint/ml-spec": "3.12.0",
32
- "@markuplint/rules": "3.13.0",
33
- "@markuplint/shared": "3.8.0",
31
+ "@markuplint/create-rule-helper": "4.0.0-alpha.2",
32
+ "@markuplint/file-resolver": "4.0.0-alpha.2",
33
+ "@markuplint/html-parser": "4.0.0-alpha.2",
34
+ "@markuplint/html-spec": "4.0.0-alpha.2",
35
+ "@markuplint/i18n": "4.0.0-alpha.2",
36
+ "@markuplint/ml-ast": "4.0.0-alpha.2",
37
+ "@markuplint/ml-config": "4.0.0-alpha.2",
38
+ "@markuplint/ml-core": "4.0.0-alpha.2",
39
+ "@markuplint/ml-spec": "4.0.0-alpha.2",
40
+ "@markuplint/rules": "4.0.0-alpha.2",
41
+ "@markuplint/shared": "4.0.0-alpha.2",
34
42
  "@types/cli-color": "^2.0.3",
35
- "@types/debug": "^4.1.8",
43
+ "@types/debug": "^4.1.9",
36
44
  "@types/has-yarn": "^1.0.1",
37
45
  "@types/meow": "^6.0.0",
38
- "@types/uuid": "^9.0.3",
46
+ "@types/uuid": "^9.0.4",
39
47
  "chokidar": "^3.5.3",
40
48
  "cli-color": "^2.0.3",
41
49
  "debug": "^4.3.4",
42
50
  "detect-installed": "^2.0.4",
43
51
  "eastasianwidth": "^0.2.0",
44
52
  "enquirer": "^2.4.1",
45
- "get-stdin": "8",
53
+ "get-stdin": "^9.0.0",
46
54
  "gray-matter": "^4.0.3",
47
- "has-yarn": "2",
48
- "meow": "9",
49
- "node-fetch": "2",
50
- "os-locale": "5",
51
- "strict-event-emitter": "^0.5.0",
52
- "strip-ansi": "6",
55
+ "has-yarn": "^3.0.0",
56
+ "meow": "^12.1.1",
57
+ "node-fetch": "^3.3.2",
58
+ "os-locale": "^6.0.2",
59
+ "strict-event-emitter": "^0.5.1",
60
+ "strip-ansi": "^7.1.0",
53
61
  "tslib": "^2.6.2",
54
62
  "type-fest": "^4.3.1",
55
- "uuid": "^9.0.0"
63
+ "uuid": "^9.0.1"
56
64
  },
57
- "gitHead": "ef31aef8f2fff319d0f692feead332ec5fc5c7cf"
65
+ "gitHead": "51ad52c760435641f9bff8685707d8178b0787eb"
58
66
  }
package/bin/markuplint DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- require('../lib/cli');