mirror of
https://github.com/garraflavatra/yeslint.git
synced 2025-02-19 16:29:27 +00:00
Update readme once again
This commit is contained in:
parent
e03f402952
commit
db88b2164f
16
README.md
16
README.md
@ -2,17 +2,19 @@
|
|||||||
|
|
||||||
A sensible, modern collection of configuration files for [ESLint] 8.x that enforces beautiful and correct code. It contains both rules to ensure correct code (e.g. enforce `break` statements in each `switch` `case`), and rules to make your code beautiful (e.g. adding a trailing comma to array items that start on a newline).
|
A sensible, modern collection of configuration files for [ESLint] 8.x that enforces beautiful and correct code. It contains both rules to ensure correct code (e.g. enforce `break` statements in each `switch` `case`), and rules to make your code beautiful (e.g. adding a trailing comma to array items that start on a newline).
|
||||||
|
|
||||||
|
TypeScript is supported out of the box! No configuration is required.
|
||||||
|
|
||||||
## What's included
|
## What's included
|
||||||
|
|
||||||
Currently, the 3 following configuration files are available:
|
Currently, the 3 following configuration files are available:
|
||||||
|
|
||||||
* `generic`: generic ESLint configuration for all modern JavaScript runtimes.
|
* `generic`: generic ESLint configuration for all modern JavaScript runtimes.
|
||||||
* `node`: an extension on the generic config, with rules specific to Node.js.
|
* `node`: an extension on the generic config, with rules specific to Node.js. Also works with [Bun]!
|
||||||
* `svelte`: configuration for [Svelte] and JavaScript in browser environments.
|
* `svelte`: configuration for [Svelte] and JavaScript in browser environments.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
Please see [the `examples` directory](./examples) for some examples. Files that start with `wrong.` contain many errors, and the fixed version of those files is in their `correct.` equivalent.
|
Please see [the `example` directory](./example) for some examples. Files that start with `wrong.` contain many errors, and the fixed version of those files is in their `correct.` equivalent.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@ -30,7 +32,9 @@ pnpm add --save-dev eslint@^8.57 @garraflavatra/yeslint
|
|||||||
bun add --save-dev eslint@^8.57 @garraflavatra/yeslint
|
bun add --save-dev eslint@^8.57 @garraflavatra/yeslint
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, tell ESLint to extend this configuration. Add it either in `.eslintrc.json`, add it as the default export in `.eslintrc.js`, or add it in your `package.json` under the `"eslintConfig"` key.
|
## Usage
|
||||||
|
|
||||||
|
After installing the package, tell ESLint to extend its configuration. Either add it to `.eslintrc.json`, set it as the default export in `.eslintrc.js`, or add it to your `package.json` under the `"eslintConfig"` key.
|
||||||
|
|
||||||
Please consider the following example. You should replace `<name>` with the name of the configuration you want to use.
|
Please consider the following example. You should replace `<name>` with the name of the configuration you want to use.
|
||||||
|
|
||||||
@ -50,6 +54,10 @@ Or add this to your `package.json` file:
|
|||||||
|
|
||||||
After installing, run `npx eslint .` to lint your code for the first time, or use `npx eslint --fix .` to lint while automatically fixing all auto-fixable problems ESLint finds in your codebase.
|
After installing, run `npx eslint .` to lint your code for the first time, or use `npx eslint --fix .` to lint while automatically fixing all auto-fixable problems ESLint finds in your codebase.
|
||||||
|
|
||||||
|
## Feedback
|
||||||
|
|
||||||
|
Please feel free to [report](https://github.com/garraflavatra/yeslint/issues/new) any issues and questions! Much appreciated :)
|
||||||
|
|
||||||
## Author & license
|
## Author & license
|
||||||
|
|
||||||
© [Romein van Buren](mailto:romein@vburen.nl) 2023-2024. yeslint! is released under the MIT license — see LICENSE for the full license text.
|
© [Romein van Buren](mailto:romein@vburen.nl) 2023-2024. yeslint! is released under the MIT license — see LICENSE for the full license text.
|
||||||
@ -58,4 +66,4 @@ After installing, run `npx eslint .` to lint your code for the first time, or us
|
|||||||
[Svelte]: https://svelte.dev/
|
[Svelte]: https://svelte.dev/
|
||||||
[npm]: https://www.npmjs.com/
|
[npm]: https://www.npmjs.com/
|
||||||
[pnpm]: https://pnpm.io/
|
[pnpm]: https://pnpm.io/
|
||||||
[Yarn]: https://yarnpkg.com/
|
[Bun]: https://bun.sh/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user