Skip to content

Commit 6a6de63

Browse files
committed
README updates
1 parent 54db6bd commit 6a6de63

File tree

1 file changed

+40
-13
lines changed

1 file changed

+40
-13
lines changed

README.md

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
[![CI](https://github.com/joshwilsonvu/eslint-plugin-solid/actions/workflows/ci.yml/badge.svg)](https://github.com/joshwilsonvu/eslint-plugin-solid/actions/workflows/ci.yml)
66
![ESLint peer dependency](https://img.shields.io/badge/eslint-6.x--8.x-blue)
77

8-
This package contains [Solid](https://www.solidjs.com/)-specific linting rules for ESLint.
9-
It can ease Solid's learning curve by finding and fixing problems around Solid's reactivity system,
10-
and can migrate some React patterns to Solid code.
8+
This package contains [Solid](https://www.solidjs.com/)-specific linting rules for ESLint. It can
9+
ease Solid's learning curve by finding and fixing problems around Solid's reactivity system, and can
10+
migrate some React patterns to Solid code.
1111

12-
It's approaching a `1.0.0` release, and it's well tested and should
13-
be helpful in Solid projects today.
12+
It's approaching a `1.0.0` release, and it's well tested and should be helpful in Solid projects
13+
today.
1414

1515
## Installation
1616

@@ -29,10 +29,25 @@ pnpm eslint --init
2929
yarn eslint --init
3030
```
3131

32-
If you're using VSCode, you'll want to install the [ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint).
33-
If you're using Vite, you may want to install [vite-plugin-eslint](https://github.com/gxmari007/vite-plugin-eslint).
32+
If you're using VSCode, you'll want to install the [ESLint
33+
extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint). You're
34+
encouraged to enable auto-fixing problems on save by adding the following to your `settings.json`
35+
file.
3436

35-
You may also want to check out [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y), which provides useful rules for keeping HTML accessible.
37+
```json
38+
{
39+
"editor.codeActionsOnSave": {
40+
"source.fixAll": true
41+
}
42+
}
43+
```
44+
45+
If you're using Vite, you may want to install
46+
[vite-plugin-eslint](https://github.com/gxmari007/vite-plugin-eslint).
47+
48+
You may also want to check out
49+
[eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y), which provides
50+
useful rules for writing accessible HTML.
3651

3752
## Configuration
3853

@@ -60,10 +75,10 @@ This disables some features that overlap with type checking.
6075

6176
### Manual Configuration
6277

63-
If you don't want to use a preset, you can configure rules individually. Add the `"solid"`
64-
plugin, enable JSX with the parser options (or use the equivalent options for
65-
`@typescript-eslint/parser` or `@babel/eslint-parser`), and configure the rules you
66-
would like to use.
78+
If you don't want to use a preset, you can configure rules individually. Add the `"solid"` plugin,
79+
enable JSX with the parser options (or use the equivalent options for `@typescript-eslint/parser` or
80+
`@babel/eslint-parser`), and configure the rules you would like to use. Some rules have additional
81+
options you can set.
6782

6883
```json
6984
{
@@ -81,11 +96,23 @@ would like to use.
8196
}
8297
```
8398

99+
### Disabling Rules
100+
101+
The rules in this plugin provide sensible guidelines, but there may be occasions where you *know
102+
what you're doing* and want to ignore a warning. Just [add a
103+
comment](https://eslint.org/docs/latest/user-guide/configuring/rules#disabling-rules) like the
104+
following:
105+
106+
```jsx
107+
// eslint-disable-next-line solid/reactivity
108+
const [editedValue, setEditedValue] = createSignal(props.value)
109+
```
110+
84111
## Rules
85112

86113
✔: Enabled in the `recommended` configuration.
87114

88-
🔧: Fixable with [`eslint --fix`](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems).
115+
🔧: Fixable with [`eslint --fix`](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems)/IDE auto-fix.
89116

90117
<!-- AUTO-GENERATED-CONTENT:START (RULES) -->
91118
|| 🔧 | Rule | Description |

0 commit comments

Comments
 (0)