Skip to content

Commit ab2a604

Browse files
skipjackbebraw
authored andcommitted
Fix Testing/Linting Issues (docschina#1112)
* refactor: clean up lint scripts and remove `lint:md` The `lint:md` command isn't very semantic as it stands right now and also isn't very useful. We'd have to split out a separate eslint config for this and even then it might be hard to strike a nice balance. * fix: update markdownlint configuration and fix a bunch of errors * fix: resolve alex warnings by allowing a wider range of words * fix: format all config files consistently * refactor: reformat proselintrc after editorconfig changes * fix: update `deploy.sh` to run all test scripts
1 parent c59f44c commit ab2a604

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+598
-249
lines changed

.alexrc

+20-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
11
{
2-
"allow": ["boogeyman-boogeywoman"]
2+
"allow": [
3+
"bigger",
4+
"color",
5+
"lies",
6+
"execute",
7+
"executed",
8+
"execution",
9+
"host-hostess",
10+
"disabled",
11+
"crash",
12+
"failure",
13+
"period",
14+
"hook",
15+
"dirty",
16+
"host-hostess",
17+
"fire",
18+
"remains",
19+
"jade",
20+
"failed"
21+
]
322
}

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ indent_style = space
1111
indent_size = 2
1212

1313
# Format Config
14-
[{package.json}]
14+
[{package.json,.alexrc,babelrc,.eslintignore,.eslintrc,.markdownlintrc,.proselintrc}]
1515
indent_style = space
1616
indent_size = 2

.markdownlintrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"default": true,
33
"MD002": false,
44
"MD007": { "indent": 4 },
5-
"MD013": { "line_length": 500 },
5+
"MD013": { "line_length": 600 },
6+
"MD026": false,
67
"MD029": { "style": "ordered"},
78
"MD033": false,
89
"MD034": false,

.proselintrc

+82-82
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,84 @@
11
{
2-
"max_errors": 1000,
3-
"checks": {
4-
"phrasal_adjectives.ly" : false,
5-
"preferred_forms" : false,
6-
"airlinese.misc" : true,
7-
"annotations.misc" : false,
8-
"archaism.misc" : true,
9-
"cliches.hell" : true,
10-
"cliches.misc" : true,
11-
"consistency.spacing" : true,
12-
"consistency.spelling" : true,
13-
"corporate_speak.misc" : true,
14-
"cursing.filth" : true,
15-
"cursing.nfl" : false,
16-
"cursing.nword" : true,
17-
"dates_times.am_pm" : true,
18-
"dates_times.dates" : true,
19-
"hedging.misc" : true,
20-
"hyperbole.misc" : false,
21-
"jargon.misc" : true,
22-
"lexical_illusions.misc" : true,
23-
"links.broken" : false,
24-
"malapropisms.misc" : true,
25-
"misc.apologizing" : true,
26-
"misc.back_formations" : true,
27-
"misc.bureaucratese" : true,
28-
"misc.but" : false,
29-
"misc.capitalization" : true,
30-
"misc.chatspeak" : true,
31-
"misc.commercialese" : true,
32-
"misc.composition" : true,
33-
"misc.currency" : true,
34-
"misc.debased" : true,
35-
"misc.false_plurals" : true,
36-
"misc.illogic" : true,
37-
"misc.inferior_superior" : true,
38-
"misc.latin" : true,
39-
"misc.many_a" : true,
40-
"misc.metaconcepts" : true,
41-
"misc.metadiscourse" : true,
42-
"misc.narcissism" : true,
43-
"misc.not_guilty" : true,
44-
"misc.phrasal_adjectives" : false,
45-
"misc.preferred_forms" : false,
46-
"misc.pretension" : true,
47-
"misc.professions" : true,
48-
"misc.punctuation" : true,
49-
"misc.scare_quotes" : true,
50-
"misc.suddenly" : true,
51-
"misc.tense_present" : true,
52-
"misc.waxed" : true,
53-
"misc.whence" : true,
54-
"mixed_metaphors.misc" : true,
55-
"mondegreens.misc" : true,
56-
"needless_variants.misc" : true,
57-
"nonwords.misc" : true,
58-
"oxymorons.misc" : true,
59-
"psychology.misc" : true,
60-
"redundancy.misc" : true,
61-
"redundancy.ras_syndrome" : true,
62-
"skunked_terms.misc" : true,
63-
"spelling.able_atable" : true,
64-
"spelling.able_ible" : true,
65-
"spelling.athletes" : true,
66-
"spelling.em_im_en_in" : true,
67-
"spelling.er_or" : true,
68-
"spelling.in_un" : true,
69-
"spelling.misc" : true,
70-
"security.credit_card" : true,
71-
"security.password" : true,
72-
"sexism.misc" : true,
73-
"terms.animal_adjectives" : true,
74-
"terms.denizen_labels" : true,
75-
"terms.eponymous_adjectives" : true,
76-
"terms.venery" : true,
77-
"typography.diacritical_marks" : true,
78-
"typography.exclamation" : false,
79-
"typography.symbols" : false,
80-
"uncomparables.misc" : true,
81-
"weasel_words.misc" : true,
82-
"weasel_words.very" : true
83-
}
2+
"max_errors": 1000,
3+
"checks": {
4+
"phrasal_adjectives.ly" : false,
5+
"preferred_forms" : false,
6+
"airlinese.misc" : true,
7+
"annotations.misc" : false,
8+
"archaism.misc" : true,
9+
"cliches.hell" : true,
10+
"cliches.misc" : true,
11+
"consistency.spacing" : true,
12+
"consistency.spelling" : true,
13+
"corporate_speak.misc" : true,
14+
"cursing.filth" : true,
15+
"cursing.nfl" : false,
16+
"cursing.nword" : true,
17+
"dates_times.am_pm" : true,
18+
"dates_times.dates" : true,
19+
"hedging.misc" : true,
20+
"hyperbole.misc" : false,
21+
"jargon.misc" : true,
22+
"lexical_illusions.misc" : true,
23+
"links.broken" : false,
24+
"malapropisms.misc" : true,
25+
"misc.apologizing" : true,
26+
"misc.back_formations" : true,
27+
"misc.bureaucratese" : true,
28+
"misc.but" : false,
29+
"misc.capitalization" : true,
30+
"misc.chatspeak" : true,
31+
"misc.commercialese" : true,
32+
"misc.composition" : true,
33+
"misc.currency" : true,
34+
"misc.debased" : true,
35+
"misc.false_plurals" : true,
36+
"misc.illogic" : true,
37+
"misc.inferior_superior" : true,
38+
"misc.latin" : true,
39+
"misc.many_a" : true,
40+
"misc.metaconcepts" : true,
41+
"misc.metadiscourse" : true,
42+
"misc.narcissism" : true,
43+
"misc.not_guilty" : true,
44+
"misc.phrasal_adjectives" : false,
45+
"misc.preferred_forms" : false,
46+
"misc.pretension" : true,
47+
"misc.professions" : true,
48+
"misc.punctuation" : true,
49+
"misc.scare_quotes" : true,
50+
"misc.suddenly" : true,
51+
"misc.tense_present" : true,
52+
"misc.waxed" : true,
53+
"misc.whence" : true,
54+
"mixed_metaphors.misc" : true,
55+
"mondegreens.misc" : true,
56+
"needless_variants.misc" : true,
57+
"nonwords.misc" : true,
58+
"oxymorons.misc" : true,
59+
"psychology.misc" : true,
60+
"redundancy.misc" : true,
61+
"redundancy.ras_syndrome" : true,
62+
"skunked_terms.misc" : true,
63+
"spelling.able_atable" : true,
64+
"spelling.able_ible" : true,
65+
"spelling.athletes" : true,
66+
"spelling.em_im_en_in" : true,
67+
"spelling.er_or" : true,
68+
"spelling.in_un" : true,
69+
"spelling.misc" : true,
70+
"security.credit_card" : true,
71+
"security.password" : true,
72+
"sexism.misc" : true,
73+
"terms.animal_adjectives" : true,
74+
"terms.denizen_labels" : true,
75+
"terms.eponymous_adjectives" : true,
76+
"terms.venery" : true,
77+
"typography.diacritical_marks" : true,
78+
"typography.exclamation" : false,
79+
"typography.symbols" : false,
80+
"uncomparables.misc" : true,
81+
"weasel_words.misc" : true,
82+
"weasel_words.very" : true
83+
}
8484
}

content/api/cli.md

+19-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
title: Command Line Interface (CLI)
33
sort: 2
44
contributors:
5-
- ev1stensberg
6-
- simon04
5+
- ev1stensberg
6+
- simon04
77
---
88

99
webpack provides a Command Line Interface (CLI) to configure and interact with your build. This is mostly useful in case of early prototyping, profiling, writing npm scripts or personal customization of the build.
@@ -14,14 +14,18 @@ Have a look at the [installation guide](/guides/installation) unless you have we
1414

1515
T> The new CLI for webpack is under development. New features are being added such as the `--init` flag. [Check it out!](https://github.com/webpack/webpack-cli)
1616

17+
1718
## Usage with config file
19+
1820
```sh
1921
webpack [--config webpack.config.js]
2022
```
2123

2224
See [configuration](/configuration) for the options in the configuration file.
2325

26+
2427
## Usage without config file
28+
2529
```sh
2630
webpack <entry> [<entry>] <output>
2731
```
@@ -77,6 +81,7 @@ This will form the bundle with both the files as separate entry points.
7781
[1] ./src/others.js 29 bytes {0} {1} [built]
7882
```
7983

84+
8085
### Common Options
8186

8287
**List all of the options available on the cli**
@@ -115,13 +120,15 @@ In every other case, webpack prints out a set of stats showing bundle, chunk and
115120
This response is accepted by webpack's [analyse tool](https://webpack.github.com/analyse), or chrisbateman's [webpack-visualizer](https://chrisbateman.github.io/webpack-visualizer/), or th0r's [webpack-bundle-analyzer](https://github.com/th0r/webpack-bundle-analyzer).
116121
The analyse tool will take in the JSON and provide all the details of the build in graphical form.
117122

118-
*Further reads:*
123+
*Further reading:*
124+
119125
* [Analyzing Build Statistics](https://survivejs.com/webpack/optimizing-build/analyzing-build-statistics/)
120126
* [Three simple ways to inspect a webpack bundle](https://medium.com/@joeclever/three-simple-ways-to-inspect-a-webpack-bundle-7f6a8fe7195d#.7d2i06mjx)
121127
* [Optimising your application bundle size with webpack](https://hackernoon.com/optimising-your-application-bundle-size-with-webpack-e85b00bab579#.5w5ko08pq)
122128
* [Analyzing & optimizing your webpack bundle](https://medium.com/@ahmedelgabri/analyzing-optimizing-your-webpack-bundle-8590818af4df#.hce4vdjs9)
123129
* [Analysing and minimising the size of client side bundle with webpack and source-map-explorer](https://medium.com/@nimgrg/analysing-and-minimising-the-size-of-client-side-bundle-with-webpack-and-source-map-explorer-41096559beca#.c3t2srr8x)
124130

131+
125132
### Output Options
126133

127134
This set of options allows you to manipulate certain [output](/configuration/output) parameters of your build.
@@ -138,6 +145,7 @@ This set of options allows you to manipulate certain [output](/configuration/out
138145
| --output-public-path | The public path for the assets | string | / |
139146
| --output-source-map-filename | The output filename for the SourceMap | string | [name].map or [outputFilename].map |
140147

148+
141149
#### Example Usage
142150

143151
```bash
@@ -166,6 +174,7 @@ webpack.js index=./src/index.js index2=./src/index2.js --output-path='./dist' --
166174
[2] ./src/index2.js 54 bytes {0} [built]
167175
```
168176

177+
169178
### Debug Options
170179

171180
This set of options allows you to better debug the application containing assets compiled with webpack
@@ -176,6 +185,7 @@ This set of options allows you to better debug the application containing assets
176185
| --devtool | Define [source map type](/configuration/devtool/) for the bundled resources | string | - |
177186
| --progress | Print compilation progress in percentage | boolean | false |
178187

188+
179189
### Module Options
180190

181191
These options allow you to bind [modules](/configuration/module/) as allowed by webpack
@@ -186,6 +196,7 @@ These options allow you to bind [modules](/configuration/module/) as allowed by
186196
| --module-bind-post | Bind an extension to a post loader | |
187197
| --module-bind-pre | Bind an extension to a pre loader | |
188198

199+
189200
### Watch Options
190201

191202
These options makes the build [watch](/configuration/watch/) for changes in files of the dependency graph and perform the build again.
@@ -198,6 +209,7 @@ These options makes the build [watch](/configuration/watch/) for changes in file
198209
| --watch-poll | The polling interval for watching (also enable polling) |
199210
| --watch-stdin, --stdin | Exit the process when stdin is closed |
200211

212+
201213
### Optimize Options
202214

203215
These options allow you to manipulate optimisations for a production build using webpack
@@ -208,6 +220,7 @@ These options allow you to manipulate optimisations for a production build using
208220
| --optimize-min-chunk-size | Try to keep the chunk size above a limit | [MinChunkSizePlugin](/plugins/min-chunk-size-plugin) |
209221
| --optimize-minimize | Minimize javascript and switches loaders to minimizing | [UglifyJsPlugin](/plugins/uglifyjs-webpack-plugin/) & [LoaderOptionsPlugin](/plugins/loader-options-plugin/) |
210222

223+
211224
### Resolve Options
212225

213226
These allow you to configure the webpack [resolver](/configuration/resolve/) with aliases and extensions.
@@ -218,6 +231,7 @@ These allow you to configure the webpack [resolver](/configuration/resolve/) wit
218231
| --resolve-extensions | Setup extensions that should be used to resolve,modules | --resolve-extensions .es6 .js .ts |
219232
| --resolve-loader-alias | Minimize javascript and switches loaders to minimizing | |
220233

234+
221235
### Stats Options
222236

223237
These options allow webpack to display various [stats](/configuration/stats/) and style them differently in the console output.
@@ -241,6 +255,7 @@ These options allow webpack to display various [stats](/configuration/stats/) an
241255
| --sort-modules-by | Sorts the modules list by property in module | string |
242256
| --verbose | Show more details | boolean |
243257

258+
244259
### Advanced Options
245260

246261
| Parameter | Explanation | Usage |
@@ -265,6 +280,7 @@ These options allow webpack to display various [stats](/configuration/stats/) an
265280
| -d | --debug --devtool eval-cheap-module-source-map --output-pathinfo |
266281
| -p | --optimize-minimize --define process.env.NODE_ENV="production", see [building for production](/guides/production-build) |
267282

283+
268284
### Profiling
269285

270286
This option profiles the compilation and includes this information in the stats output. It gives you an in depth idea of which step in the compilation is taking how long. This can help you optimise your build in a more informed manner.

0 commit comments

Comments
 (0)