Skip to content

Commit 725e4de

Browse files
authored
build: lint Markdown (#3247)
1 parent fd7b1e7 commit 725e4de

File tree

26 files changed

+1233
-65
lines changed

26 files changed

+1233
-65
lines changed

.markdownlint.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "@electron/lint-roller/configs/markdownlint.json"
3+
}

.markdownlintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
**/node_modules/**
2+
CHANGELOG.md

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
"docs:generate": "yarn docs:plugin && node --max-old-space-size=8192 -r ts-node/register ./tools/gen-docs.ts",
1616
"docs:plugin": "cd ./tools/doc-plugin && yarn build",
1717
"lerna:publish": "lerna publish --force-publish --conventional-commits --no-changelog --exact",
18-
"lint": "prettier --check . && eslint .",
18+
"lint:js": "prettier --check . && eslint .",
19+
"lint:markdown": "electron-markdownlint \"**/*.md\"",
20+
"lint:markdown-links": "electron-lint-markdown-links --root . --ignore-path .markdownlintignore \"**/*.md\"",
21+
"lint": "npm run lint:js && npm run lint:markdown && npm run lint:markdown-links",
1922
"lint:fix": "prettier --write .",
2023
"link:prepare": "lerna exec -- node ../../../tools/silent.js yarn link --silent --no-bin-links --link-folder ../../../.links",
2124
"link:remove": "lerna exec -- node ../../../tools/silent.js yarn unlink --silent --no-bin-links --link-folder ../../../.links",
@@ -81,6 +84,7 @@
8184
},
8285
"devDependencies": {
8386
"@electron/fuses": ">=1.0.0",
87+
"@electron/lint-roller": "^1.5.0",
8488
"@knodes/typedoc-plugin-monorepo-readmes": "0.22.5",
8589
"@malept/eslint-config": "^2.0.0",
8690
"@types/chai": "^4.2.12",

packages/api/core/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ API as a number of simple JS functions.
55

66
## Basic Usage
77

8-
```js
8+
```javascript
99
import { api } from '@electron-forge/core';
1010

1111
// Package the current directory as an Electron app
1212
api.package(__dirname);
1313
```
1414

15-
The named export `api` has it's methods documented over at [ForgeAPI](https://js.electronforge.io/api/core/classes/forgeapi).
15+
The named export `api` has it's methods documented over at [ForgeAPI](https://js.electronforge.io/classes/_electron_forge_core.ForgeAPI.html).
1616
All the methods are async and expose the core forge methods, please note that all
1717
user-side configuration is still done through your forge config file or the "config.forge"
1818
section of your package.json. This API simply let's you call the methods in

packages/external/create-electron-app/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ Create Electron App allows you to quickly bootstrap a new Electron app, using El
66

77
Initialize a new project by running the following:
88

9-
```
10-
// yarn 1
9+
```sh
10+
# yarn 1
1111
yarn create electron-app my-app
1212

13-
// npm
13+
# npm
1414
npx create-electron-app@latest my-app
1515
```
1616

1717
You should now have a directory called my-app with an ultra-minimal Electron app boilerplate inside. If you head into that directory and start up the app, you'll be all set to start developing!
1818

19-
```
20-
// yarn 1
19+
```sh
20+
# yarn 1
2121
cd my-app
2222
yarn start
2323

24-
// npm
24+
# npm
2525
cd my-app
2626
npm start
2727
```

packages/maker/appx/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ You can only build the AppX target on Windows machines with the Windows 10 SDK i
66

77
Configuration options are documented in [`MakerAppXConfig`](https://js.electronforge.io/interfaces/_electron_forge_maker_appx.MakerAppXConfig.html).
88

9-
```
9+
```javascript
1010
{
1111
name: '@electron-forge/maker-appx',
1212
config: {
@@ -15,4 +15,4 @@ Configuration options are documented in [`MakerAppXConfig`](https://js.electronf
1515
certPass: 'abcd'
1616
}
1717
}
18-
```
18+
```

packages/maker/deb/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Configuration options are documented in [`MakerDebConfigOptions`](https://js.electronforge.io/interfaces/_electron_forge_maker_deb.InternalOptions.MakerDebConfigOptions.html).
66

7-
```
7+
```javascript
88
{
99
name: '@electron-forge/maker-deb',
1010
config: {

packages/maker/dmg/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ Configuration options are documented in [`MakerDMGConfig`](https://js.electronfo
1212
format: 'ULFO'
1313
}
1414
}
15-
```
15+
```

packages/maker/snap/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
You can only build the Snapcraft target on Linux systems with the `snapcraft` package installed.
66

7-
```
7+
```javascript
88
{
99
name: '@electron-forge/maker-snap',
1010
config: {
@@ -17,4 +17,4 @@ You can only build the Snapcraft target on Linux systems with the `snapcraft` pa
1717
summary: 'My application'
1818
}
1919
}
20-
```
20+
```

packages/maker/squirrel/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@
33
`@electron-forge/maker-squirrel` builds a number of files required to distribute apps using the Squirrel.Windows framework. It generates a `{appName} Setup.exe` file which is the main installer for your application, `{appName}-full.nupkg` and a `RELEASES` file which you use to issue updates to your application.
44

55
Pre-requisites:
6+
67
* Windows machine
78
* MacOS /Linux machine with `mono` and `wine` installed.
89

910
Configuration options are documented in [`MakerSquirrelConfigOptions`](https://js.electronforge.io/interfaces/_electron_forge_maker_squirrel.InternalOptions.Options.html).
1011

1112
```javascript
1213
{
13-
"name": "@electron-forge/maker-squirrel",
14-
"config": {
15-
"certificateFile": "./cert.pfx",
16-
"certificatePassword": "this-is-a-secret"
14+
name: '@electron-forge/maker-squirrel',
15+
config: {
16+
certificateFile: './cert.pfx',
17+
certificatePassword: 'this-is-a-secret'
1718
}
1819
}
1920
```

0 commit comments

Comments
 (0)