Skip to content

Commit 9162178

Browse files
byzykEugeneHlushko
authored andcommitted
chore(markdownlint) add emphasis style rule (#2623)
1 parent 2ac0bd3 commit 9162178

38 files changed

+217
-201
lines changed

.markdownlint.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
"MD007": { "indent": 4 },
66
"MD013": { "line_length": 600 },
77
"MD026": false,
8-
"MD029": { "style": "ordered"},
8+
"MD029": { "style": "ordered" },
99
"MD033": false,
1010
"MD034": false,
1111
"MD036": false,
1212
"MD041": false,
1313
"no-hard-tabs": false,
14-
"whitespace": false
15-
}
14+
"whitespace": false,
15+
"emphasis-style": { "style": "_" }
16+
}

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"init:generated": "mkdirp ./generated/loaders && mkdirp ./generated/plugins ",
3434
"lint": "run-s lint:*",
3535
"lint:js": "eslint . --ext .js,.jsx,.md",
36-
"lint:markdown": "markdownlint --config ./.markdownlint.json *.md ./src/content/**/*.md",
36+
"lint:markdown": "markdownlint --rules markdownlint-rule-emphasis-style --config ./.markdownlint.json *.md ./src/content/*.md ./src/content/**/*.md",
3737
"lint:social": "alex . -q",
3838
"lint:prose": "cp .proselintrc ~/ && proselint src/content",
3939
"test": "npm run lint",
@@ -85,8 +85,9 @@
8585
"loader-utils": "^1.1.0",
8686
"lodash": "^4.17.4",
8787
"markdown-loader": "^2.0.1",
88-
"markdownlint": "^0.6.0",
89-
"markdownlint-cli": "^0.3.1",
88+
"markdownlint": "^0.11.0",
89+
"markdownlint-cli": "^0.13.0",
90+
"markdownlint-rule-emphasis-style": "^1.0.0",
9091
"marked": "^0.3.7",
9192
"mini-css-extract-plugin": "^0.2.0",
9293
"mkdirp": "^0.5.1",

src/content/api/cli.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ contributors:
99
- rencire
1010
- madhavarshney
1111
- EugeneHlushko
12+
- byzyk
1213
related:
1314
- title: Analyzing Build Statistics
1415
url: https://survivejs.com/webpack/optimizing-build/analyzing-build-statistics/
@@ -42,15 +43,15 @@ See [configuration](/configuration) for the options in the configuration file.
4243
webpack <entry> [<entry>] -o <output>
4344
```
4445

45-
**`<entry>`**
46+
__`<entry>`__
4647

4748
A filename or a set of named filenames which act as the entry point to build your project. You can pass multiple entries (every entry is loaded on startup). If you pass a pair in the form `<name>=<request>` you can create an additional entry point. It will be mapped to the configuration option `entry`.
4849

49-
**`<output>`**
50+
__`<output>`__
5051

5152
A path and filename for the bundled file to be saved in. It will be mapped to the configuration options `output.path` and `output.filename`.
5253

53-
**Example**
54+
__Example__
5455

5556
If your project structure is as follows -
5657

@@ -98,22 +99,22 @@ This will form the bundle with both the files as separate entry points.
9899

99100
W> Note that Command Line Interface has a higher precedence for the arguments you use it with than your configuration file. For instance, if you pass [`--mode="production"`](/concepts/mode/#usage) to webpack CLI and your configuration file uses `development`, `production` will be used.
100101

101-
**List all of the options available on the cli**
102+
__List all of the options available on the cli__
102103

103104
```bash
104105
webpack --help
105106
webpack -h
106107
```
107108

108-
**Build source using a config file**
109+
__Build source using a config file__
109110

110111
Specifies a different [configuration](/configuration) file to pick up. Use this if you want to specify something different than `webpack.config.js`, which is the default.
111112

112113
```bash
113114
webpack --config example.config.js
114115
```
115116

116-
**Print result of webpack as a JSON**
117+
__Print result of webpack as a JSON__
117118

118119
```bash
119120
webpack --json
@@ -150,10 +151,10 @@ T> See the [environment variables](/guides/environment-variables) guide for more
150151
Parameter | Explanation | Input type | Default
151152
------------------------- | ------------------------------------------- | ---------- | ------------------
152153
`--config` | Path to the config file | string | webpack.config.js or webpackfile.js
153-
`--config-register, -r` | Preload one or more modules before loading the webpack configuration | array |
154-
`--config-name` | Name of the config to use | string |
155-
`--env` | Environment passed to the config, when it is a function |
156-
`--mode` | Mode to use, either "development" or "production" | string |
154+
`--config-register, -r` | Preload one or more modules before loading the webpack configuration | array |
155+
`--config-name` | Name of the config to use | string |
156+
`--env` | Environment passed to the config, when it is a function |
157+
`--mode` | Mode to use, either "development" or "production" | string |
157158

158159
### Output Options
159160

@@ -211,7 +212,7 @@ Parameter | Explanation | Input type | D
211212
`--debug` | Switch loaders to debug mode | boolean | false
212213
`--devtool` | Define [source map type](/configuration/devtool/) for the bundled resources | string | -
213214
`--progress` | Print compilation progress in percentage | boolean | false
214-
`--display-error-details` | Display details about errors | boolean | false
215+
`--display-error-details` | Display details about errors | boolean | false
215216

216217
### Module Options
217218

@@ -312,7 +313,6 @@ Shortcut | Replaces
312313
-d | `--debug --devtool cheap-module-eval-source-map --output-pathinfo`
313314
-p | `--optimize-minimize --define process.env.NODE_ENV="production"`, see [building for production](/guides/production)
314315

315-
316316
### Profiling
317317

318318
The `--profile` option captures timing information for each step of the compilation and includes this in the output.

src/content/api/loaders.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ A loader is just a JavaScript module that exports a function. The [loader runner
1212

1313
The first loader is passed one argument: the content of the resource file. The compiler expects a result from the last loader. The result should be a `String` or a `Buffer` (which is converted to a string), representing the JavaScript source code of the module. An optional SourceMap result (as JSON object) may also be passed.
1414

15-
A single result can be returned in **sync mode**. For multiple results the `this.callback()` must be called. In **async mode** `this.async()` must be called to indicate that the [loader runner](https://github.com/webpack/loader-runner) should wait for an asynchronous result. It returns `this.callback()`. Then the loader must return `undefined` and call that callback.
15+
A single result can be returned in __sync mode__. For multiple results the `this.callback()` must be called. In __async mode__ `this.async()` must be called to indicate that the [loader runner](https://github.com/webpack/loader-runner) should wait for an asynchronous result. It returns `this.callback()`. Then the loader must return `undefined` and call that callback.
1616

1717

1818
## Examples
@@ -70,7 +70,7 @@ module.exports = function(content, map, meta) {
7070
};
7171
```
7272

73-
T> Loaders were originally designed to work in synchronous loader pipelines, like Node.js (using [enhanced-require](https://github.com/webpack/enhanced-require)), *and* asynchronous pipelines, like in webpack. However, since expensive synchronous computations are a bad idea in a single-threaded environment like Node.js, we advise to make your loader asynchronously if possible. Synchronous loaders are ok if the amount of computation is trivial.
73+
T> Loaders were originally designed to work in synchronous loader pipelines, like Node.js (using [enhanced-require](https://github.com/webpack/enhanced-require)), _and_ asynchronous pipelines, like in webpack. However, since expensive synchronous computations are a bad idea in a single-threaded environment like Node.js, we advise to make your loader asynchronously if possible. Synchronous loaders are ok if the amount of computation is trivial.
7474

7575

7676
### "Raw" Loader
@@ -177,12 +177,12 @@ require('./loader1?xyz!loader2!./resource?rrr');
177177

178178
### `this.version`
179179

180-
**Loader API version.** Currently `2`. This is useful for providing backwards compatibility. Using the version you can specify custom logic or fallbacks for breaking changes.
180+
__Loader API version.__ Currently `2`. This is useful for providing backwards compatibility. Using the version you can specify custom logic or fallbacks for breaking changes.
181181

182182

183183
### `this.context`
184184

185-
**The directory of the module.** Can be used as context for resolving other stuff.
185+
__The directory of the module.__ Can be used as context for resolving other stuff.
186186

187187
In the example: `/abc` because `resource.js` is in this directory
188188

src/content/api/module-methods.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,4 +419,4 @@ const page = 'Foo';
419419
__webpack_modules__[require.resolveWeak(`./page/${page}`)];
420420
```
421421
422-
T> `require.resolveWeak` is the foundation of *universal rendering* (SSR + Code Splitting), as used in packages such as [react-universal-component](https://github.com/faceyspacey/react-universal-component). It allows code to render synchronously on both the server and initial page-loads on the client. It requires that chunks are manually served or somehow available. It's able to require modules without indicating they should be bundled into a chunk. It's used in conjunction with `import()` which takes over when user navigation triggers additional imports.
422+
T> `require.resolveWeak` is the foundation of _universal rendering_ (SSR + Code Splitting), as used in packages such as [react-universal-component](https://github.com/faceyspacey/react-universal-component). It allows code to render synchronously on both the server and initial page-loads on the client. It requires that chunks are manually served or somehow available. It's able to require modules without indicating they should be bundled into a chunk. It's used in conjunction with `import()` which takes over when user navigation triggers additional imports.

src/content/api/node.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ webpack({
5050
});
5151
```
5252

53-
T> The `err` object **will not** include compilation errors and those must be handled separately using `stats.hasErrors()` which will be covered in detail in [Error Handling](#error-handling) section of this guide. The `err` object will only contain webpack-related issues, such as misconfiguration, etc.
53+
T> The `err` object __will not__ include compilation errors and those must be handled separately using `stats.hasErrors()` which will be covered in detail in [Error Handling](#error-handling) section of this guide. The `err` object will only contain webpack-related issues, such as misconfiguration, etc.
5454

5555
T> You can provide the `webpack` function with an array of configurations. See
5656
the [MultiCompiler](#multicompiler) section below for more information.
@@ -73,7 +73,7 @@ lifecycle running. It delegates all the loading, bundling, and writing work to
7373
registered plugins.
7474

7575
The `hooks` property on a `Compiler` instance is used to register a plugin to
76-
any hook event in the `Compiler`'s lifecycle. The
76+
any hook event in the `Compiler`'s lifecycle. The
7777
[`WebpackOptionsDefaulter`](https://github.com/webpack/webpack/blob/master/lib/WebpackOptionsDefaulter.js)
7878
and [`WebpackOptionsApply`](https://github.com/webpack/webpack/blob/master/lib/WebpackOptionsApply.js)
7979
utilities are used by webpack to configure its `Compiler` instance with all the

src/content/branding.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ contributors:
55
- jhnns
66
- skipjack
77
- rouzbeh84
8+
- byzyk
89
---
910

10-
Here you can find **webpack** project brand guidelines, assets, and license. See our official [media repository](https://github.com/webpack/media) for more information and to find the [license](https://github.com/webpack/media/blob/master/LICENSE) that governs this work. Click any of the images to download them.
11+
Here you can find __webpack__ project brand guidelines, assets, and license. See our official [media repository](https://github.com/webpack/media) for more information and to find the [license](https://github.com/webpack/media/blob/master/LICENSE) that governs this work. Click any of the images to download them.
1112

1213

1314
## The Name
1415

15-
webpack should **always** be written in lower-case letters, even at the beginning of a sentence.
16+
webpack should __always__ be written in lower-case letters, even at the beginning of a sentence.
1617

1718

1819
## Logo
@@ -33,12 +34,12 @@ For dark backgrounds, you can use the negative version of the logo:
3334

3435
[svg](https://github.com/webpack/media/blob/master/logo/logo-on-dark-bg.svg) | [png](https://github.com/webpack/media/blob/master/logo/logo-on-dark-bg.png) | [jpg](https://github.com/webpack/media/blob/master/logo/logo-on-dark-bg.jpg)
3536

36-
T> Please use the **icon + text** whenever possible.
37+
T> Please use the __icon + text__ whenever possible.
3738

3839

3940
## Icon only
4041

41-
**The icon is designed to be used in layout-constrained areas. As previously stated, please prefer icon + text.**
42+
__The icon is designed to be used in layout-constrained areas. As previously stated, please prefer icon + text.__
4243

4344
<img src="https://raw.githubusercontent.com/webpack/media/master/logo/icon.png" width="250" alt="icon example">
4445

@@ -92,4 +93,4 @@ In addition, you can grab the following file types directly from these links:
9293

9394
## License
9495

95-
The logo and the brand name are **not MIT licensed**. Please check [our LICENSE](https://github.com/webpack/media/blob/master/LICENSE) for usage guidelines.
96+
The logo and the brand name are __not MIT licensed__. Please check [our LICENSE](https://github.com/webpack/media/blob/master/LICENSE) for usage guidelines.

0 commit comments

Comments
 (0)