Skip to content

Commit 7950e3d

Browse files
committed
Fix lint errors
1 parent 7ea1945 commit 7950e3d

8 files changed

Lines changed: 96 additions & 34 deletions

‎schemas/plugins/BannerPlugin.json‎

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"rule": {
55
"oneOf": [
66
{
7-
"instanceOf": "RegEx"
7+
"instanceof": "RegExp"
88
},
99
{
1010
"minLength": 1,
@@ -16,7 +16,12 @@
1616
"oneOf": [
1717
{
1818
"items": {
19-
"$ref": "#/definitions/rule"
19+
"description": "A rule condition",
20+
"anyOf": [
21+
{
22+
"$ref": "#/definitions/rule"
23+
}
24+
]
2025
},
2126
"type": "array"
2227
},
@@ -30,7 +35,9 @@
3035
{
3136
"type": "object",
3237
"additionalProperties": false,
33-
"required": ["banner"],
38+
"required": [
39+
"banner"
40+
],
3441
"properties": {
3542
"banner": {
3643
"description": "The banner as string, it will be wrapped in a comment",
@@ -45,13 +52,28 @@
4552
"type": "boolean"
4653
},
4754
"test": {
48-
"$ref": "#/definitions/rules"
55+
"description": "Include all modules that pass test assertion",
56+
"anyOf": [
57+
{
58+
"$ref": "#/definitions/rules"
59+
}
60+
]
4961
},
5062
"include": {
51-
"$ref": "#/definitions/rules"
63+
"description": "Include all modules matching any of these conditions",
64+
"anyOf": [
65+
{
66+
"$ref": "#/definitions/rules"
67+
}
68+
]
5269
},
5370
"exclude": {
54-
"$ref": "#/definitions/rules"
71+
"description": "Exclude all modules matching any of these conditions",
72+
"anyOf": [
73+
{
74+
"$ref": "#/definitions/rules"
75+
}
76+
]
5577
}
5678
}
5779
},

‎schemas/plugins/DllReferencePlugin.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"oneOf": [
1313
{
1414
"type": "object",
15+
"additionalProperties": false,
1516
"properties": {
1617
"content": {
1718
"description": "The mappings from request to module id",
@@ -67,6 +68,7 @@
6768
"description": "UNDOCUMENTED",
6869
"type": "array",
6970
"items": {
71+
"description": "UNDOCUMENTED",
7072
"type": "string"
7173
}
7274
}

‎schemas/plugins/HashedModuleIdsPlugin.json‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@
2121
},
2222
"hashDigest": {
2323
"description": "The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.",
24-
"enum": ["hex", "latin1", "base64"]
24+
"enum": [
25+
"hex",
26+
"latin1",
27+
"base64"
28+
]
2529
},
2630
"hashDigestLength": {
2731
"description": "The prefix length of the hash digest to use, defaults to 4.",

‎schemas/plugins/LoaderOptionsPlugin.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
"options": {
1515
"description": "A configuration object that can be used to configure older loaders",
1616
"type": "object",
17+
"additionalProperties": true,
1718
"properties": {
1819
"context": {
20+
"description": "The context that can be used to configure older loaders",
1921
"minLength": 1,
2022
"type": "string"
2123
}

‎schemas/plugins/SourceMapDevToolPlugin.json‎

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"rule": {
77
"oneOf": [
88
{
9-
"instanceOf": "RegEx"
9+
"instanceof": "RegExp"
1010
},
1111
{
1212
"minLength": 1,
@@ -18,7 +18,12 @@
1818
"oneOf": [
1919
{
2020
"items": {
21-
"$ref": "#/definitions/rule"
21+
"description": "A rule condition",
22+
"anyOf": [
23+
{
24+
"$ref": "#/definitions/rule"
25+
}
26+
]
2227
},
2328
"type": "array"
2429
},
@@ -31,22 +36,36 @@
3136
"properties": {
3237
"test": {
3338
"description": "Include source maps for modules based on their extension (defaults to .js and .css)",
34-
"$ref": "#/definitions/rules"
39+
"anyOf": [
40+
{
41+
"$ref": "#/definitions/rules"
42+
}
43+
]
3544
},
3645
"include": {
3746
"description": "Include source maps for module paths that match the given value",
38-
"$ref": "#/definitions/rules"
47+
"anyOf": [
48+
{
49+
"$ref": "#/definitions/rules"
50+
}
51+
]
3952
},
4053
"exclude": {
4154
"description": "Exclude modules that match the given value from source map generation",
42-
"$ref": "#/definitions/rules"
55+
"anyOf": [
56+
{
57+
"$ref": "#/definitions/rules"
58+
}
59+
]
4360
},
4461
"filename": {
4562
"description": "Defines the output filename of the SourceMap (will be inlined if no value is provided)",
4663
"oneOf": [
4764
{
4865
"description": "null is not documented, but appears in the codebase",
49-
"enum": [null]
66+
"enum": [
67+
null
68+
]
5069
},
5170
{
5271
"minLength": 1,
@@ -58,9 +77,11 @@
5877
"description": "Appends the given value to the original asset. Usually the #sourceMappingURL comment. [url] is replaced with a URL to the source map file. false disables the appending",
5978
"oneOf": [
6079
{
61-
"description":
62-
"null is not documented, but appears in the codebase",
63-
"enum": [false, null]
80+
"description": "null is not documented, but appears in the codebase",
81+
"enum": [
82+
false,
83+
null
84+
]
6485
},
6586
{
6687
"minLength": 1,
@@ -72,8 +93,7 @@
7293
"description": "See https://webpack.js.org/configuration/output/#output-devtoolmodulefilenametemplate",
7394
"oneOf": [
7495
{
75-
"description":
76-
"fn type undocumented (kinda) but appears in the codebase",
96+
"description": "fn type undocumented (kinda) but appears in the codebase",
7797
"instanceof": "Function"
7898
},
7999
{
@@ -110,15 +130,27 @@
110130
"properties": {
111131
"test": {
112132
"description": "Include source maps for modules based on their extension (defaults to .js and .css)",
113-
"$ref": "#/definitions/rules"
133+
"anyOf": [
134+
{
135+
"$ref": "#/definitions/rules"
136+
}
137+
]
114138
},
115139
"include": {
116140
"description": "Include source maps for module paths that match the given value",
117-
"$ref": "#/definitions/rules"
141+
"anyOf": [
142+
{
143+
"$ref": "#/definitions/rules"
144+
}
145+
]
118146
},
119147
"exclude": {
120148
"description": "Exclude modules that match the given value from source map generation",
121-
"$ref": "#/definitions/rules"
149+
"anyOf": [
150+
{
151+
"$ref": "#/definitions/rules"
152+
}
153+
]
122154
}
123155
}
124156
},

‎schemas/plugins/WatchIgnorePlugin.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"description": "A list of RegExps or absolute paths to directories or files that should be ignored",
44
"type": "array",
55
"items": {
6+
"description": "RegExp or absolute path to directories or files that should be ignored",
67
"oneOf": [
78
{
89
"type": "string"

‎schemas/plugins/optimize/CommonsChunkPlugin.json‎

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"description": "The chunk names of the commons chunk",
1111
"type": "array",
1212
"items": {
13+
"description": "Chunk name",
1314
"minLength": 1,
1415
"type": "string"
1516
}
@@ -27,19 +28,18 @@
2728
"description": "The chunk names of the commons chunk",
2829
"type": "array",
2930
"items": {
31+
"description": "Chunk name",
3032
"minLength": 1,
3133
"type": "string"
3234
}
3335
},
3436
"filename": {
35-
"description":
36-
"The filename template for the commons chunk",
37+
"description": "The filename template for the commons chunk",
3738
"minLength": 1,
3839
"type": "string"
3940
},
4041
"minChunks": {
41-
"description":
42-
"The minimum number of chunks which need to contain a module before it's moved into the commons chunk",
42+
"description": "The minimum number of chunks which need to contain a module before it's moved into the commons chunk",
4343
"oneOf": [
4444
{
4545
"type": "number"
@@ -53,23 +53,21 @@
5353
"description": "Select the source chunks by chunk names",
5454
"type": "array",
5555
"items": {
56+
"description": "Chunk name",
5657
"minLength": 1,
5758
"type": "string"
5859
}
5960
},
6061
"children": {
61-
"description":
62-
"If `true` all children of the commons chunk are selected",
62+
"description": "If `true` all children of the commons chunk are selected",
6363
"type": "boolean"
6464
},
6565
"deepChildren": {
66-
"description":
67-
"If `true` all descendants of the commons chunk are selected",
66+
"description": "If `true` all descendants of the commons chunk are selected",
6867
"type": "boolean"
6968
},
7069
"async": {
71-
"description":
72-
"If `true` a new async commons chunk is created as child of `options.name` and sibling of `options.chunks`. Instead of using `option.filename`, it is possible to change the name of the output file by providing the desired string here instead of `true`",
70+
"description": "If `true` a new async commons chunk is created as child of `options.name` and sibling of `options.chunks`. Instead of using `option.filename`, it is possible to change the name of the output file by providing the desired string here instead of `true`",
7371
"oneOf": [
7472
{
7573
"type": "boolean"
@@ -81,8 +79,7 @@
8179
]
8280
},
8381
"minSize": {
84-
"description":
85-
"Minimum size of all common module before a commons chunk is created",
82+
"description": "Minimum size of all common module before a commons chunk is created",
8683
"type": "number"
8784
}
8885
}

‎schemas/plugins/optimize/MinChunkSizePlugin.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
"id": "MinChunkSizePlugin",
33
"additionalProperties": false,
44
"type": "object",
5-
"required": ["minChunkSize"],
5+
"required": [
6+
"minChunkSize"
7+
],
68
"properties": {
79
"minChunkSize": {
810
"description": "Minimum number of characters",

0 commit comments

Comments
 (0)