linted 21.0.0-rc.16 → 21.0.0-rc.18
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/imports/index.d.ts +363 -1
- package/dist/imports/index.d.ts.map +1 -1
- package/dist/imports/parsers.d.ts +2 -0
- package/dist/imports/parsers.d.ts.map +1 -1
- package/dist/imports/parsers.js +2 -0
- package/dist/imports/parsers.js.map +1 -1
- package/dist/imports/plugins.d.ts +362 -2
- package/dist/imports/plugins.d.ts.map +1 -1
- package/dist/imports/plugins.js +2 -2
- package/dist/imports/plugins.js.map +1 -1
- package/dist/rules/index.d.ts +115 -176
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/json/enable.d.ts +23 -99
- package/dist/rules/json/enable.d.ts.map +1 -1
- package/dist/rules/json/enable.js +24 -142
- package/dist/rules/json/enable.js.map +1 -1
- package/dist/rules/json/enable_x.d.ts +46 -2
- package/dist/rules/json/enable_x.d.ts.map +1 -1
- package/dist/rules/json/enable_x.js +74 -3
- package/dist/rules/json/enable_x.js.map +1 -1
- package/dist/rules/json/index.d.ts +56 -88
- package/dist/rules/json/index.d.ts.map +1 -1
- package/dist/rules/json/index.js +2 -2
- package/dist/rules/json/index.js.map +1 -1
- package/dist/rules/jsonc/index.d.ts +77 -3
- package/dist/rules/jsonc/index.d.ts.map +1 -1
- package/dist/rules/jsonc/index.js +5 -1
- package/dist/rules/jsonc/index.js.map +1 -1
- package/dist/rules/jsonc/override.d.ts +6 -0
- package/dist/rules/jsonc/override.d.ts.map +1 -0
- package/dist/rules/jsonc/override.js +12 -0
- package/dist/rules/jsonc/override.js.map +1 -0
- package/package.json +4 -3
- package/src/imports/parsers.ts +2 -0
- package/src/imports/plugins.ts +2 -2
- package/src/rules/json/enable.ts +25 -148
- package/src/rules/json/enable_x.ts +80 -3
- package/src/rules/json/index.ts +2 -2
- package/src/rules/jsonc/index.ts +5 -1
- package/src/rules/jsonc/override.ts +18 -0
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"_schemaVersion": "22.11.0",
|
3
3
|
"name": "linted",
|
4
|
-
"version": "21.0.0-rc.
|
4
|
+
"version": "21.0.0-rc.18",
|
5
5
|
"description": "ESLint mono-plugin bundler with strict, opinionated defaults for (Stylistic) JavaScript, TypeScript, Svelte, HTML, Tailwind/CSS, JSON, JSONC, YAML, and Mocha.",
|
6
6
|
"keywords": [
|
7
7
|
"eslint",
|
@@ -62,16 +62,17 @@
|
|
62
62
|
}
|
63
63
|
},
|
64
64
|
"dependencies": {
|
65
|
-
"@
|
66
|
-
"@eslinted/core": "11.0.0-rc.2",
|
65
|
+
"@eslinted/core": "11.0.0-rc.3",
|
67
66
|
"@html-eslint/eslint-plugin": "0.27.0",
|
68
67
|
"@html-eslint/parser": "0.27.0",
|
69
68
|
"@stylistic/eslint-plugin": "2.10.1",
|
70
69
|
"@typescript-eslint/eslint-plugin": "8.13.0",
|
71
70
|
"@typescript-eslint/parser": "8.13.0",
|
71
|
+
"eslint-plugin-jsonc": "2.17.0",
|
72
72
|
"eslint-plugin-mocha": "10.5.0",
|
73
73
|
"eslint-plugin-svelte": "2.46.0",
|
74
74
|
"eslint-plugin-yml": "1.15.0",
|
75
|
+
"jsonc-eslint-parser": "2.4.0",
|
75
76
|
"svelte": "^5.1.12",
|
76
77
|
"svelte-eslint-parser": "0.43.0",
|
77
78
|
"yaml-eslint-parser": "1.2.3"
|
package/src/imports/parsers.ts
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
import ts from "@typescript-eslint/parser";
|
2
2
|
import svelte from "svelte-eslint-parser";
|
3
3
|
import html from "@html-eslint/parser";
|
4
|
+
import jsonc from "jsonc-eslint-parser";
|
4
5
|
import yml from "yaml-eslint-parser";
|
5
6
|
|
6
7
|
export default {
|
7
8
|
ts,
|
8
9
|
svelte,
|
9
10
|
html,
|
11
|
+
jsonc,
|
10
12
|
yml,
|
11
13
|
} as const;
|
package/src/imports/plugins.ts
CHANGED
@@ -3,7 +3,7 @@ import typescript_eslint from "@typescript-eslint/eslint-plugin";
|
|
3
3
|
import svelte from "eslint-plugin-svelte";
|
4
4
|
import mocha from "eslint-plugin-mocha";
|
5
5
|
import html_eslint from "@html-eslint/eslint-plugin";
|
6
|
-
import
|
6
|
+
import jsonc from "eslint-plugin-jsonc";
|
7
7
|
import yml from "eslint-plugin-yml";
|
8
8
|
|
9
9
|
export default {
|
@@ -12,6 +12,6 @@ export default {
|
|
12
12
|
svelte,
|
13
13
|
mocha,
|
14
14
|
"@html-eslint": html_eslint,
|
15
|
-
|
15
|
+
jsonc,
|
16
16
|
yml,
|
17
17
|
} as const;
|
package/src/rules/json/enable.ts
CHANGED
@@ -1,158 +1,35 @@
|
|
1
1
|
import {
|
2
2
|
enable,
|
3
3
|
ERROR,
|
4
|
-
|
5
|
-
Always,
|
6
|
-
Last,
|
7
|
-
Never,
|
8
|
-
Strict,
|
9
|
-
Consistent,
|
4
|
+
OFF,
|
10
5
|
} from "../../_strings";
|
11
6
|
|
12
7
|
export default [
|
13
8
|
enable,
|
14
9
|
{
|
15
|
-
// https://
|
16
|
-
"
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
"
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
"
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
"
|
37
|
-
|
38
|
-
|
39
|
-
{
|
40
|
-
allowSingleLine: true,
|
41
|
-
},
|
42
|
-
] /* https://eslint.org/docs/latest/rules/brace-style */,
|
43
|
-
"comma-dangle": [
|
44
|
-
ERROR,
|
45
|
-
AlwaysMultiline,
|
46
|
-
] /* https://eslint.org/docs/latest/rules/comma-dangle */,
|
47
|
-
"comma-spacing": [
|
48
|
-
ERROR,
|
49
|
-
{
|
50
|
-
before: false,
|
51
|
-
after: true,
|
52
|
-
},
|
53
|
-
] /* https://eslint.org/docs/latest/rules/comma-spacing */,
|
54
|
-
"comma-style": [
|
55
|
-
ERROR,
|
56
|
-
Last,
|
57
|
-
{
|
58
|
-
exceptions: {
|
59
|
-
ArrayExpression: false,
|
60
|
-
ArrayPattern: false,
|
61
|
-
ArrowFunctionExpression: false,
|
62
|
-
CallExpression: false,
|
63
|
-
FunctionDeclaration: false,
|
64
|
-
FunctionExpression: false,
|
65
|
-
ImportDeclaration: false,
|
66
|
-
ObjectExpression: false,
|
67
|
-
ObjectPattern: false,
|
68
|
-
VariableDeclaration: false,
|
69
|
-
NewExpression: false,
|
70
|
-
},
|
71
|
-
},
|
72
|
-
] /* https://eslint.org/docs/latest/rules/comma-style */,
|
73
|
-
"eol-last": [
|
74
|
-
ERROR,
|
75
|
-
Always,
|
76
|
-
] /* https://eslint.org/docs/latest/rules/eol-last */,
|
77
|
-
"key-spacing": [
|
78
|
-
ERROR,
|
79
|
-
{
|
80
|
-
beforeColon: false,
|
81
|
-
afterColon: true,
|
82
|
-
mode: Strict,
|
83
|
-
},
|
84
|
-
] /* https://eslint.org/docs/latest/rules/key-spacing */,
|
85
|
-
indent: [
|
86
|
-
ERROR,
|
87
|
-
2,
|
88
|
-
{
|
89
|
-
ignoredNodes: [],
|
90
|
-
SwitchCase: 1,
|
91
|
-
VariableDeclarator: { "var": 0, let: 0, "const": 0 },
|
92
|
-
outerIIFEBody: 0,
|
93
|
-
MemberExpression: 1,
|
94
|
-
FunctionDeclaration: { parameters: 1, body: 1 },
|
95
|
-
FunctionExpression: { parameters: 1, body: 1 },
|
96
|
-
StaticBlock: { body: 1 },
|
97
|
-
CallExpression: { arguments: 1 },
|
98
|
-
ArrayExpression: 1,
|
99
|
-
ObjectExpression: 1,
|
100
|
-
ImportDeclaration: 1,
|
101
|
-
flatTernaryExpressions: false,
|
102
|
-
offsetTernaryExpressions: true,
|
103
|
-
ignoreComments: false,
|
104
|
-
},
|
105
|
-
] /* https://eslint.org/docs/latest/rules/indent */,
|
106
|
-
"no-mixed-spaces-and-tabs": ERROR /* https://eslint.org/docs/latest/rules/no-mixed-spaces-and-tabs */,
|
107
|
-
"no-multi-spaces": [
|
108
|
-
ERROR,
|
109
|
-
{
|
110
|
-
ignoreEOLComments: false,
|
111
|
-
exceptions: {
|
112
|
-
Property: false,
|
113
|
-
ImportAttributes: false,
|
114
|
-
},
|
115
|
-
},
|
116
|
-
] /* https://eslint.org/docs/latest/rules/no-multi-spaces */,
|
117
|
-
"no-multiple-empty-lines": [
|
118
|
-
ERROR,
|
119
|
-
{
|
120
|
-
max: 1,
|
121
|
-
maxEOF: 1,
|
122
|
-
maxBOF: 0,
|
123
|
-
},
|
124
|
-
] /* https://eslint.org/docs/latest/rules/no-multiple-empty-lines */,
|
125
|
-
"no-tabs": [
|
126
|
-
ERROR,
|
127
|
-
{
|
128
|
-
allowIndentationTabs: false,
|
129
|
-
},
|
130
|
-
] /* https://eslint.org/docs/latest/rules/no-tabs */,
|
131
|
-
"no-trailing-spaces": [
|
132
|
-
ERROR,
|
133
|
-
{
|
134
|
-
skipBlankLines: false,
|
135
|
-
ignoreComments: false,
|
136
|
-
},
|
137
|
-
] /* https://eslint.org/docs/latest/rules/no-trailing-spaces */,
|
138
|
-
"no-whitespace-before-property": ERROR /* https://eslint.org/docs/latest/rules/no-whitespace-before-property */,
|
139
|
-
"object-curly-newline": [
|
140
|
-
ERROR,
|
141
|
-
Consistent,
|
142
|
-
] /* https://eslint.org/docs/latest/rules/object-curly-newline */,
|
143
|
-
"object-curly-spacing": [
|
144
|
-
ERROR,
|
145
|
-
Always,
|
146
|
-
{
|
147
|
-
arraysInObjects: true,
|
148
|
-
objectsInObjects: true,
|
149
|
-
},
|
150
|
-
] /* https://eslint.org/docs/latest/rules/object-curly-spacing */,
|
151
|
-
"object-property-newline": [
|
152
|
-
ERROR,
|
153
|
-
{
|
154
|
-
allowAllPropertiesOnSameLine: true,
|
155
|
-
},
|
156
|
-
] /* https://eslint.org/docs/latest/rules/object-property-newline */,
|
10
|
+
// https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
|
11
|
+
"jsonc/auto": OFF,
|
12
|
+
"jsonc/key-name-casing": OFF,
|
13
|
+
"jsonc/no-bigint-literals": ERROR,
|
14
|
+
"jsonc/no-binary-expression": ERROR,
|
15
|
+
"jsonc/no-binary-numeric-literals": ERROR,
|
16
|
+
"jsonc/no-comments": ERROR /* comments are NOT allowed in JSON */,
|
17
|
+
"jsonc/no-escape-sequence-in-identifier": ERROR,
|
18
|
+
"jsonc/no-hexadecimal-numeric-literals": ERROR,
|
19
|
+
"jsonc/no-infinity": ERROR,
|
20
|
+
"jsonc/no-nan": ERROR,
|
21
|
+
"jsonc/no-number-props": ERROR,
|
22
|
+
"jsonc/no-numeric-separators": ERROR,
|
23
|
+
"jsonc/no-octal-numeric-literals": ERROR,
|
24
|
+
"jsonc/no-parenthesized": ERROR,
|
25
|
+
"jsonc/no-plus-sign": ERROR,
|
26
|
+
"jsonc/no-regexp-literals": ERROR,
|
27
|
+
"jsonc/no-template-literals": ERROR,
|
28
|
+
"jsonc/no-undefined-value": ERROR,
|
29
|
+
"jsonc/no-unicode-codepoint-escapes": ERROR,
|
30
|
+
"jsonc/sort-array-values": OFF,
|
31
|
+
"jsonc/sort-keys": OFF,
|
32
|
+
"jsonc/valid-json-number": ERROR,
|
33
|
+
"jsonc/vue-custom-block/no-parsing-error": ERROR,
|
157
34
|
},
|
158
35
|
] as const;
|
@@ -2,13 +2,90 @@ import {
|
|
2
2
|
enable_x,
|
3
3
|
ERROR,
|
4
4
|
OFF,
|
5
|
+
Always,
|
6
|
+
Consistent,
|
7
|
+
Double,
|
8
|
+
Last,
|
9
|
+
Never,
|
10
|
+
Strict,
|
5
11
|
} from "../../_strings";
|
6
12
|
|
7
13
|
export default [
|
8
14
|
enable_x,
|
9
15
|
{
|
10
|
-
// https://github.
|
11
|
-
"
|
12
|
-
"
|
16
|
+
// https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#extension-rules
|
17
|
+
"jsonc/array-bracket-newline": OFF /* DO NOT CHANGE */,
|
18
|
+
"jsonc/array-bracket-spacing": [
|
19
|
+
ERROR,
|
20
|
+
Never,
|
21
|
+
{
|
22
|
+
singleValue: false,
|
23
|
+
objectsInArrays: false,
|
24
|
+
arraysInArrays: false,
|
25
|
+
},
|
26
|
+
] /* MUST match ../js/stylistic.ts */,
|
27
|
+
"jsonc/array-element-newline": [
|
28
|
+
ERROR,
|
29
|
+
Consistent,
|
30
|
+
],
|
31
|
+
"jsonc/comma-dangle": [ERROR, Never] /* trailing commas are NOT allowed in JSON */,
|
32
|
+
"jsonc/comma-style": [ERROR, Last],
|
33
|
+
"jsonc/indent": [ERROR, 2],
|
34
|
+
"jsonc/key-spacing": [
|
35
|
+
ERROR,
|
36
|
+
{
|
37
|
+
beforeColon: false,
|
38
|
+
afterColon: true,
|
39
|
+
mode: Strict,
|
40
|
+
},
|
41
|
+
] /* MUST match ../js/stylistic.ts */,
|
42
|
+
"jsonc/no-dupe-keys": ERROR,
|
43
|
+
"jsonc/no-floating-decimal": ERROR,
|
44
|
+
"jsonc/no-irregular-whitespace": [
|
45
|
+
ERROR,
|
46
|
+
{
|
47
|
+
skipStrings: true,
|
48
|
+
skipComments: true,
|
49
|
+
skipRegExps: true,
|
50
|
+
skipTemplates: true,
|
51
|
+
skipJSXText: true,
|
52
|
+
},
|
53
|
+
],
|
54
|
+
"jsonc/no-multi-str": ERROR,
|
55
|
+
"jsonc/no-octal-escape": ERROR,
|
56
|
+
"jsonc/no-octal": ERROR,
|
57
|
+
"jsonc/no-sparse-arrays": ERROR,
|
58
|
+
"jsonc/no-useless-escape": ERROR,
|
59
|
+
"jsonc/object-curly-newline": [
|
60
|
+
ERROR,
|
61
|
+
{
|
62
|
+
consistent: true,
|
63
|
+
multiline: true,
|
64
|
+
minProperties: 4,
|
65
|
+
},
|
66
|
+
] /* MUST match CHILD of ../js/stylistic.ts */,
|
67
|
+
"jsonc/object-curly-spacing": [
|
68
|
+
ERROR,
|
69
|
+
Always,
|
70
|
+
{
|
71
|
+
arraysInObjects: true,
|
72
|
+
objectsInObjects: true,
|
73
|
+
},
|
74
|
+
] /* MUST match ../js/stylistic.ts */,
|
75
|
+
"jsonc/object-property-newline": [
|
76
|
+
ERROR,
|
77
|
+
{
|
78
|
+
allowAllPropertiesOnSameLine: true,
|
79
|
+
},
|
80
|
+
] /* MUST match ../js/stylistic.ts */,
|
81
|
+
"jsonc/quote-props": [ERROR, Always],
|
82
|
+
"jsonc/quotes": [
|
83
|
+
ERROR,
|
84
|
+
Double,
|
85
|
+
{
|
86
|
+
avoidEscape: false,
|
87
|
+
},
|
88
|
+
],
|
89
|
+
"jsonc/space-unary-ops": ERROR,
|
13
90
|
},
|
14
91
|
] as const;
|
package/src/rules/json/index.ts
CHANGED
package/src/rules/jsonc/index.ts
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
import {
|
2
|
+
override,
|
3
|
+
ERROR,
|
4
|
+
OFF,
|
5
|
+
AlwaysMultiline,
|
6
|
+
} from "../../_strings";
|
7
|
+
|
8
|
+
export default [
|
9
|
+
override,
|
10
|
+
{
|
11
|
+
// https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
|
12
|
+
"jsonc/no-comments": OFF /* comments ARE allowed in JSONC */,
|
13
|
+
"jsonc/comma-dangle": [
|
14
|
+
ERROR,
|
15
|
+
AlwaysMultiline,
|
16
|
+
] /* trailing commas ARE allowed in JSONC */,
|
17
|
+
},
|
18
|
+
] as const;
|