diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 8c4bf8eb1b75..e8645832fcf0 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -31,7 +31,7 @@ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 40163d868470..8173a5b049d3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,18 +10,18 @@ This project adheres to the [Open JS Foundation Code of Conduct](https://eslint. Before filing an issue, please be sure to read the guidelines for what you're reporting: -* [Bug Report](https://eslint.org/docs/developer-guide/contributing/reporting-bugs) -* [Propose a New Rule](https://eslint.org/docs/developer-guide/contributing/new-rules) -* [Proposing a Rule Change](https://eslint.org/docs/developer-guide/contributing/rule-changes) -* [Request a Change](https://eslint.org/docs/developer-guide/contributing/changes) +* [Bug Report](https://eslint.org/docs/contribute/report-bugs) +* [Propose a New Rule](https://eslint.org/docs/contribute/propose-new-rule) +* [Proposing a Rule Change](https://eslint.org/docs/contribute/propose-rule-change) +* [Request a Change](https://eslint.org/docs/contribute/request-change) To report a security vulnerability in ESLint, please use our [HackerOne program](https://hackerone.com/eslint). ## Contributing Code -In order to submit code or documentation to an ESLint project, you’ll be asked to sign our CLA when you send your first pull request. (Read more about the Open JS Foundation CLA process at .) Also, please read over the [Pull Request Guidelines](https://eslint.org/docs/developer-guide/contributing/pull-requests). +In order to submit code or documentation to an ESLint project, you’ll be asked to sign our CLA when you send your first pull request. (Read more about the Open JS Foundation CLA process at .) Also, please read over the [Pull Request Guidelines](https://eslint.org/docs/contribute/pull-requests). ## Full Documentation Our full contribution guidelines can be found at: - + diff --git a/Makefile.js b/Makefile.js index 426dd9b717ad..05e4ee66591c 100644 --- a/Makefile.js +++ b/Makefile.js @@ -167,7 +167,7 @@ function generateBlogPost(releaseInfo, prereleaseMajorVersion) { */ function generateFormatterExamples(formatterInfo) { const output = ejs.render(cat("./templates/formatter-examples.md.ejs"), formatterInfo); - const outputDir = path.join(DOCS_SRC_DIR, "user-guide/formatters/"), + const outputDir = path.join(DOCS_SRC_DIR, "use/formatters/"), filename = path.join(outputDir, "index.md"), htmlFilename = path.join(outputDir, "html-formatter-example.html"); diff --git a/README.md b/README.md index 309db3dc8499..d99ab77f250c 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,10 @@ # ESLint [Website](https://eslint.org) | -[Configuring](https://eslint.org/docs/user-guide/configuring) | +[Configuring](https://eslint.org/docs/use/configure) | [Rules](https://eslint.org/docs/rules/) | -[Contributing](https://eslint.org/docs/developer-guide/contributing) | -[Reporting Bugs](https://eslint.org/docs/developer-guide/contributing/reporting-bugs) | +[Contributing](https://eslint.org/docs/contribute) | +[Reporting Bugs](https://eslint.org/docs/contribute/report-bugs) | [Code of Conduct](https://eslint.org/conduct) | [Twitter](https://twitter.com/geteslint) | [Mailing List](https://groups.google.com/group/eslint) | @@ -76,7 +76,7 @@ The names `"semi"` and `"quotes"` are the names of [rules](https://eslint.org/do * `"warn"` or `1` - turn the rule on as a warning (doesn't affect exit code) * `"error"` or `2` - turn the rule on as an error (exit code will be 1) -The three error levels allow you fine-grained control over how ESLint applies rules (for more configuration options and details, see the [configuration docs](https://eslint.org/docs/user-guide/configuring)). +The three error levels allow you fine-grained control over how ESLint applies rules (for more configuration options and details, see the [configuration docs](https://eslint.org/docs/use/configure)). ## Code of Conduct @@ -86,10 +86,10 @@ ESLint adheres to the [JS Foundation Code of Conduct](https://eslint.org/conduct Before filing an issue, please be sure to read the guidelines for what you're reporting: -* [Bug Report](https://eslint.org/docs/developer-guide/contributing/reporting-bugs) -* [Propose a New Rule](https://eslint.org/docs/developer-guide/contributing/new-rules) -* [Proposing a Rule Change](https://eslint.org/docs/developer-guide/contributing/rule-changes) -* [Request a Change](https://eslint.org/docs/developer-guide/contributing/changes) +* [Bug Report](https://eslint.org/docs/contribute/report-bugs) +* [Propose a New Rule](https://eslint.org/docs/contribute/propose-new-rule) +* [Proposing a Rule Change](https://eslint.org/docs/contribute/propose-rule-change) +* [Request a Change](https://eslint.org/docs/contribute/request-change) ## Frequently Asked Questions @@ -97,7 +97,7 @@ Before filing an issue, please be sure to read the guidelines for what you're re Yes. [JSCS has reached end of life](https://eslint.org/blog/2016/07/jscs-end-of-life) and is no longer supported. -We have prepared a [migration guide](https://eslint.org/docs/user-guide/migrating-from-jscs) to help you convert your JSCS settings to an ESLint configuration. +We have prepared a [migration guide](https://eslint.org/docs/use/migrating-from-jscs) to help you convert your JSCS settings to an ESLint configuration. We are now at or near 100% compatibility with JSCS. If you try ESLint and believe we are not yet compatible with a JSCS rule/configuration, please create an issue (mentioning that it is a JSCS compatibility issue) and we will evaluate it as per our normal process. @@ -113,11 +113,11 @@ No, ESLint does both traditional linting (looking for problematic patterns) and ### Does ESLint support JSX? -Yes, ESLint natively supports parsing JSX syntax (this must be enabled in [configuration](https://eslint.org/docs/user-guide/configuring)). Please note that supporting JSX syntax *is not* the same as supporting React. React applies specific semantics to JSX syntax that ESLint doesn't recognize. We recommend using [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) if you are using React and want React semantics. +Yes, ESLint natively supports parsing JSX syntax (this must be enabled in [configuration](https://eslint.org/docs/use/configure)). Please note that supporting JSX syntax *is not* the same as supporting React. React applies specific semantics to JSX syntax that ESLint doesn't recognize. We recommend using [eslint-plugin-react](https://www.npmjs.com/package/eslint-plugin-react) if you are using React and want React semantics. ### What ECMAScript versions does ESLint support? -ESLint has full support for ECMAScript 3, 5 (default), 2015, 2016, 2017, 2018, 2019, 2020, 2021 and 2022. You can set your desired ECMAScript syntax (and other settings, like global variables or your target environments) through [configuration](https://eslint.org/docs/user-guide/configuring). +ESLint has full support for ECMAScript 3, 5 (default), 2015, 2016, 2017, 2018, 2019, 2020, 2021 and 2022. You can set your desired ECMAScript syntax (and other settings, like global variables or your target environments) through [configuration](https://eslint.org/docs/use/configure). ### What about experimental features? @@ -125,7 +125,7 @@ ESLint's parser only officially supports the latest final ECMAScript standard. W In other cases (including if rules need to warn on more or fewer cases due to new syntax, rather than just not crashing), we recommend you use other parsers and/or rule plugins. If you are using Babel, you can use [@babel/eslint-parser](https://www.npmjs.com/package/@babel/eslint-parser) and [@babel/eslint-plugin](https://www.npmjs.com/package/@babel/eslint-plugin) to use any option available in Babel. -Once a language feature has been adopted into the ECMAScript standard (stage 4 according to the [TC39 process](https://tc39.github.io/process-document/)), we will accept issues and pull requests related to the new feature, subject to our [contributing guidelines](https://eslint.org/docs/developer-guide/contributing). Until then, please use the appropriate parser and plugin(s) for your experimental feature. +Once a language feature has been adopted into the ECMAScript standard (stage 4 according to the [TC39 process](https://tc39.github.io/process-document/)), we will accept issues and pull requests related to the new feature, subject to our [contributing guidelines](https://eslint.org/docs/contribute). Until then, please use the appropriate parser and plugin(s) for your experimental feature. ### Where to ask for help? diff --git a/conf/rule-type-list.json b/conf/rule-type-list.json index f362aa412f95..517f8219166e 100644 --- a/conf/rule-type-list.json +++ b/conf/rule-type-list.json @@ -6,12 +6,12 @@ ], "deprecated": { "name": "Deprecated", - "description": "These rules have been deprecated in accordance with the deprecation policy, and replaced by newer rules:", + "description": "These rules have been deprecated in accordance with the deprecation policy, and replaced by newer rules:", "rules": [] }, "removed": { "name": "Removed", - "description": "These rules from older versions of ESLint (before the deprecation policy existed) have been replaced by newer rules:", + "description": "These rules from older versions of ESLint (before the deprecation policy existed) have been replaced by newer rules:", "rules": [ { "removed": "generator-star", "replacedBy": ["generator-star-spacing"] }, { "removed": "global-strict", "replacedBy": ["strict"] }, diff --git a/docs/src/contribute/package-json-conventions.md b/docs/src/contribute/package-json-conventions.md index cbfa01f8ca91..bb41b315d3c8 100644 --- a/docs/src/contribute/package-json-conventions.md +++ b/docs/src/contribute/package-json-conventions.md @@ -1,6 +1,6 @@ --- title: Package.json Conventions -edit_link: https://github.com/eslint/eslint/edit/main/docs/src/extend/package-json-conventions.md +edit_link: https://github.com/eslint/eslint/edit/main/docs/src/contribute/package-json-conventions.md --- The following applies to the "scripts" section of `package.json` files. diff --git a/docs/src/pages/index.md b/docs/src/pages/index.md index 58a3cb012e2f..a2e82b8cd1cd 100644 --- a/docs/src/pages/index.md +++ b/docs/src/pages/index.md @@ -10,14 +10,10 @@ Welcome to our documentation pages! What would you like to view? Intended for end users of ESLint. Contains information about core rules, configuration, command line options, formatters, and integrations, as well as guides for migrating from earlier versions of ESLint. -## [Extender Guide](extend/) +## [Developer Guide](extend/) Intended for people who wish to extend ESLint. Contains information about creating custom rules, configurations, plugins, and formatters; and information about our Node.js API. -## [Contributor Guide](contribute/) - -Intended for contributors to ESLint. Contains information about contributing to ESLint, architecture, and project setup. - ## [Maintainer Guide](maintain/) Intended for maintainers of ESLint. diff --git a/docs/src/use/command-line-interface.md b/docs/src/use/command-line-interface.md index e5db0356b1fd..61f641ada047 100644 --- a/docs/src/use/command-line-interface.md +++ b/docs/src/use/command-line-interface.md @@ -628,7 +628,7 @@ If the directory for the cache does not exist make sure you add a trailing `/` o ##### `--cache-location` example ```shell -npx eslint "src/**/*.js" --cache --cache-location "/use/user/.eslintcache/" +npx eslint "src/**/*.js" --cache --cache-location "/User/user/.eslintcache/" ``` #### `--cache-strategy` diff --git a/lib/cli-engine/formatters/formatters-meta.json b/lib/cli-engine/formatters/formatters-meta.json index a26ce8d2874f..fe48c3b07ac0 100644 --- a/lib/cli-engine/formatters/formatters-meta.json +++ b/lib/cli-engine/formatters/formatters-meta.json @@ -17,11 +17,11 @@ }, { "name": "json-with-metadata", - "description": "Outputs JSON-serialized results. The `json-with-metadata` provides the same linting results as the [`json`](#json) formatter with additional metadata about the rules applied. The linting results are included in the `results` property and the rules metadata is included in the `metadata` property.\n\nAlternatively, you can use the [ESLint Node.js API](../../developer-guide/nodejs-api) to programmatically use ESLint." + "description": "Outputs JSON-serialized results. The `json-with-metadata` provides the same linting results as the [`json`](#json) formatter with additional metadata about the rules applied. The linting results are included in the `results` property and the rules metadata is included in the `metadata` property.\n\nAlternatively, you can use the [ESLint Node.js API](../../extend/nodejs-api) to programmatically use ESLint." }, { "name": "json", - "description": "Outputs JSON-serialized results. The `json` formatter is useful when you want to programmatically work with the CLI's linting results.\n\nAlternatively, you can use the [ESLint Node.js API](../../developer-guide/nodejs-api) to programmatically use ESLint." + "description": "Outputs JSON-serialized results. The `json` formatter is useful when you want to programmatically work with the CLI's linting results.\n\nAlternatively, you can use the [ESLint Node.js API](../../extend/nodejs-api) to programmatically use ESLint." }, { "name": "junit", diff --git a/lib/rule-tester/flat-rule-tester.js b/lib/rule-tester/flat-rule-tester.js index b45b5d3c3dbd..5ab437cd1345 100644 --- a/lib/rule-tester/flat-rule-tester.js +++ b/lib/rule-tester/flat-rule-tester.js @@ -430,7 +430,7 @@ class FlatRuleTester { if (typeof this[DESCRIBE] === "function" || typeof this[IT] === "function") { throw new Error( "Set `RuleTester.itOnly` to use `only` with a custom test framework.\n" + - "See https://eslint.org/docs/developer-guide/nodejs-api#customizing-ruletester for more." + "See https://eslint.org/docs/extend/nodejs-api#customizing-ruletester for more." ); } if (typeof it === "function") { diff --git a/lib/rule-tester/rule-tester.js b/lib/rule-tester/rule-tester.js index 62fd467e0b07..20e3ed1ce186 100644 --- a/lib/rule-tester/rule-tester.js +++ b/lib/rule-tester/rule-tester.js @@ -314,7 +314,7 @@ function emitLegacyRuleAPIWarning(ruleName) { if (!emitLegacyRuleAPIWarning[`warned-${ruleName}`]) { emitLegacyRuleAPIWarning[`warned-${ruleName}`] = true; process.emitWarning( - `"${ruleName}" rule is using the deprecated function-style format and will stop working in ESLint v9. Please use object-style format: https://eslint.org/docs/developer-guide/working-with-rules`, + `"${ruleName}" rule is using the deprecated function-style format and will stop working in ESLint v9. Please use object-style format: https://eslint.org/docs/extend/custom-rules`, "DeprecationWarning" ); } @@ -329,7 +329,7 @@ function emitMissingSchemaWarning(ruleName) { if (!emitMissingSchemaWarning[`warned-${ruleName}`]) { emitMissingSchemaWarning[`warned-${ruleName}`] = true; process.emitWarning( - `"${ruleName}" rule has options but is missing the "meta.schema" property and will stop working in ESLint v9. Please add a schema: https://eslint.org/docs/developer-guide/working-with-rules#options-schemas`, + `"${ruleName}" rule has options but is missing the "meta.schema" property and will stop working in ESLint v9. Please add a schema: https://eslint.org/docs/extend/custom-rules#options-schemas`, "DeprecationWarning" ); } @@ -493,7 +493,7 @@ class RuleTester { if (typeof this[DESCRIBE] === "function" || typeof this[IT] === "function") { throw new Error( "Set `RuleTester.itOnly` to use `only` with a custom test framework.\n" + - "See https://eslint.org/docs/developer-guide/nodejs-api#customizing-ruletester for more." + "See https://eslint.org/docs/extend/nodejs-api#customizing-ruletester for more." ); } if (typeof it === "function") { diff --git a/messages/print-config-with-directory-path.js b/messages/print-config-with-directory-path.js index f65bdaaf7704..018b0d25bade 100644 --- a/messages/print-config-with-directory-path.js +++ b/messages/print-config-with-directory-path.js @@ -3,6 +3,6 @@ module.exports = function() { return ` The '--print-config' CLI option requires a path to a source code file rather than a directory. -See also: https://eslint.org/docs/user-guide/command-line-interface#--print-config +See also: https://eslint.org/docs/use/command-line-interface#--print-config `.trimStart(); }; diff --git a/packages/eslint-config-eslint/README.md b/packages/eslint-config-eslint/README.md index ea144120fc49..2eaa0881e57a 100644 --- a/packages/eslint-config-eslint/README.md +++ b/packages/eslint-config-eslint/README.md @@ -2,7 +2,7 @@ # ESLint Configuration -[Website](https://eslint.org) | [Configuring](https://eslint.org/docs/user-guide/configuring) | [Rules](https://eslint.org/docs/rules/) | [Contributing](https://eslint.org/docs/developer-guide/contributing) | [Twitter](https://twitter.com/geteslint) | [Mailing List](https://groups.google.com/group/eslint) | [Chatroom](https://eslint.org/chat) +[Website](https://eslint.org) | [Configuring](https://eslint.org/docs/use/configure) | [Rules](https://eslint.org/docs/rules/) | [Contributing](https://eslint.org/docs/contribute) | [Twitter](https://twitter.com/geteslint) | [Mailing List](https://groups.google.com/group/eslint) | [Chatroom](https://eslint.org/chat) Contains the ESLint configuration used for projects maintained by the ESLint team. diff --git a/templates/blogpost.md.ejs b/templates/blogpost.md.ejs index 2d73ee127fe3..efb1161ed47a 100644 --- a/templates/blogpost.md.ejs +++ b/templates/blogpost.md.ejs @@ -50,7 +50,7 @@ npm i eslint@<%- version %> --save-dev ### Migration Guide -As there are a lot of changes, we've created a [migration guide](/docs/<%- prereleaseMajorVersion %>/user-guide/migrating-to-<%- prereleaseMajorVersion %>) describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems. +As there are a lot of changes, we've created a [migration guide](/docs/<%- prereleaseMajorVersion %>/use/migrating-to-<%- prereleaseMajorVersion %>) describing the changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems. <% } %> diff --git a/tests/lib/rule-tester/rule-tester.js b/tests/lib/rule-tester/rule-tester.js index bba5f14bfbc8..459d7ce0893e 100644 --- a/tests/lib/rule-tester/rule-tester.js +++ b/tests/lib/rule-tester/rule-tester.js @@ -2286,7 +2286,7 @@ describe("RuleTester", () => { assert.deepStrictEqual( processStub.getCall(0).args, [ - "\"function-style-rule\" rule is using the deprecated function-style format and will stop working in ESLint v9. Please use object-style format: https://eslint.org/docs/developer-guide/working-with-rules", + "\"function-style-rule\" rule is using the deprecated function-style format and will stop working in ESLint v9. Please use object-style format: https://eslint.org/docs/extend/custom-rules", "DeprecationWarning" ] ); @@ -2304,7 +2304,7 @@ describe("RuleTester", () => { assert.deepStrictEqual( processStub.getCall(0).args, [ - "\"rule-with-no-meta-1\" rule has options but is missing the \"meta.schema\" property and will stop working in ESLint v9. Please add a schema: https://eslint.org/docs/developer-guide/working-with-rules#options-schemas", + "\"rule-with-no-meta-1\" rule has options but is missing the \"meta.schema\" property and will stop working in ESLint v9. Please add a schema: https://eslint.org/docs/extend/custom-rules#options-schemas", "DeprecationWarning" ] ); @@ -2322,7 +2322,7 @@ describe("RuleTester", () => { assert.deepStrictEqual( processStub.getCall(0).args, [ - "\"rule-with-no-schema-1\" rule has options but is missing the \"meta.schema\" property and will stop working in ESLint v9. Please add a schema: https://eslint.org/docs/developer-guide/working-with-rules#options-schemas", + "\"rule-with-no-schema-1\" rule has options but is missing the \"meta.schema\" property and will stop working in ESLint v9. Please add a schema: https://eslint.org/docs/extend/custom-rules#options-schemas", "DeprecationWarning" ] ); @@ -2355,7 +2355,7 @@ describe("RuleTester", () => { assert.deepStrictEqual( processStub.getCall(0).args, [ - "\"rule-with-undefined-schema\" rule has options but is missing the \"meta.schema\" property and will stop working in ESLint v9. Please add a schema: https://eslint.org/docs/developer-guide/working-with-rules#options-schemas", + "\"rule-with-undefined-schema\" rule has options but is missing the \"meta.schema\" property and will stop working in ESLint v9. Please add a schema: https://eslint.org/docs/extend/custom-rules#options-schemas", "DeprecationWarning" ] ); @@ -2387,7 +2387,7 @@ describe("RuleTester", () => { assert.deepStrictEqual( processStub.getCall(0).args, [ - "\"rule-with-null-schema\" rule has options but is missing the \"meta.schema\" property and will stop working in ESLint v9. Please add a schema: https://eslint.org/docs/developer-guide/working-with-rules#options-schemas", + "\"rule-with-null-schema\" rule has options but is missing the \"meta.schema\" property and will stop working in ESLint v9. Please add a schema: https://eslint.org/docs/extend/custom-rules#options-schemas", "DeprecationWarning" ] ); diff --git a/tools/fetch-docs-links.js b/tools/fetch-docs-links.js index 3d92633f37f7..d29dff1b3a0c 100644 --- a/tools/fetch-docs-links.js +++ b/tools/fetch-docs-links.js @@ -7,7 +7,7 @@ * * To fetch info for just selected files (for use with lint-staged): * - * node tools/fetch-docs-links.js docs/src/user-guide/index.md + * node tools/fetch-docs-links.js docs/src/use/index.md * * @author Nicholas C. Zakas */