linted 19.3.1 → 19.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. package/.github/workflows/RELEASE.yml +36 -36
  2. package/.github/workflows/rc.yml +36 -36
  3. package/.markdownlint.jsonc +124 -124
  4. package/LICENSE +21 -21
  5. package/README.md +387 -387
  6. package/SECURITY.md +9 -9
  7. package/dist/imports/index.d.ts.map +1 -1
  8. package/dist/imports/plugins.d.ts.map +1 -1
  9. package/dist/rules/index.d.ts +4 -0
  10. package/dist/rules/index.d.ts.map +1 -1
  11. package/dist/rules/js/index.d.ts +1 -0
  12. package/dist/rules/js/index.d.ts.map +1 -1
  13. package/dist/rules/js/stylistic.d.ts +1 -0
  14. package/dist/rules/js/stylistic.d.ts.map +1 -1
  15. package/dist/rules/js/stylistic.js +4 -1
  16. package/dist/rules/js/stylistic.js.map +1 -1
  17. package/dist/rules/mocha/index.d.ts +1 -0
  18. package/dist/rules/mocha/index.d.ts.map +1 -1
  19. package/dist/rules/mochaJs/index.d.ts +1 -0
  20. package/dist/rules/mochaJs/index.d.ts.map +1 -1
  21. package/dist/rules/svelte/index.d.ts +1 -0
  22. package/dist/rules/svelte/index.d.ts.map +1 -1
  23. package/dist/rules/ts/index.d.ts +1 -0
  24. package/dist/rules/ts/index.d.ts.map +1 -1
  25. package/eslint.config.js +3 -3
  26. package/package.json +140 -140
  27. package/src/_strings/id.ts +18 -18
  28. package/src/_strings/index.ts +6 -6
  29. package/src/_strings/level.spec.ts +31 -31
  30. package/src/_strings/level.ts +6 -6
  31. package/src/_strings/state.ts +58 -58
  32. package/src/files/html.ts +1 -1
  33. package/src/files/index.ts +19 -19
  34. package/src/files/js.ts +4 -4
  35. package/src/files/json.ts +1 -1
  36. package/src/files/jsonc.ts +4 -4
  37. package/src/files/mocha.ts +4 -4
  38. package/src/files/mochaJs.ts +4 -4
  39. package/src/files/svelte.ts +1 -1
  40. package/src/files/ts.ts +1 -1
  41. package/src/files/yml.ts +1 -1
  42. package/src/imports/index.ts +7 -7
  43. package/src/imports/parsers.ts +13 -13
  44. package/src/imports/plugins.ts +17 -17
  45. package/src/index.spec.ts +11 -11
  46. package/src/index.ts +22 -22
  47. package/src/rules/html/enable.ts +120 -120
  48. package/src/rules/html/index.ts +3 -3
  49. package/src/rules/index.ts +19 -19
  50. package/src/rules/js/enable.ts +524 -524
  51. package/src/rules/js/index.ts +4 -4
  52. package/src/rules/js/stylistic.ts +611 -608
  53. package/src/rules/json/enable.ts +33 -33
  54. package/src/rules/json/enable_x.ts +95 -95
  55. package/src/rules/json/index.ts +4 -4
  56. package/src/rules/jsonc/index.ts +4 -4
  57. package/src/rules/jsonc/override.ts +16 -16
  58. package/src/rules/mocha/base.ts +7 -7
  59. package/src/rules/mocha/disable.ts +8 -8
  60. package/src/rules/mocha/enable.ts +53 -53
  61. package/src/rules/mocha/index.ts +7 -7
  62. package/src/rules/mochaJs/index.ts +7 -7
  63. package/src/rules/svelte/disable.ts +9 -9
  64. package/src/rules/svelte/disable_js.ts +11 -11
  65. package/src/rules/svelte/disable_ts.ts +9 -9
  66. package/src/rules/svelte/enable.ts +230 -230
  67. package/src/rules/svelte/enable_x.ts +20 -20
  68. package/src/rules/svelte/index.ts +15 -15
  69. package/src/rules/ts/disable.ts +22 -22
  70. package/src/rules/ts/disable_x.ts +32 -32
  71. package/src/rules/ts/enable.ts +550 -550
  72. package/src/rules/ts/enable_x.ts +115 -115
  73. package/src/rules/ts/index.ts +13 -13
  74. package/src/rules/yml/enable.ts +64 -64
  75. package/src/rules/yml/enable_x.ts +68 -68
  76. package/src/rules/yml/index.ts +4 -4
  77. package/tsconfig.json +163 -163
  78. package/typings/mocha.d.ts +3 -3
@@ -1,120 +1,120 @@
1
- import type * as Rule from "@html-eslint/eslint-plugin/types/rules";
2
- import {
3
- enable,
4
- ERROR,
5
- OFF,
6
- Never,
7
- } from "../../_strings";
8
-
9
- const rules: Partial<Record<`@html-eslint/${keyof typeof Rule}`, unknown>> = {
10
- // #region BEST PRACTICE
11
- // https://html-eslint.org/docs/rules#best-practice
12
- "@html-eslint/no-duplicate-attrs": ERROR,
13
- "@html-eslint/no-duplicate-id": ERROR,
14
- "@html-eslint/no-extra-spacing-text": [
15
- ERROR,
16
- {
17
- skip: [],
18
- },
19
- ],
20
- "@html-eslint/no-inline-styles": OFF /* breaks Svele app.html */,
21
- "@html-eslint/no-obsolete-tags": ERROR,
22
- "@html-eslint/no-restricted-attr-values": OFF,
23
- "@html-eslint/no-restricted-attrs": OFF,
24
- "@html-eslint/no-script-style-type": OFF,
25
- "@html-eslint/no-target-blank": ERROR,
26
- "@html-eslint/require-attrs": OFF,
27
- "@html-eslint/require-button-type": ERROR,
28
- "@html-eslint/require-closing-tags": [
29
- ERROR,
30
- {
31
- selfClosing: Never,
32
- selfClosingCustomPatterns: [""] /* regex[], intention: any custom pattern is allowed */,
33
- },
34
- ],
35
- "@html-eslint/require-doctype": ERROR,
36
- "@html-eslint/require-li-container": ERROR,
37
- "@html-eslint/require-meta-charset": ERROR,
38
-
39
- // #endregion BEST PRACTICE
40
-
41
- // #region SEO
42
- // https://html-eslint.org/docs/rules#seo
43
- "@html-eslint/no-multiple-h1": ERROR,
44
- "@html-eslint/require-lang": ERROR,
45
- "@html-eslint/require-meta-description": OFF /* breaks Svelte which leaves meta descriptions to route leaves */,
46
- "@html-eslint/require-open-graph-protocol": OFF /* idk what this is */,
47
- "@html-eslint/require-title": OFF /* breaks Svelte which leaves title to route leaves */,
48
-
49
- // #endregion SEO
50
-
51
- // #region ACCESSIBILITY
52
- // https://html-eslint.org/docs/rules#accessibility
53
- "@html-eslint/no-abstract-roles": ERROR,
54
- "@html-eslint/no-accesskey-attrs": ERROR,
55
- "@html-eslint/no-aria-hidden-body": ERROR,
56
- "@html-eslint/no-non-scalable-viewport": ERROR,
57
- "@html-eslint/no-positive-tabindex": ERROR,
58
- "@html-eslint/no-skip-heading-levels": ERROR,
59
- "@html-eslint/require-frame-title": ERROR,
60
- "@html-eslint/require-img-alt": [
61
- ERROR,
62
- {
63
- substitute: [],
64
- },
65
- ],
66
- "@html-eslint/require-meta-viewport": ERROR,
67
-
68
- // #endregion ACCESSIBILITY
69
-
70
- // #region STYLE
71
- // https://html-eslint.org/docs/rules#style
72
-
73
- // #endregion STYLE
74
- "@html-eslint/attrs-newline": [
75
- ERROR,
76
- {
77
- ifAttrsMoreThan: 0,
78
- closeStyle: "sameline",
79
- },
80
- ],
81
- "@html-eslint/element-newline": [
82
- ERROR,
83
- {
84
- skip: ["head"],
85
- inline: ["$inline"],
86
- },
87
- ],
88
- "@html-eslint/id-naming-convention": OFF,
89
- "@html-eslint/indent": [
90
- ERROR,
91
- 2,
92
- ],
93
- "@html-eslint/lowercase": ERROR,
94
- "@html-eslint/no-extra-spacing-attrs": [
95
- ERROR,
96
- {
97
- enforceBeforeSelfClose: true,
98
- disallowMissing: true,
99
- disallowTabs: true,
100
- disallowInAssignment: true,
101
- },
102
- ],
103
- "@html-eslint/no-multiple-empty-lines": [
104
- ERROR,
105
- {
106
- max: 1,
107
- },
108
- ],
109
- "@html-eslint/no-trailing-spaces": ERROR,
110
- "@html-eslint/quotes": [
111
- ERROR,
112
- "double",
113
- ],
114
- "@html-eslint/sort-attrs": OFF,
115
- } as const;
116
-
117
- export default [
118
- enable,
119
- rules,
120
- ] as const;
1
+ import type * as Rule from "@html-eslint/eslint-plugin/types/rules";
2
+ import {
3
+ enable,
4
+ ERROR,
5
+ OFF,
6
+ Never,
7
+ } from "../../_strings";
8
+
9
+ const rules: Partial<Record<`@html-eslint/${keyof typeof Rule}`, unknown>> = {
10
+ // #region BEST PRACTICE
11
+ // https://html-eslint.org/docs/rules#best-practice
12
+ "@html-eslint/no-duplicate-attrs": ERROR,
13
+ "@html-eslint/no-duplicate-id": ERROR,
14
+ "@html-eslint/no-extra-spacing-text": [
15
+ ERROR,
16
+ {
17
+ skip: [],
18
+ },
19
+ ],
20
+ "@html-eslint/no-inline-styles": OFF /* breaks Svele app.html */,
21
+ "@html-eslint/no-obsolete-tags": ERROR,
22
+ "@html-eslint/no-restricted-attr-values": OFF,
23
+ "@html-eslint/no-restricted-attrs": OFF,
24
+ "@html-eslint/no-script-style-type": OFF,
25
+ "@html-eslint/no-target-blank": ERROR,
26
+ "@html-eslint/require-attrs": OFF,
27
+ "@html-eslint/require-button-type": ERROR,
28
+ "@html-eslint/require-closing-tags": [
29
+ ERROR,
30
+ {
31
+ selfClosing: Never,
32
+ selfClosingCustomPatterns: [""] /* regex[], intention: any custom pattern is allowed */,
33
+ },
34
+ ],
35
+ "@html-eslint/require-doctype": ERROR,
36
+ "@html-eslint/require-li-container": ERROR,
37
+ "@html-eslint/require-meta-charset": ERROR,
38
+
39
+ // #endregion BEST PRACTICE
40
+
41
+ // #region SEO
42
+ // https://html-eslint.org/docs/rules#seo
43
+ "@html-eslint/no-multiple-h1": ERROR,
44
+ "@html-eslint/require-lang": ERROR,
45
+ "@html-eslint/require-meta-description": OFF /* breaks Svelte which leaves meta descriptions to route leaves */,
46
+ "@html-eslint/require-open-graph-protocol": OFF /* idk what this is */,
47
+ "@html-eslint/require-title": OFF /* breaks Svelte which leaves title to route leaves */,
48
+
49
+ // #endregion SEO
50
+
51
+ // #region ACCESSIBILITY
52
+ // https://html-eslint.org/docs/rules#accessibility
53
+ "@html-eslint/no-abstract-roles": ERROR,
54
+ "@html-eslint/no-accesskey-attrs": ERROR,
55
+ "@html-eslint/no-aria-hidden-body": ERROR,
56
+ "@html-eslint/no-non-scalable-viewport": ERROR,
57
+ "@html-eslint/no-positive-tabindex": ERROR,
58
+ "@html-eslint/no-skip-heading-levels": ERROR,
59
+ "@html-eslint/require-frame-title": ERROR,
60
+ "@html-eslint/require-img-alt": [
61
+ ERROR,
62
+ {
63
+ substitute: [],
64
+ },
65
+ ],
66
+ "@html-eslint/require-meta-viewport": ERROR,
67
+
68
+ // #endregion ACCESSIBILITY
69
+
70
+ // #region STYLE
71
+ // https://html-eslint.org/docs/rules#style
72
+
73
+ // #endregion STYLE
74
+ "@html-eslint/attrs-newline": [
75
+ ERROR,
76
+ {
77
+ ifAttrsMoreThan: 0,
78
+ closeStyle: "sameline",
79
+ },
80
+ ],
81
+ "@html-eslint/element-newline": [
82
+ ERROR,
83
+ {
84
+ skip: ["head"],
85
+ inline: ["$inline"],
86
+ },
87
+ ],
88
+ "@html-eslint/id-naming-convention": OFF,
89
+ "@html-eslint/indent": [
90
+ ERROR,
91
+ 2,
92
+ ],
93
+ "@html-eslint/lowercase": ERROR,
94
+ "@html-eslint/no-extra-spacing-attrs": [
95
+ ERROR,
96
+ {
97
+ enforceBeforeSelfClose: true,
98
+ disallowMissing: true,
99
+ disallowTabs: true,
100
+ disallowInAssignment: true,
101
+ },
102
+ ],
103
+ "@html-eslint/no-multiple-empty-lines": [
104
+ ERROR,
105
+ {
106
+ max: 1,
107
+ },
108
+ ],
109
+ "@html-eslint/no-trailing-spaces": ERROR,
110
+ "@html-eslint/quotes": [
111
+ ERROR,
112
+ "double",
113
+ ],
114
+ "@html-eslint/sort-attrs": OFF,
115
+ } as const;
116
+
117
+ export default [
118
+ enable,
119
+ rules,
120
+ ] as const;
@@ -1,3 +1,3 @@
1
- import enable from "./enable";
2
-
3
- export default [enable];
1
+ import enable from "./enable";
2
+
3
+ export default [enable];
@@ -1,19 +1,19 @@
1
- import js from "./js";
2
- import ts from "./ts";
3
- import svelte from "./svelte";
4
- import mocha from "./mocha";
5
- import html from "./html";
6
- import json from "./json";
7
- import jsonc from "./jsonc";
8
- import yml from "./yml";
9
-
10
- export default {
11
- js,
12
- ts,
13
- svelte,
14
- mocha,
15
- html,
16
- json,
17
- jsonc,
18
- yml,
19
- };
1
+ import js from "./js";
2
+ import ts from "./ts";
3
+ import svelte from "./svelte";
4
+ import mocha from "./mocha";
5
+ import html from "./html";
6
+ import json from "./json";
7
+ import jsonc from "./jsonc";
8
+ import yml from "./yml";
9
+
10
+ export default {
11
+ js,
12
+ ts,
13
+ svelte,
14
+ mocha,
15
+ html,
16
+ json,
17
+ jsonc,
18
+ yml,
19
+ };