Skip to content

Commit 9cd7ac2

Browse files
snitin315nzakas
andauthored
docs: add fetch script to package.json conventions (#17459)
* docs: add `fetch` script to package.json conventions * docs: revert formatting changes * docs: apply suggestions from code review Co-authored-by: Nicholas C. Zakas <[email protected]> * docs: update docs/src/contribute/package-json-conventions.md * docs: add "fetch" script --------- Co-authored-by: Nicholas C. Zakas <[email protected]>
1 parent 7234f6a commit 9cd7ac2

6 files changed

Lines changed: 17 additions & 6 deletions

File tree

docs/src/contribute/core-rules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ eleventyNavigation:
44
key: contribute core rule
55
parent: contribute to eslint
66
title: Contribute to Core Rules
7-
order: 10
7+
order: 11
88
---
99

1010
The ESLint core rules are the rules included in the ESLint package.

docs/src/contribute/governance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ eleventyNavigation:
44
key: governance
55
parent: contribute to eslint
66
title: Governance
7-
order: 11
7+
order: 12
88

99
---
1010

docs/src/contribute/package-json-conventions.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
22
title: Package.json Conventions
33
edit_link: https://github.com/eslint/eslint/edit/main/docs/src/contribute/package-json-conventions.md
4+
eleventyNavigation:
5+
key: package.json conventions
6+
parent: contribute to eslint
7+
title: Package.json Conventions
8+
order: 8
49
---
510

611
The following applies to the "scripts" section of `package.json` files.
@@ -14,7 +19,7 @@ Here is a summary of the proposal in ABNF.
1419
```abnf
1520
name = life-cycle / main target? option* ":watch"?
1621
life-cycle = "prepare" / "preinstall" / "install" / "postinstall" / "prepublish" / "preprepare" / "prepare" / "postprepare" / "prepack" / "postpack" / "prepublishOnly"
17-
main = "build" / "lint" ":fix"? / "release" / "start" / "test"
22+
main = "build" / "lint" ":fix"? / "release" / "start" / "test" / "fetch"
1823
target = ":" word ("-" word)* / extension ("+" extension)*
1924
option = ":" word ("-" word)*
2025
word = ALPHA +
@@ -35,6 +40,12 @@ Scripts that generate a set of files from source code and / or data MUST have na
3540

3641
If a package contains any `build:*` scripts, there MAY be a script named `build`. If so, SHOULD produce the same output as running each of the `build` scripts individually. It MUST produce a subset of the output from running those scripts.
3742

43+
### Fetch
44+
45+
Scripts that generate a set of files from external data or resources MUST have names that begin with `fetch`.
46+
47+
If a package contains any `fetch:*` scripts, there MAY be a script named `fetch`. If so, it SHOULD produce the same output as running each of the `fetch` scripts individually. It MUST produce a subset of the output from running those scripts.
48+
3849
### Release
3950

4051
Scripts that have public side effects (publishing the web site, committing to Git, etc.) MUST begin with `release`.

docs/src/contribute/pull-requests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ eleventyNavigation:
44
key: submit pull request
55
parent: contribute to eslint
66
title: Submit a Pull Request
7-
order: 9
7+
order: 10
88
---
99

1010
If you want to contribute to an ESLint repo, please use a GitHub pull request. This is the fastest way for us to evaluate your code and to merge it into the code base. Please don't file an issue with snippets of code. Doing so means that we need to manually merge the changes in and update any appropriate tests. That decreases the likelihood that your code is going to get included in a timely manner. Please use pull requests.

docs/src/contribute/report-security-vulnerability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ eleventyNavigation:
44
key: report security vulnerability
55
parent: contribute to eslint
66
title: Report a Security Vulnerability
7-
order: 11
7+
order: 13
88
---
99

1010
To report a security vulnerability in ESLint, please use our [create an advisory form](https://github.com/eslint/eslint/security/advisories/new) on GitHub.

docs/src/contribute/work-on-issue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ eleventyNavigation:
44
key: work on issues
55
parent: contribute to eslint
66
title: Work on Issues
7-
order: 8
7+
order: 9
88
---
99

1010
Our public [issues tracker](https://github.com/eslint/eslint/issues) lists all of the things we plan on doing as well as suggestions from the community. Before starting to work on an issue, be sure you read through the rest of this page.

0 commit comments

Comments
 (0)