From 9cd7ac2fdb6b1d71a9fb1b8297a478cafacbdafd Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Fri, 25 Aug 2023 20:14:20 +0530 Subject: [PATCH] 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 * docs: update docs/src/contribute/package-json-conventions.md * docs: add "fetch" script --------- Co-authored-by: Nicholas C. Zakas --- docs/src/contribute/core-rules.md | 2 +- docs/src/contribute/governance.md | 2 +- docs/src/contribute/package-json-conventions.md | 13 ++++++++++++- docs/src/contribute/pull-requests.md | 2 +- .../src/contribute/report-security-vulnerability.md | 2 +- docs/src/contribute/work-on-issue.md | 2 +- 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/docs/src/contribute/core-rules.md b/docs/src/contribute/core-rules.md index 5610c000e84..93b7647f52b 100644 --- a/docs/src/contribute/core-rules.md +++ b/docs/src/contribute/core-rules.md @@ -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. diff --git a/docs/src/contribute/governance.md b/docs/src/contribute/governance.md index 563840a01dc..3f761fb2a51 100644 --- a/docs/src/contribute/governance.md +++ b/docs/src/contribute/governance.md @@ -4,7 +4,7 @@ eleventyNavigation: key: governance parent: contribute to eslint title: Governance - order: 11 + order: 12 --- diff --git a/docs/src/contribute/package-json-conventions.md b/docs/src/contribute/package-json-conventions.md index 99afe8b2222..a030dc3f3dc 100644 --- a/docs/src/contribute/package-json-conventions.md +++ b/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. @@ -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 + @@ -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`. diff --git a/docs/src/contribute/pull-requests.md b/docs/src/contribute/pull-requests.md index 8854ee2fbb2..44f2378d8dc 100644 --- a/docs/src/contribute/pull-requests.md +++ b/docs/src/contribute/pull-requests.md @@ -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. diff --git a/docs/src/contribute/report-security-vulnerability.md b/docs/src/contribute/report-security-vulnerability.md index f68319fd34e..69f31a9a73b 100644 --- a/docs/src/contribute/report-security-vulnerability.md +++ b/docs/src/contribute/report-security-vulnerability.md @@ -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. diff --git a/docs/src/contribute/work-on-issue.md b/docs/src/contribute/work-on-issue.md index a141d59a8e6..d258aa4eb15 100644 --- a/docs/src/contribute/work-on-issue.md +++ b/docs/src/contribute/work-on-issue.md @@ -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.