Skip to content

Commit 4840930

Browse files
authored
docs: Update README with version support and clean up content (#18804)
* docs: Update README with version support and clean up content refs #18621 * Apply feedback
1 parent f61f40d commit 4840930

File tree

1 file changed

+40
-35
lines changed

1 file changed

+40
-35
lines changed

README.md

Lines changed: 40 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,19 @@ ESLint is a tool for identifying and reporting on patterns found in ECMAScript/J
2828
## Table of Contents
2929

3030
1. [Installation and Usage](#installation-and-usage)
31-
2. [Configuration](#configuration)
32-
3. [Code of Conduct](#code-of-conduct)
33-
4. [Filing Issues](#filing-issues)
34-
5. [Frequently Asked Questions](#frequently-asked-questions)
35-
6. [Releases](#releases)
36-
7. [Security Policy](#security-policy)
37-
8. [Semantic Versioning Policy](#semantic-versioning-policy)
38-
9. [Stylistic Rule Updates](#stylistic-rule-updates)
39-
10. [License](#license)
40-
11. [Team](#team)
41-
12. [Sponsors](#sponsors)
42-
13. [Technology Sponsors](#technology-sponsors) <!-- markdownlint-disable-line MD051 -->
31+
1. [Configuration](#configuration)
32+
1. [Version Support](#version-support)
33+
1. [Code of Conduct](#code-of-conduct)
34+
1. [Filing Issues](#filing-issues)
35+
1. [Frequently Asked Questions](#frequently-asked-questions)
36+
1. [Releases](#releases)
37+
1. [Security Policy](#security-policy)
38+
1. [Semantic Versioning Policy](#semantic-versioning-policy)
39+
1. [Stylistic Rule Updates](#stylistic-rule-updates)
40+
1. [License](#license)
41+
1. [Team](#team)
42+
1. [Sponsors](#sponsors)
43+
1. [Technology Sponsors](#technology-sponsors) <!-- markdownlint-disable-line MD051 -->
4344

4445
## Installation and Usage
4546

@@ -54,29 +55,44 @@ npm init @eslint/config@latest
5455
After that, you can run ESLint on any file or directory like this:
5556

5657
```shell
57-
./node_modules/.bin/eslint yourfile.js
58+
npx eslint yourfile.js
5859
```
5960

6061
## Configuration
6162

62-
After running `npm init @eslint/config`, you'll have an `eslint.config.js` (or `eslint.config.mjs`) file in your directory. In it, you'll see some rules configured like this:
63+
You can configure rules in your `eslint.config.js` files as in this example:
6364

6465
```js
65-
import pluginJs from "@eslint/js";
66-
export default [ pluginJs.configs.recommended, ];
66+
export default [
67+
{
68+
files: ["**/*.js", "**/*.cjs", "**/*.mjs"],
69+
rules: {
70+
"prefer-const": "warn",
71+
"no-constant-binary-expression": "error"
72+
}
73+
}
74+
];
6775
```
6876

69-
The names `"semi"` and `"quotes"` are the names of [rules](https://eslint.org/docs/rules) in ESLint. The first value is the error level of the rule and can be one of these values:
77+
The names `"prefer-const"` and `"no-constant-binary-expression"` are the names of [rules](https://eslint.org/docs/rules) in ESLint. The first value is the error level of the rule and can be one of these values:
7078

7179
* `"off"` or `0` - turn the rule off
7280
* `"warn"` or `1` - turn the rule on as a warning (doesn't affect exit code)
7381
* `"error"` or `2` - turn the rule on as an error (exit code will be 1)
7482

7583
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/latest/use/configure)).
7684

85+
## Version Support
86+
87+
The ESLint team provides ongoing support for the current version and six months of limited support for the previous version. Limited support includes critical bug fixes, security issues, and compatibility issues only.
88+
89+
ESLint offers commercial support for both current and previous versions through our partners, [Tidelift][tidelift] and [HeroDevs][herodevs].
90+
91+
See [Version Support](https://eslint.org/version-support) for more details.
92+
7793
## Code of Conduct
7894

79-
ESLint adheres to the [JS Foundation Code of Conduct](https://eslint.org/conduct).
95+
ESLint adheres to the [OpenJS Foundation Code of Conduct](https://eslint.org/conduct).
8096

8197
## Filing Issues
8298

@@ -89,28 +105,14 @@ Before filing an issue, please be sure to read the guidelines for what you're re
89105

90106
## Frequently Asked Questions
91107

92-
### I'm using JSCS, should I migrate to ESLint?
93-
94-
Yes. [JSCS has reached end of life](https://eslint.org/blog/2016/07/jscs-end-of-life) and is no longer supported.
95-
96-
We have prepared a [migration guide](https://eslint.org/docs/latest/use/migrating-from-jscs) to help you convert your JSCS settings to an ESLint configuration.
108+
### Does ESLint support JSX?
97109

98-
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.
110+
Yes, ESLint natively supports parsing JSX syntax (this must be enabled in [configuration](https://eslint.org/docs/latest/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.
99111

100112
### Does Prettier replace ESLint?
101113

102114
No, ESLint and Prettier have different jobs: ESLint is a linter (looking for problematic patterns) and Prettier is a code formatter. Using both tools is common, refer to [Prettier's documentation](https://prettier.io/docs/en/install#eslint-and-other-linters) to learn how to configure them to work well with each other.
103115

104-
### Why can't ESLint find my plugins?
105-
106-
* Make sure your plugins (and ESLint) are both in your project's `package.json` as devDependencies (or dependencies, if your project uses ESLint at runtime).
107-
* Make sure you have run `npm install` and all your dependencies are installed.
108-
* Make sure your plugins' peerDependencies have been installed as well. You can use `npm view eslint-plugin-myplugin peerDependencies` to see what peer dependencies `eslint-plugin-myplugin` has.
109-
110-
### Does ESLint support JSX?
111-
112-
Yes, ESLint natively supports parsing JSX syntax (this must be enabled in [configuration](https://eslint.org/docs/latest/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.
113-
114116
### What ECMAScript versions does ESLint support?
115117

116118
ESLint has full support for ECMAScript 3, 5, and every year from 2015 up until the most recent stage 4 specification (the default). You can set your desired ECMAScript syntax and other settings (like global variables) through [configuration](https://eslint.org/docs/latest/use/configure).
@@ -303,4 +305,7 @@ The following companies, organizations, and individuals support ESLint's ongoing
303305
<!--techsponsorsstart-->
304306
<h2>Technology Sponsors</h2>
305307
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>
306-
<!--techsponsorsend-->
308+
<!--techsponsorsend-->
309+
310+
[tidelift]: https://tidelift.com/funding/github/npm/eslint
311+
[herodevs]: https://www.herodevs.com/support/eslint-nes?utm_source=ESLintWebsite&utm_medium=ESLintWebsite&utm_campaign=ESLintNES&utm_id=ESLintNES

0 commit comments

Comments
 (0)