Skip to content

Commit 872ae79

Browse files
committed
docs(readme.md): fix
1 parent 7a184cf commit 872ae79

File tree

1 file changed

+47
-16
lines changed

1 file changed

+47
-16
lines changed

readme.md

Lines changed: 47 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
![NPM Version](https://img.shields.io/npm/v/eslint-plugin-object-css?color=brightgreen)
44
![NPM License](https://img.shields.io/npm/l/eslint-plugin-object-css?color=yellow)
55

6-
ESLint plugin for object CSS properties order and valid value verification
6+
ESLint plugin for object CSS properties order and valid value verification.
77

88
## Installation
99

@@ -13,15 +13,15 @@ You'll first need to install [ESLint](https://eslint.org/):
1313
npm i eslint --save-dev
1414
```
1515

16-
Next, install `eslint-plugin-object-css`:
16+
Next install `eslint-plugin-object-css`:
1717

1818
```sh
1919
npm install eslint-plugin-object-css --save-dev
2020
```
2121

2222
## Usage
2323

24-
Add object-css to the plugins section of your `.eslintrc` configuration file. You can oISC the eslint-plugin- prefix:
24+
Add object-css to the plugins section of your `.eslintrc` configuration file. You can omit the eslint-plugin- prefix:
2525

2626
```json
2727
{
@@ -31,39 +31,39 @@ Add object-css to the plugins section of your `.eslintrc` configuration file. Yo
3131

3232
## Recommended
3333

34-
As for the recommended rules, two rules will be enabled with the recess-order is "warn", valid-value is "error".
34+
As for the recommended rules two rules will be enabled with the recess-order is "warn" valid-value is "error".
3535

3636
```json
3737
"extends": [
3838
"plugin:object-css/recommended"
39-
],
39+
]
4040
```
4141

4242
## Rules
4343

44-
If you want to set security levels individually, set them in the rules.
44+
If you want to set security levels individually set them in the rules.
4545

4646
```json
4747
{
4848
"rules": {
49-
"object-css/recess-order": "warn",
49+
"object-css/recess-order": "warn"
5050
"object-css/valid-value": "error"
5151
}
5252
}
5353
```
5454

5555
※ If you use typescript you will need a suitable parser like typescript-eslint.
56-
If you are using eslint v8 and below, set `"eslint.useESLintClass": true` in vscode's setting.json.
56+
If you are using eslint v8 and below set `"eslint.useESLintClass": true` in vscode's setting.json.
5757

58-
## Supports ESLint v9 and above
58+
## Supports ESLint v9 and higher
5959

6060
```sh
6161
npm install @eslint/js typescript-eslint --save-dev
6262
```
6363

64-
If you are using eslint 9 or above, do not use this `useESLintClass`.
64+
If you are using eslint 9 or higher do not use this `useESLintClass`.
6565

66-
### eslint.config.mjs
66+
### Example config mjs
6767

6868
The following file is a configuration file that contains recommended settings for TypeScript and eslint.
6969

@@ -73,13 +73,44 @@ import tseslint from 'typescript-eslint'
7373
import objectCss from 'eslint-plugin-object-css'
7474

7575
const eslintConfig = tseslint.config(
76-
eslint.configs.recommended,
77-
...tseslint.configs.strict,
78-
objectCss.flatConfigs.recommended,
76+
eslint.configs.recommended
77+
...tseslint.configs.strict
78+
objectCss.flatConfigs.recommended
7979
{
80-
files: ['**/*.{js,jsx,ts,tsx}'],
81-
},
80+
files: ['**/*.{jsjsxtstsx}']
81+
}
8282
)
8383

8484
export default eslintConfig
8585
```
86+
87+
## Rule Description
88+
89+
### recess-order
90+
91+
It is created based on the sorting of [stylelint-config-recess-order](https://www.npmjs.com/package/stylelint-config-recess-order).
92+
93+
### valid-value
94+
95+
These are not validated as they have names with unique identifiers.
96+
Validation includes other standard properties.
97+
98+
- animationName
99+
- counterIncrement
100+
- counterReset
101+
- counterSet
102+
- font
103+
- fontFamily
104+
- gridArea
105+
- gridColumn
106+
- gridColumnEn
107+
- gridColumnStart
108+
- gridRow
109+
- gridRowEnd
110+
- gridRowStart
111+
- listStyleType
112+
- listStyle
113+
- transitionProperty
114+
- transition
115+
- viewTransitionName
116+
- willChange

0 commit comments

Comments
 (0)