Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc62df53

Browse files
committed
Format all mdx content with prettier
1 parente94015c commitc62df53

File tree

169 files changed

+1400
-2836
lines changed

Some content is hidden

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

169 files changed

+1400
-2836
lines changed

‎.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = {
3737
parserOptions:{
3838
sourceType:'module',
3939
},
40-
globals:getGlobals(['Index','Note','Prompt','PromptReply','Screenshot','Link','YouTube']),
40+
globals:getGlobals(['Index','Note','Prompt','Screenshot','Link','YouTube']),
4141
settings:{
4242
'import/resolver':'webpack',
4343
},

‎.github/workflows/ci-cli.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ jobs:
9090
run:npm run lint --ignore-scripts -w cli
9191
-name:Post Lint
9292
run:npm run postlint --ignore-scripts -w cli
93+
-name:Check Format
94+
run:npm run format:check --ignore-scripts --if-present -w cli
9395

9496
test:
9597
name:Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }}

‎.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ jobs:
9090
run:npm run lint --ignore-scripts
9191
-name:Post Lint
9292
run:npm run postlint --ignore-scripts
93+
-name:Check Format
94+
run:npm run format:check --ignore-scripts --if-present
9395

9496
test:
9597
name:Test - ${{ matrix.platform.name }} - ${{ matrix.node-version }}

‎.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
**/template-oss/*.json
22
**/template-oss/*.yml
3-
/content/
43
/.github/
54
/package-lock.json
65
/SECURITY.md

‎.prettierrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,11 @@ const config = require('@github/prettier-config')
33
module.exports={
44
...config,
55
proseWrap:'never',
6+
embeddedLanguageFormatting:'off',
7+
overrides:[
8+
{
9+
files:['content/**/*.mdx'],
10+
printWidth:99999,
11+
},
12+
],
613
}

‎cli/lib/transform.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ const gh = require('./gh')
77
constprettier=require('@prettier/sync')
88
constrawRedirects=require('./redirects')
99

10+
constprettierFormat=str=>
11+
prettier.format(str,{
12+
parser:'markdown',
13+
proseWrap:'never',
14+
})
15+
1016
constgetPathParts=path=>{
1117
constabs=isAbsolute(path)
1218
constpaths=path.replace(/\.mdx?$/,'').split(sep)
@@ -101,7 +107,8 @@ const transform = (data, {release, path, frontmatter, format = s => s}) => {
101107

102108
// first format with prettier, this helps so other replacements don't have to
103109
// worry about newlines vs spaces
104-
body=prettier.format(body,{parser:'markdown',proseWrap:'never'})
110+
body=prettierFormat(body)
111+
105112
// then do replacements for all cli makdown files
106113
body=body
107114
// some legacy versions of the docs did not get this replaced
@@ -121,6 +128,9 @@ const transform = (data, {release, path, frontmatter, format = s => s}) => {
121128
// then do any transformer specific replacements
122129
body=format(body)
123130

131+
// prettier again now that we've altered the contents
132+
body=prettierFormat(body)
133+
124134
return`---\n${yaml.stringify(attributes).trim()}\n---\n\n${body}`
125135
}
126136

‎content/about-npm/index.mdx

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,29 @@ npm is the world's largest software registry. Open source developers from every
88

99
npm consists of three distinct components:
1010

11-
* the website
12-
* the Command Line Interface (CLI)
13-
* the registry
11+
- the website
12+
- the Command Line Interface (CLI)
13+
- the registry
1414

15-
Use the[*website*](https://npmjs.com) to discover packages, set up profiles, and manage other aspects of your npm experience. For example, you can set up[organizations](https://www.npmjs.com/features) to manage access to public or private packages.
15+
Use the[_website_](https://npmjs.com) to discover packages, set up profiles, and manage other aspects of your npm experience. For example, you can set up[organizations](https://www.npmjs.com/features) to manage access to public or private packages.
1616

17-
The[*CLI*](https://docs.npmjs.com/cli/npm) runs from a terminal, and is how most developers interact with npm.
18-
19-
The[*registry*](https://docs.npmjs.com/misc/registry) is a large public database of JavaScript software and the meta-information surrounding it.
17+
The[_CLI_](https://docs.npmjs.com/cli/npm) runs from a terminal, and is how most developers interact with npm.
2018

19+
The[_registry_](https://docs.npmjs.com/misc/registry) is a large public database of JavaScript software and the meta-information surrounding it.
2120

2221
##Use npm to . . .
2322

24-
* Adapt packages of code for your apps, or incorporate packages as they are.
25-
* Download standalone tools you can use right away.
26-
* Run packages without downloading using[npx](https://docs.npmjs.com/cli/commands/npx).
27-
* Share code with any npm user, anywhere.
28-
* Restrict code to specific developers.
29-
* Create organizations to coordinate package maintenance, coding, and developers.
30-
* Form virtual teams by using organizations.
31-
* Manage multiple versions of code and code dependencies.
32-
* Update applications easily when underlying code is updated.
33-
* Discover multiple ways to solve the same puzzle.
34-
* Find other developers who are working on similar problems and projects.
23+
- Adapt packages of code for your apps, or incorporate packages as they are.
24+
- Download standalone tools you can use right away.
25+
- Run packages without downloading using[npx](https://docs.npmjs.com/cli/commands/npx).
26+
- Share code with any npm user, anywhere.
27+
- Restrict code to specific developers.
28+
- Create organizations to coordinate package maintenance, coding, and developers.
29+
- Form virtual teams by using organizations.
30+
- Manage multiple versions of code and code dependencies.
31+
- Update applications easily when underlying code is updated.
32+
- Discover multiple ways to solve the same puzzle.
33+
- Find other developers who are working on similar problems and projects.
3534

3635
##Getting started
3736

@@ -41,9 +40,9 @@ After you set up an npm account, the next step is to use the command line interf
4140

4241
##Sharing packages and collaborating with others
4342

44-
If you choose to share your packages publicly, there is no cost. To use and share private packages, you need to upgrade your account. To share with others, create organizations, called**[npm organizations][orgs-docs]**,and invite others to work with you, privately (for a fee) or publicly (for free).
43+
If you choose to share your packages publicly, there is no cost. To use and share private packages, you need to upgrade your account. To share with others, create organizations, called**[npm organizations][orgs-docs]**, and invite others to work with you, privately (for a fee) or publicly (for free).
4544

46-
You can also use a private npm package registry like[GitHub Packages](https://github.com/features/packages) or the open source[Verdaccio](https://verdaccio.org) project.This lets you develop packages internally that are not shared publicly.
45+
You can also use a private npm package registry like[GitHub Packages](https://github.com/features/packages) or the open source[Verdaccio](https://verdaccio.org) project. This lets you develop packages internally that are not shared publicly.
4746

4847
##Learn more
4948

@@ -55,7 +54,6 @@ For mentoring, tutorials, and learning, visit [node school](https://nodeschool.i
5554

5655
While relevant CLI commands are covered throughout this user documentation, the CLI includes command line help, its own[documentation section, and instant help (man pages)][cli-docs].
5756

58-
5957
[orgs-docs]:/organizations
6058
[install-npm]:/downloading-and-installing-node-js-and-npm
6159
[cli-docs]:/cli-documentation

‎content/cli/v7/commands/npm-access.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,13 @@ Management of teams and team memberships is done with the `npm team` command.
7676
7777
### Configuration
7878
79-
8079
#### `registry`
8180
8281
- Default:"https://registry.npmjs.org/"
8382
- Type: URL
8483
8584
The base URL of the npm registry.
8685
87-
8886
#### `otp`
8987
9088
- Default: null
@@ -94,8 +92,6 @@ This is a one-time password from a two-factor authenticator. It's needed when pu
9492
9593
If not set, and a registry response fails with a challenge for a one-time password, npm will prompt on the command line for one.
9694
97-
98-
9995
### See Also
10096
10197
- [`libnpmaccess`](https://npm.im/libnpmaccess)

‎content/cli/v7/commands/npm-adduser.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,13 @@ You may use this command multiple times with the same user account to authorize
4545

4646
###Configuration
4747

48-
4948
####`registry`
5049

5150
- Default: "https://registry.npmjs.org/"
5251
- Type: URL
5352

5453
The base URL of the npm registry.
5554

56-
5755
####`scope`
5856

5957
- Default: the scope of the current project, if any, or ""
@@ -81,8 +79,6 @@ This will also cause `npm init` to create a scoped package.
8179
npm init --scope=@foo --yes
8280
```
8381

84-
85-
8682
###See Also
8783

8884
-[npm registry](/cli/v7/using-npm/registry)

‎content/cli/v7/commands/npm-audit.mdx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,15 +146,13 @@ $ npm audit --audit-level=moderate
146146

147147
###Configuration
148148

149-
150149
####`audit-level`
151150

152151
- Default: null
153152
- Type: null, "info", "low", "moderate", "high", "critical", or "none"
154153

155154
The minimum level of vulnerability for`npm audit` to exit with a non-zero exit code.
156155

157-
158156
####`dry-run`
159157

160158
- Default: false
@@ -164,7 +162,6 @@ Indicates that you don't want npm to make any changes and that it should only re
164162

165163
Note: This is NOT honored by other network related commands, eg`dist-tags`,`owner`, etc.
166164

167-
168165
####`force`
169166

170167
- Default: false
@@ -185,7 +182,6 @@ Removes various protections against unfortunate side effects, common mistakes, u
185182

186183
If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option!
187184

188-
189185
####`json`
190186

191187
- Default: false
@@ -197,7 +193,6 @@ Whether or not to output JSON data, rather than the normal output.
197193

198194
Not supported by all npm commands.
199195

200-
201196
####`package-lock-only`
202197

203198
- Default: false
@@ -209,7 +204,6 @@ For `update` this means only the `package-lock.json` will be updated, instead of
209204

210205
For`list` this means the output will be based on the tree described by the`package-lock.json`, rather than the contents of`node_modules`.
211206

212-
213207
####`omit`
214208

215209
- Default: 'dev' if the`NODE_ENV` environment variable is set to 'production', otherwise empty.
@@ -223,7 +217,6 @@ If a package type appears in both the `--include` and `--omit` lists, then it wi
223217

224218
If the resulting omit list includes`'dev'`, then the`NODE_ENV` environment variable will be set to`'production'` for all lifecycle scripts.
225219

226-
227220
####`workspace`
228221

229222
- Default:
@@ -241,7 +234,6 @@ When set for the `npm init` command, this may be set to the folder of a workspac
241234

242235
This value is not exported to the environment for child processes.
243236

244-
245237
####`workspaces`
246238

247239
- Default: false
@@ -251,8 +243,6 @@ Enable running a command in the context of **all** the configured workspaces.
251243

252244
This value is not exported to the environment for child processes.
253245

254-
255-
256246
###See Also
257247

258248
-[npm install](/cli/v7/commands/npm-install)

‎content/cli/v7/commands/npm-bin.mdx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ Print the folder where npm will install executables.
3333

3434
###Configuration
3535

36-
3736
####`global`
3837

3938
- Default: false
@@ -45,8 +44,6 @@ Operates in "global" mode, so that packages are installed into the `prefix` fold
4544
- bin files are linked to`{prefix}/bin`
4645
- man pages are linked to`{prefix}/share/man`
4746

48-
49-
5047
###See Also
5148

5249
-[npm prefix](/cli/v7/commands/npm-prefix)

‎content/cli/v7/commands/npm-bugs.mdx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ This command tries to guess at the likely location of a package's bug tracker UR
3333
3434
### Configuration
3535
36-
3736
#### `browser`
3837
3938
- Default: OS X: `"open"`, Windows: `"start"`, Others: `"xdg-open"`
@@ -45,16 +44,13 @@ Set to `false` to suppress browser behavior and instead print urls to terminal.
4544
4645
Set to `true` to use default system URL opener.
4746
48-
4947
#### `registry`
5048
5149
- Default: "https://registry.npmjs.org/"
5250
- Type: URL
5351
5452
The base URL of the npm registry.
5553
56-
57-
5854
### See Also
5955
6056
- [npm docs](/cli/v7/commands/npm-docs)

‎content/cli/v7/commands/npm-cache.mdx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,13 @@ To run an offline verification of existing cache contents, use `npm cache verify
6363

6464
###Configuration
6565

66-
6766
####`cache`
6867

6968
- Default: Windows:`%LocalAppData%\npm-cache`, Posix:`~/.npm`
7069
- Type: Path
7170

7271
The location of npm's cache directory. See[`npm cache`](/cli/v7/commands/npm-cache)
7372

74-
75-
7673
###See Also
7774

7875
-[npm folders](/cli/v7/configuring-npm/folders)

‎content/cli/v7/commands/npm-ci.mdx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,13 @@ cache:
7474

7575
###Configuration
7676

77-
7877
####`audit`
7978

8079
- Default: true
8180
- Type: Boolean
8281

8382
When "true" submit audit reports alongside the current npm command to the default registry and all registries configured for scopes. See the documentation for[`npm audit`](/cli/v7/commands/npm-audit) for details on what is submitted.
8483

85-
8684
####`ignore-scripts`
8785

8886
- Default: false
@@ -92,16 +90,13 @@ If true, npm does not run scripts specified in package.json files.
9290

9391
Note that commands explicitly intended to run a particular script, such as`npm start`,`npm stop`,`npm restart`,`npm test`, and`npm run-script` will still run their intended script if`ignore-scripts` is set, but they will_not_ run any pre- or post-scripts.
9492

95-
9693
####`script-shell`
9794

9895
- Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
9996
- Type: null or String
10097

10198
The shell to use for scripts run with the`npm exec`,`npm run` and`npm init <pkg>` commands.
10299

103-
104-
105100
###See Also
106101

107102
-[npm install](/cli/v7/commands/npm-install)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp