Skip to content

Commit

Permalink
docs: add fetch script to package.json conventions (#17459)
Browse files Browse the repository at this point in the history
* docs: add `fetch` script to package.json conventions

* docs: revert formatting changes

* docs: apply suggestions from code review

Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>

* docs: update docs/src/contribute/package-json-conventions.md

* docs: add "fetch" script

---------

Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
  • Loading branch information
snitin315 and nzakas committed Aug 25, 2023
1 parent 7234f6a commit 9cd7ac2
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/src/contribute/core-rules.md
Expand Up @@ -4,7 +4,7 @@ eleventyNavigation:
key: contribute core rule
parent: contribute to eslint
title: Contribute to Core Rules
order: 10
order: 11
---

The ESLint core rules are the rules included in the ESLint package.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/contribute/governance.md
Expand Up @@ -4,7 +4,7 @@ eleventyNavigation:
key: governance
parent: contribute to eslint
title: Governance
order: 11
order: 12

---

Expand Down
13 changes: 12 additions & 1 deletion docs/src/contribute/package-json-conventions.md
@@ -1,6 +1,11 @@
---
title: Package.json Conventions
edit_link: https://github.com/eslint/eslint/edit/main/docs/src/contribute/package-json-conventions.md
eleventyNavigation:
key: package.json conventions
parent: contribute to eslint
title: Package.json Conventions
order: 8
---

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

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.

### Fetch

Scripts that generate a set of files from external data or resources MUST have names that begin with `fetch`.

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.

### Release

Scripts that have public side effects (publishing the web site, committing to Git, etc.) MUST begin with `release`.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/contribute/pull-requests.md
Expand Up @@ -4,7 +4,7 @@ eleventyNavigation:
key: submit pull request
parent: contribute to eslint
title: Submit a Pull Request
order: 9
order: 10
---

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.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/contribute/report-security-vulnerability.md
Expand Up @@ -4,7 +4,7 @@ eleventyNavigation:
key: report security vulnerability
parent: contribute to eslint
title: Report a Security Vulnerability
order: 11
order: 13
---

To report a security vulnerability in ESLint, please use our [create an advisory form](https://github.com/eslint/eslint/security/advisories/new) on GitHub.
2 changes: 1 addition & 1 deletion docs/src/contribute/work-on-issue.md
Expand Up @@ -4,7 +4,7 @@ eleventyNavigation:
key: work on issues
parent: contribute to eslint
title: Work on Issues
order: 8
order: 9
---

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.
Expand Down

0 comments on commit 9cd7ac2

Please sign in to comment.