@eslint/json 0.3.0 → 0.4.0
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.
- package/dist/cjs/index.cjs +6 -2
- package/dist/cjs/index.d.cts +47 -47
- package/dist/esm/index.d.ts +47 -47
- package/dist/esm/index.js +2 -2
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var momoa = require('@humanwhocodes/momoa');
|
|
4
6
|
|
|
5
7
|
/**
|
|
@@ -498,7 +500,7 @@ var noEmptyKeys = {
|
|
|
498
500
|
const plugin = {
|
|
499
501
|
meta: {
|
|
500
502
|
name: "@eslint/json",
|
|
501
|
-
version: "0.
|
|
503
|
+
version: "0.4.0", // x-release-please-version
|
|
502
504
|
},
|
|
503
505
|
languages: {
|
|
504
506
|
json: new JSONLanguage({ mode: "json" }),
|
|
@@ -522,4 +524,6 @@ Object.assign(plugin.configs, {
|
|
|
522
524
|
},
|
|
523
525
|
});
|
|
524
526
|
|
|
525
|
-
|
|
527
|
+
exports.JSONLanguage = JSONLanguage;
|
|
528
|
+
exports.JSONSourceCode = JSONSourceCode;
|
|
529
|
+
exports.default = plugin;
|
package/dist/cjs/index.d.cts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { plugin as default };
|
|
2
1
|
export type DocumentNode = import("@humanwhocodes/momoa").DocumentNode;
|
|
3
2
|
export type JSONNode = import("@humanwhocodes/momoa").Node;
|
|
4
3
|
export type JSONToken = import("@humanwhocodes/momoa").Token;
|
|
@@ -11,50 +10,6 @@ export type VisitTraversalStep = import("@eslint/core").VisitTraversalStep;
|
|
|
11
10
|
export type Language = import("@eslint/core").Language;
|
|
12
11
|
export type OkParseResult = import("@eslint/core").OkParseResult<DocumentNode>;
|
|
13
12
|
export type ParseResult = import("@eslint/core").ParseResult<DocumentNode>;
|
|
14
|
-
declare namespace plugin {
|
|
15
|
-
namespace meta {
|
|
16
|
-
let name: string;
|
|
17
|
-
let version: string;
|
|
18
|
-
}
|
|
19
|
-
namespace languages {
|
|
20
|
-
let json: JSONLanguage;
|
|
21
|
-
let jsonc: JSONLanguage;
|
|
22
|
-
let json5: JSONLanguage;
|
|
23
|
-
}
|
|
24
|
-
let rules: {
|
|
25
|
-
"no-duplicate-keys": {
|
|
26
|
-
meta: {
|
|
27
|
-
type: string;
|
|
28
|
-
docs: {
|
|
29
|
-
description: string;
|
|
30
|
-
};
|
|
31
|
-
messages: {
|
|
32
|
-
duplicateKey: string;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
create(context: any): {
|
|
36
|
-
Object(): void;
|
|
37
|
-
Member(node: any): void;
|
|
38
|
-
"Object:exit"(): void;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
"no-empty-keys": {
|
|
42
|
-
meta: {
|
|
43
|
-
type: string;
|
|
44
|
-
docs: {
|
|
45
|
-
description: string;
|
|
46
|
-
};
|
|
47
|
-
messages: {
|
|
48
|
-
emptyKey: string;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
create(context: any): {
|
|
52
|
-
Member(node: any): void;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
let configs: {};
|
|
57
|
-
}
|
|
58
13
|
/**
|
|
59
14
|
* @filedescription Functions to fix up rules to provide missing methods on the `context` object.
|
|
60
15
|
* @author Nicholas C. Zakas
|
|
@@ -66,7 +21,7 @@ declare namespace plugin {
|
|
|
66
21
|
* JSON Language Object
|
|
67
22
|
* @implements {Language}
|
|
68
23
|
*/
|
|
69
|
-
|
|
24
|
+
export class JSONLanguage implements Language {
|
|
70
25
|
/**
|
|
71
26
|
* Creates a new instance.
|
|
72
27
|
* @param {Object} options The options to use for this instance.
|
|
@@ -126,7 +81,7 @@ declare class JSONLanguage implements Language {
|
|
|
126
81
|
* JSON Source Code Object
|
|
127
82
|
* @implements {TextSourceCode}
|
|
128
83
|
*/
|
|
129
|
-
|
|
84
|
+
export class JSONSourceCode implements TextSourceCode {
|
|
130
85
|
/**
|
|
131
86
|
* Creates a new instance.
|
|
132
87
|
* @param {Object} options The options for the instance.
|
|
@@ -200,6 +155,50 @@ declare class JSONSourceCode implements TextSourceCode {
|
|
|
200
155
|
traverse(): Iterable<JSONTraversalStep>;
|
|
201
156
|
#private;
|
|
202
157
|
}
|
|
158
|
+
declare namespace plugin {
|
|
159
|
+
namespace meta {
|
|
160
|
+
let name: string;
|
|
161
|
+
let version: string;
|
|
162
|
+
}
|
|
163
|
+
namespace languages {
|
|
164
|
+
let json: JSONLanguage;
|
|
165
|
+
let jsonc: JSONLanguage;
|
|
166
|
+
let json5: JSONLanguage;
|
|
167
|
+
}
|
|
168
|
+
let rules: {
|
|
169
|
+
"no-duplicate-keys": {
|
|
170
|
+
meta: {
|
|
171
|
+
type: string;
|
|
172
|
+
docs: {
|
|
173
|
+
description: string;
|
|
174
|
+
};
|
|
175
|
+
messages: {
|
|
176
|
+
duplicateKey: string;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
create(context: any): {
|
|
180
|
+
Object(): void;
|
|
181
|
+
Member(node: any): void;
|
|
182
|
+
"Object:exit"(): void;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
"no-empty-keys": {
|
|
186
|
+
meta: {
|
|
187
|
+
type: string;
|
|
188
|
+
docs: {
|
|
189
|
+
description: string;
|
|
190
|
+
};
|
|
191
|
+
messages: {
|
|
192
|
+
emptyKey: string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
create(context: any): {
|
|
196
|
+
Member(node: any): void;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
let configs: {};
|
|
201
|
+
}
|
|
203
202
|
/**
|
|
204
203
|
* @fileoverview The JSONSourceCode class.
|
|
205
204
|
* @author Nicholas C. Zakas
|
|
@@ -259,3 +258,4 @@ declare class JSONTraversalStep implements VisitTraversalStep {
|
|
|
259
258
|
*/
|
|
260
259
|
args: Array<any>;
|
|
261
260
|
}
|
|
261
|
+
export { plugin as default };
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { plugin as default };
|
|
2
1
|
export type DocumentNode = import("@humanwhocodes/momoa").DocumentNode;
|
|
3
2
|
export type JSONNode = import("@humanwhocodes/momoa").Node;
|
|
4
3
|
export type JSONToken = import("@humanwhocodes/momoa").Token;
|
|
@@ -11,50 +10,6 @@ export type VisitTraversalStep = import("@eslint/core").VisitTraversalStep;
|
|
|
11
10
|
export type Language = import("@eslint/core").Language;
|
|
12
11
|
export type OkParseResult = import("@eslint/core").OkParseResult<DocumentNode>;
|
|
13
12
|
export type ParseResult = import("@eslint/core").ParseResult<DocumentNode>;
|
|
14
|
-
declare namespace plugin {
|
|
15
|
-
namespace meta {
|
|
16
|
-
let name: string;
|
|
17
|
-
let version: string;
|
|
18
|
-
}
|
|
19
|
-
namespace languages {
|
|
20
|
-
let json: JSONLanguage;
|
|
21
|
-
let jsonc: JSONLanguage;
|
|
22
|
-
let json5: JSONLanguage;
|
|
23
|
-
}
|
|
24
|
-
let rules: {
|
|
25
|
-
"no-duplicate-keys": {
|
|
26
|
-
meta: {
|
|
27
|
-
type: string;
|
|
28
|
-
docs: {
|
|
29
|
-
description: string;
|
|
30
|
-
};
|
|
31
|
-
messages: {
|
|
32
|
-
duplicateKey: string;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
create(context: any): {
|
|
36
|
-
Object(): void;
|
|
37
|
-
Member(node: any): void;
|
|
38
|
-
"Object:exit"(): void;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
"no-empty-keys": {
|
|
42
|
-
meta: {
|
|
43
|
-
type: string;
|
|
44
|
-
docs: {
|
|
45
|
-
description: string;
|
|
46
|
-
};
|
|
47
|
-
messages: {
|
|
48
|
-
emptyKey: string;
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
create(context: any): {
|
|
52
|
-
Member(node: any): void;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
let configs: {};
|
|
57
|
-
}
|
|
58
13
|
/**
|
|
59
14
|
* @filedescription Functions to fix up rules to provide missing methods on the `context` object.
|
|
60
15
|
* @author Nicholas C. Zakas
|
|
@@ -66,7 +21,7 @@ declare namespace plugin {
|
|
|
66
21
|
* JSON Language Object
|
|
67
22
|
* @implements {Language}
|
|
68
23
|
*/
|
|
69
|
-
|
|
24
|
+
export class JSONLanguage implements Language {
|
|
70
25
|
/**
|
|
71
26
|
* Creates a new instance.
|
|
72
27
|
* @param {Object} options The options to use for this instance.
|
|
@@ -126,7 +81,7 @@ declare class JSONLanguage implements Language {
|
|
|
126
81
|
* JSON Source Code Object
|
|
127
82
|
* @implements {TextSourceCode}
|
|
128
83
|
*/
|
|
129
|
-
|
|
84
|
+
export class JSONSourceCode implements TextSourceCode {
|
|
130
85
|
/**
|
|
131
86
|
* Creates a new instance.
|
|
132
87
|
* @param {Object} options The options for the instance.
|
|
@@ -200,6 +155,50 @@ declare class JSONSourceCode implements TextSourceCode {
|
|
|
200
155
|
traverse(): Iterable<JSONTraversalStep>;
|
|
201
156
|
#private;
|
|
202
157
|
}
|
|
158
|
+
declare namespace plugin {
|
|
159
|
+
namespace meta {
|
|
160
|
+
let name: string;
|
|
161
|
+
let version: string;
|
|
162
|
+
}
|
|
163
|
+
namespace languages {
|
|
164
|
+
let json: JSONLanguage;
|
|
165
|
+
let jsonc: JSONLanguage;
|
|
166
|
+
let json5: JSONLanguage;
|
|
167
|
+
}
|
|
168
|
+
let rules: {
|
|
169
|
+
"no-duplicate-keys": {
|
|
170
|
+
meta: {
|
|
171
|
+
type: string;
|
|
172
|
+
docs: {
|
|
173
|
+
description: string;
|
|
174
|
+
};
|
|
175
|
+
messages: {
|
|
176
|
+
duplicateKey: string;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
create(context: any): {
|
|
180
|
+
Object(): void;
|
|
181
|
+
Member(node: any): void;
|
|
182
|
+
"Object:exit"(): void;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
"no-empty-keys": {
|
|
186
|
+
meta: {
|
|
187
|
+
type: string;
|
|
188
|
+
docs: {
|
|
189
|
+
description: string;
|
|
190
|
+
};
|
|
191
|
+
messages: {
|
|
192
|
+
emptyKey: string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
create(context: any): {
|
|
196
|
+
Member(node: any): void;
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
let configs: {};
|
|
201
|
+
}
|
|
203
202
|
/**
|
|
204
203
|
* @fileoverview The JSONSourceCode class.
|
|
205
204
|
* @author Nicholas C. Zakas
|
|
@@ -259,3 +258,4 @@ declare class JSONTraversalStep implements VisitTraversalStep {
|
|
|
259
258
|
*/
|
|
260
259
|
args: Array<any>;
|
|
261
260
|
}
|
|
261
|
+
export { plugin as default };
|
package/dist/esm/index.js
CHANGED
|
@@ -497,7 +497,7 @@ var noEmptyKeys = {
|
|
|
497
497
|
const plugin = {
|
|
498
498
|
meta: {
|
|
499
499
|
name: "@eslint/json",
|
|
500
|
-
version: "0.
|
|
500
|
+
version: "0.4.0", // x-release-please-version
|
|
501
501
|
},
|
|
502
502
|
languages: {
|
|
503
503
|
json: new JSONLanguage({ mode: "json" }),
|
|
@@ -521,4 +521,4 @@ Object.assign(plugin.configs, {
|
|
|
521
521
|
},
|
|
522
522
|
});
|
|
523
523
|
|
|
524
|
-
export { plugin as default };
|
|
524
|
+
export { JSONLanguage, JSONSourceCode, plugin as default };
|