linted 19.3.0 → 19.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) 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/_strings/level.spec.d.ts +2 -0
  8. package/dist/_strings/level.spec.d.ts.map +1 -0
  9. package/dist/_strings/level.spec.js +31 -0
  10. package/dist/_strings/level.spec.js.map +1 -0
  11. package/dist/imports/index.d.ts.map +1 -1
  12. package/dist/imports/plugins.d.ts.map +1 -1
  13. package/dist/index.spec.d.ts +1 -0
  14. package/dist/index.spec.js +10 -1
  15. package/dist/index.spec.js.map +1 -1
  16. package/eslint.config.js +3 -3
  17. package/package.json +140 -140
  18. package/src/_strings/id.ts +18 -18
  19. package/src/_strings/index.ts +6 -6
  20. package/src/_strings/level.spec.ts +31 -0
  21. package/src/_strings/level.ts +6 -6
  22. package/src/_strings/state.ts +58 -58
  23. package/src/files/html.ts +1 -1
  24. package/src/files/index.ts +19 -19
  25. package/src/files/js.ts +4 -4
  26. package/src/files/json.ts +1 -1
  27. package/src/files/jsonc.ts +4 -4
  28. package/src/files/mocha.ts +4 -4
  29. package/src/files/mochaJs.ts +4 -4
  30. package/src/files/svelte.ts +1 -1
  31. package/src/files/ts.ts +1 -1
  32. package/src/files/yml.ts +1 -1
  33. package/src/imports/index.ts +7 -7
  34. package/src/imports/parsers.ts +13 -13
  35. package/src/imports/plugins.ts +17 -17
  36. package/src/index.spec.ts +11 -0
  37. package/src/index.ts +22 -22
  38. package/src/rules/html/enable.ts +120 -120
  39. package/src/rules/html/index.ts +3 -3
  40. package/src/rules/index.ts +19 -19
  41. package/src/rules/js/enable.ts +524 -524
  42. package/src/rules/js/index.ts +4 -4
  43. package/src/rules/js/stylistic.ts +608 -608
  44. package/src/rules/json/enable.ts +33 -33
  45. package/src/rules/json/enable_x.ts +95 -95
  46. package/src/rules/json/index.ts +4 -4
  47. package/src/rules/jsonc/index.ts +4 -4
  48. package/src/rules/jsonc/override.ts +16 -16
  49. package/src/rules/mocha/base.ts +7 -7
  50. package/src/rules/mocha/disable.ts +8 -8
  51. package/src/rules/mocha/enable.ts +53 -53
  52. package/src/rules/mocha/index.ts +7 -7
  53. package/src/rules/mochaJs/index.ts +7 -7
  54. package/src/rules/svelte/disable.ts +9 -9
  55. package/src/rules/svelte/disable_js.ts +11 -11
  56. package/src/rules/svelte/disable_ts.ts +9 -9
  57. package/src/rules/svelte/enable.ts +230 -230
  58. package/src/rules/svelte/enable_x.ts +20 -20
  59. package/src/rules/svelte/index.ts +15 -15
  60. package/src/rules/ts/disable.ts +22 -22
  61. package/src/rules/ts/disable_x.ts +32 -32
  62. package/src/rules/ts/enable.ts +550 -550
  63. package/src/rules/ts/enable_x.ts +115 -115
  64. package/src/rules/ts/index.ts +13 -13
  65. package/src/rules/yml/enable.ts +64 -64
  66. package/src/rules/yml/enable_x.ts +68 -68
  67. package/src/rules/yml/index.ts +4 -4
  68. package/tsconfig.json +163 -163
  69. package/typings/mocha.d.ts +3 -3
@@ -1,33 +1,33 @@
1
- import { enable, level } from "../../_strings";
2
-
3
- const { ERROR, OFF } = level;
4
-
5
- export default [
6
- enable,
7
- {
8
- // https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
9
- "jsonc/auto": OFF,
10
- "jsonc/key-name-casing": OFF,
11
- "jsonc/no-bigint-literals": ERROR,
12
- "jsonc/no-binary-expression": ERROR,
13
- "jsonc/no-binary-numeric-literals": ERROR,
14
- "jsonc/no-comments": ERROR /* comments are NOT allowed in JSON */,
15
- "jsonc/no-escape-sequence-in-identifier": ERROR,
16
- "jsonc/no-hexadecimal-numeric-literals": ERROR,
17
- "jsonc/no-infinity": ERROR,
18
- "jsonc/no-nan": ERROR,
19
- "jsonc/no-number-props": ERROR,
20
- "jsonc/no-numeric-separators": ERROR,
21
- "jsonc/no-octal-numeric-literals": ERROR,
22
- "jsonc/no-parenthesized": ERROR,
23
- "jsonc/no-plus-sign": ERROR,
24
- "jsonc/no-regexp-literals": ERROR,
25
- "jsonc/no-template-literals": ERROR,
26
- "jsonc/no-undefined-value": ERROR,
27
- "jsonc/no-unicode-codepoint-escapes": ERROR,
28
- "jsonc/sort-array-values": OFF,
29
- "jsonc/sort-keys": OFF,
30
- "jsonc/valid-json-number": ERROR,
31
- "jsonc/vue-custom-block/no-parsing-error": ERROR,
32
- },
33
- ] as const;
1
+ import { enable, level } from "../../_strings";
2
+
3
+ const { ERROR, OFF } = level;
4
+
5
+ export default [
6
+ enable,
7
+ {
8
+ // https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
9
+ "jsonc/auto": OFF,
10
+ "jsonc/key-name-casing": OFF,
11
+ "jsonc/no-bigint-literals": ERROR,
12
+ "jsonc/no-binary-expression": ERROR,
13
+ "jsonc/no-binary-numeric-literals": ERROR,
14
+ "jsonc/no-comments": ERROR /* comments are NOT allowed in JSON */,
15
+ "jsonc/no-escape-sequence-in-identifier": ERROR,
16
+ "jsonc/no-hexadecimal-numeric-literals": ERROR,
17
+ "jsonc/no-infinity": ERROR,
18
+ "jsonc/no-nan": ERROR,
19
+ "jsonc/no-number-props": ERROR,
20
+ "jsonc/no-numeric-separators": ERROR,
21
+ "jsonc/no-octal-numeric-literals": ERROR,
22
+ "jsonc/no-parenthesized": ERROR,
23
+ "jsonc/no-plus-sign": ERROR,
24
+ "jsonc/no-regexp-literals": ERROR,
25
+ "jsonc/no-template-literals": ERROR,
26
+ "jsonc/no-undefined-value": ERROR,
27
+ "jsonc/no-unicode-codepoint-escapes": ERROR,
28
+ "jsonc/sort-array-values": OFF,
29
+ "jsonc/sort-keys": OFF,
30
+ "jsonc/valid-json-number": ERROR,
31
+ "jsonc/vue-custom-block/no-parsing-error": ERROR,
32
+ },
33
+ ] as const;
@@ -1,95 +1,95 @@
1
- import { enable_x, level, state } from "../../_strings";
2
-
3
- const
4
- {
5
- ERROR,
6
- OFF,
7
- } = level,
8
- {
9
- Always,
10
- Consistent,
11
- Double,
12
- Last,
13
- Never,
14
- Strict,
15
- } = state;
16
-
17
- export default [
18
- enable_x,
19
- {
20
- // https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#extension-rules
21
- "jsonc/array-bracket-newline": OFF /* DO NOT CHANGE */,
22
- "jsonc/array-bracket-spacing": [
23
- ERROR,
24
- Never,
25
- {
26
- singleValue: false,
27
- objectsInArrays: false,
28
- arraysInArrays: false,
29
- },
30
- ] /* MUST match ../js/stylistic.ts */,
31
- "jsonc/array-element-newline": [
32
- ERROR,
33
- Consistent,
34
- ],
35
- "jsonc/comma-dangle": [ERROR, Never] /* trailing commas are NOT allowed in JSON */,
36
- "jsonc/comma-style": [ERROR, Last],
37
- "jsonc/indent": [ERROR, 2],
38
- "jsonc/key-spacing": [
39
- ERROR,
40
- {
41
- beforeColon: false,
42
- afterColon: true,
43
- mode: Strict,
44
- },
45
- ] /* MUST match ../js/stylistic.ts */,
46
- "jsonc/no-dupe-keys": ERROR,
47
- "jsonc/no-floating-decimal": ERROR,
48
- "jsonc/no-irregular-whitespace": [
49
- ERROR,
50
- {
51
- skipStrings: true,
52
- skipComments: true,
53
- skipRegExps: true,
54
- skipTemplates: true,
55
- skipJSXText: true,
56
- },
57
- ],
58
- "jsonc/no-multi-str": ERROR,
59
- "jsonc/no-octal-escape": ERROR,
60
- "jsonc/no-octal": ERROR,
61
- "jsonc/no-sparse-arrays": ERROR,
62
- "jsonc/no-useless-escape": ERROR,
63
- "jsonc/object-curly-newline": [
64
- ERROR,
65
- {
66
- consistent: true,
67
- multiline: true,
68
- minProperties: 4,
69
- },
70
- ] /* MUST match CHILD of ../js/stylistic.ts */,
71
- "jsonc/object-curly-spacing": [
72
- ERROR,
73
- Always,
74
- {
75
- arraysInObjects: true,
76
- objectsInObjects: true,
77
- },
78
- ] /* MUST match ../js/stylistic.ts */,
79
- "jsonc/object-property-newline": [
80
- ERROR,
81
- {
82
- allowAllPropertiesOnSameLine: true,
83
- },
84
- ] /* MUST match ../js/stylistic.ts */,
85
- "jsonc/quote-props": [ERROR, Always],
86
- "jsonc/quotes": [
87
- ERROR,
88
- Double,
89
- {
90
- avoidEscape: false,
91
- },
92
- ],
93
- "jsonc/space-unary-ops": ERROR,
94
- },
95
- ] as const;
1
+ import { enable_x, level, state } from "../../_strings";
2
+
3
+ const
4
+ {
5
+ ERROR,
6
+ OFF,
7
+ } = level,
8
+ {
9
+ Always,
10
+ Consistent,
11
+ Double,
12
+ Last,
13
+ Never,
14
+ Strict,
15
+ } = state;
16
+
17
+ export default [
18
+ enable_x,
19
+ {
20
+ // https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#extension-rules
21
+ "jsonc/array-bracket-newline": OFF /* DO NOT CHANGE */,
22
+ "jsonc/array-bracket-spacing": [
23
+ ERROR,
24
+ Never,
25
+ {
26
+ singleValue: false,
27
+ objectsInArrays: false,
28
+ arraysInArrays: false,
29
+ },
30
+ ] /* MUST match ../js/stylistic.ts */,
31
+ "jsonc/array-element-newline": [
32
+ ERROR,
33
+ Consistent,
34
+ ],
35
+ "jsonc/comma-dangle": [ERROR, Never] /* trailing commas are NOT allowed in JSON */,
36
+ "jsonc/comma-style": [ERROR, Last],
37
+ "jsonc/indent": [ERROR, 2],
38
+ "jsonc/key-spacing": [
39
+ ERROR,
40
+ {
41
+ beforeColon: false,
42
+ afterColon: true,
43
+ mode: Strict,
44
+ },
45
+ ] /* MUST match ../js/stylistic.ts */,
46
+ "jsonc/no-dupe-keys": ERROR,
47
+ "jsonc/no-floating-decimal": ERROR,
48
+ "jsonc/no-irregular-whitespace": [
49
+ ERROR,
50
+ {
51
+ skipStrings: true,
52
+ skipComments: true,
53
+ skipRegExps: true,
54
+ skipTemplates: true,
55
+ skipJSXText: true,
56
+ },
57
+ ],
58
+ "jsonc/no-multi-str": ERROR,
59
+ "jsonc/no-octal-escape": ERROR,
60
+ "jsonc/no-octal": ERROR,
61
+ "jsonc/no-sparse-arrays": ERROR,
62
+ "jsonc/no-useless-escape": ERROR,
63
+ "jsonc/object-curly-newline": [
64
+ ERROR,
65
+ {
66
+ consistent: true,
67
+ multiline: true,
68
+ minProperties: 4,
69
+ },
70
+ ] /* MUST match CHILD of ../js/stylistic.ts */,
71
+ "jsonc/object-curly-spacing": [
72
+ ERROR,
73
+ Always,
74
+ {
75
+ arraysInObjects: true,
76
+ objectsInObjects: true,
77
+ },
78
+ ] /* MUST match ../js/stylistic.ts */,
79
+ "jsonc/object-property-newline": [
80
+ ERROR,
81
+ {
82
+ allowAllPropertiesOnSameLine: true,
83
+ },
84
+ ] /* MUST match ../js/stylistic.ts */,
85
+ "jsonc/quote-props": [ERROR, Always],
86
+ "jsonc/quotes": [
87
+ ERROR,
88
+ Double,
89
+ {
90
+ avoidEscape: false,
91
+ },
92
+ ],
93
+ "jsonc/space-unary-ops": ERROR,
94
+ },
95
+ ] as const;
@@ -1,4 +1,4 @@
1
- import enable_x from "./enable_x";
2
- import enable from "./enable";
3
-
4
- export default [enable_x, enable];
1
+ import enable_x from "./enable_x";
2
+ import enable from "./enable";
3
+
4
+ export default [enable_x, enable];
@@ -1,4 +1,4 @@
1
- import json from "../json";
2
- import override from "./override";
3
-
4
- export default [...json, override];
1
+ import json from "../json";
2
+ import override from "./override";
3
+
4
+ export default [...json, override];
@@ -1,16 +1,16 @@
1
- import { override, level, state } from "../../_strings";
2
-
3
- const { ERROR, OFF } = level,
4
- { AlwaysMultiline } = state;
5
-
6
- export default [
7
- override,
8
- {
9
- // https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
10
- "jsonc/no-comments": OFF /* comments ARE allowed in JSONC */,
11
- "jsonc/comma-dangle": [
12
- ERROR,
13
- AlwaysMultiline,
14
- ] /* trailing commas ARE allowed in JSONC */,
15
- },
16
- ] as const;
1
+ import { override, level, state } from "../../_strings";
2
+
3
+ const { ERROR, OFF } = level,
4
+ { AlwaysMultiline } = state;
5
+
6
+ export default [
7
+ override,
8
+ {
9
+ // https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
10
+ "jsonc/no-comments": OFF /* comments ARE allowed in JSONC */,
11
+ "jsonc/comma-dangle": [
12
+ ERROR,
13
+ AlwaysMultiline,
14
+ ] /* trailing commas ARE allowed in JSONC */,
15
+ },
16
+ ] as const;
@@ -1,7 +1,7 @@
1
- import disable from "./disable";
2
- import enable from "./enable";
3
-
4
- export default [
5
- disable,
6
- enable,
7
- ];
1
+ import disable from "./disable";
2
+ import enable from "./enable";
3
+
4
+ export default [
5
+ disable,
6
+ enable,
7
+ ];
@@ -1,8 +1,8 @@
1
- import { disable, OFF } from "../../_strings";
2
-
3
- export default [
4
- disable,
5
- {
6
- "prefer-arrow-callback": OFF,
7
- },
8
- ] as const;
1
+ import { disable, OFF } from "../../_strings";
2
+
3
+ export default [
4
+ disable,
5
+ {
6
+ "prefer-arrow-callback": OFF,
7
+ },
8
+ ] as const;
@@ -1,53 +1,53 @@
1
- import {
2
- enable,
3
- ERROR,
4
- WARN,
5
- OFF,
6
- } from "../../_strings";
7
-
8
- export default [
9
- enable,
10
- {
11
- // https://github.com/lo1tuma/eslint-plugin-mocha/tree/main?tab=readme-ov-file#rules
12
- "mocha/consistent-spacing-between-blocks": OFF,
13
- "mocha/handle-done-callback": [
14
- ERROR,
15
- {
16
- ignoreSkipped: false,
17
- },
18
- ],
19
- "mocha/max-top-level-suites": [
20
- ERROR,
21
- {
22
- limit: 1,
23
- },
24
- ],
25
- "mocha/no-async-describe": ERROR,
26
- "mocha/no-empty-description": ERROR,
27
- "mocha/no-exclusive-tests": ERROR,
28
- "mocha/no-exports": ERROR,
29
- "mocha/no-global-tests": ERROR,
30
- "mocha/no-hooks-for-single-case": OFF,
31
- "mocha/no-hooks": OFF,
32
- "mocha/no-identical-title": ERROR,
33
- "mocha/no-mocha-arrows": ERROR,
34
- "mocha/no-nested-tests": ERROR,
35
- "mocha/no-pending-tests": WARN,
36
- "mocha/no-return-and-callback": ERROR,
37
- "mocha/no-return-from-async": ERROR,
38
- "mocha/no-setup-in-describe": ERROR,
39
- "mocha/no-sibling-hooks": ERROR,
40
- "mocha/no-skipped-tests": ERROR,
41
- "mocha/no-synchronous-tests": OFF,
42
- "mocha/no-top-level-hooks": ERROR,
43
- "mocha/prefer-arrow-callback": [
44
- ERROR,
45
- {
46
- allowNamedFunctions: false,
47
- allowUnboundThis: true,
48
- },
49
- ] /* MUST match ../js/enable.ts */,
50
- "mocha/valid-suite-description": OFF,
51
- "mocha/valid-test-description": OFF,
52
- },
53
- ] as const;
1
+ import {
2
+ enable,
3
+ ERROR,
4
+ WARN,
5
+ OFF,
6
+ } from "../../_strings";
7
+
8
+ export default [
9
+ enable,
10
+ {
11
+ // https://github.com/lo1tuma/eslint-plugin-mocha/tree/main?tab=readme-ov-file#rules
12
+ "mocha/consistent-spacing-between-blocks": OFF,
13
+ "mocha/handle-done-callback": [
14
+ ERROR,
15
+ {
16
+ ignoreSkipped: false,
17
+ },
18
+ ],
19
+ "mocha/max-top-level-suites": [
20
+ ERROR,
21
+ {
22
+ limit: 1,
23
+ },
24
+ ],
25
+ "mocha/no-async-describe": ERROR,
26
+ "mocha/no-empty-description": ERROR,
27
+ "mocha/no-exclusive-tests": ERROR,
28
+ "mocha/no-exports": ERROR,
29
+ "mocha/no-global-tests": ERROR,
30
+ "mocha/no-hooks-for-single-case": OFF,
31
+ "mocha/no-hooks": OFF,
32
+ "mocha/no-identical-title": ERROR,
33
+ "mocha/no-mocha-arrows": ERROR,
34
+ "mocha/no-nested-tests": ERROR,
35
+ "mocha/no-pending-tests": WARN,
36
+ "mocha/no-return-and-callback": ERROR,
37
+ "mocha/no-return-from-async": ERROR,
38
+ "mocha/no-setup-in-describe": ERROR,
39
+ "mocha/no-sibling-hooks": ERROR,
40
+ "mocha/no-skipped-tests": ERROR,
41
+ "mocha/no-synchronous-tests": OFF,
42
+ "mocha/no-top-level-hooks": ERROR,
43
+ "mocha/prefer-arrow-callback": [
44
+ ERROR,
45
+ {
46
+ allowNamedFunctions: false,
47
+ allowUnboundThis: true,
48
+ },
49
+ ] /* MUST match ../js/enable.ts */,
50
+ "mocha/valid-suite-description": OFF,
51
+ "mocha/valid-test-description": OFF,
52
+ },
53
+ ] as const;
@@ -1,7 +1,7 @@
1
- import ts from "../ts";
2
- import base from "./base";
3
-
4
- export default [
5
- ...ts,
6
- ...base,
7
- ];
1
+ import ts from "../ts";
2
+ import base from "./base";
3
+
4
+ export default [
5
+ ...ts,
6
+ ...base,
7
+ ];
@@ -1,7 +1,7 @@
1
- import js from "../js";
2
- import base from "../mocha/base";
3
-
4
- export default [
5
- ...js,
6
- ...base,
7
- ];
1
+ import js from "../js";
2
+ import base from "../mocha/base";
3
+
4
+ export default [
5
+ ...js,
6
+ ...base,
7
+ ];
@@ -1,9 +1,9 @@
1
- import { disable, OFF } from "../../_strings";
2
-
3
- export default [
4
- disable,
5
- {
6
- // http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
7
- "no-inner-declarations": OFF /* also disabled in SvelteDisableConflictJs per Svelte base config */,
8
- },
9
- ] as const;
1
+ import { disable, OFF } from "../../_strings";
2
+
3
+ export default [
4
+ disable,
5
+ {
6
+ // http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
7
+ "no-inner-declarations": OFF /* also disabled in SvelteDisableConflictJs per Svelte base config */,
8
+ },
9
+ ] as const;
@@ -1,11 +1,11 @@
1
- import { OFF } from "../../_strings";
2
-
3
- export default [
4
- "disable-js",
5
- {
6
- // Pulled from Svelte base config:
7
- // http://github.com/sveltejs/eslint-plugin-svelte/tree/main/src/configs/flat
8
- "no-inner-declarations": OFF /* ESLint */,
9
- "no-self-assign": OFF /* ESLint */,
10
- },
11
- ] as const;
1
+ import { OFF } from "../../_strings";
2
+
3
+ export default [
4
+ "disable-js",
5
+ {
6
+ // Pulled from Svelte base config:
7
+ // http://github.com/sveltejs/eslint-plugin-svelte/tree/main/src/configs/flat
8
+ "no-inner-declarations": OFF /* ESLint */,
9
+ "no-self-assign": OFF /* ESLint */,
10
+ },
11
+ ] as const;
@@ -1,9 +1,9 @@
1
- import { OFF } from "../../_strings";
2
-
3
- export default [
4
- "disable-ts",
5
- {
6
- "no-unused-vars": OFF /* ESLint */,
7
- "@typescript-eslint/no-unused-vars": OFF /* TS Extension */,
8
- },
9
- ] as const;
1
+ import { OFF } from "../../_strings";
2
+
3
+ export default [
4
+ "disable-ts",
5
+ {
6
+ "no-unused-vars": OFF /* ESLint */,
7
+ "@typescript-eslint/no-unused-vars": OFF /* TS Extension */,
8
+ },
9
+ ] as const;