Skip to content

Commit e76aaff

Browse files
author
qiyuhang
committed
docs: 更改README.md
1 parent 6cfa924 commit e76aaff

File tree

3 files changed

+5
-33
lines changed

3 files changed

+5
-33
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"editor.codeActionsOnSave": {
3-
"source.fixAll.eslint": true
3+
"source.fixAll.eslint": "explicit"
44
},
55
"editor.fontLigatures": true,
66
"editor.formatOnSave": false,

README.md

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,21 @@
66
- Reasonable defaults, best practices, only one-line of config
77
- Default Alias mapping "@" => "src", "~" => "./"
88

9-
## Package
10-
11-
### eslint-config-rascal
12-
13-
this default config is equal to rascal-ts
14-
15-
### eslint-config-rascal-base
16-
17-
this is base config, lint for js, html, json, yaml, markdown
18-
19-
### eslint-config-rascal-ts
20-
21-
this config extends the base config, and it also lint for ts
22-
23-
### eslint-config-rascal-vue
24-
25-
this config extends the ts config, and it also lint for vue3
26-
27-
### eslint-config-rascal-vue2
28-
29-
this config extends the ts config, and it also lint for vue2
309

3110
## Usage
3211

3312
### Install
3413

3514
```bash
3615
pnpm add -D eslint
37-
pnpm add -D eslint-config-rascal # for ts
38-
pnpm add -D eslint-config-rascal-base # base
39-
pnpm add -D eslint-config-rascal-ts # for ts
40-
pnpm add -D eslint-config-rascal-vue # for vue3
41-
pnpm add -D eslint-config-rascal-vue2 # for vue2
42-
pnpm add -D eslint-config-rascal-react # for vue2
16+
pnpm add -D eslint-config-rascal
4317
```
4418

4519
### Config eslint (.eslintrc | .eslintrc.js | .eslintrc.json)
4620

4721
```json
4822
{
49-
"extends": "rascal" // or rascal-base, rascal-ts, rascal-vue, rascal-vue2, rascal-react
23+
"extends": "rascal" // or rascal/base, rascal/ts, rascal/vue, rascal/vue2, rascal/react
5024
}
5125
```
5226

@@ -88,7 +62,7 @@ For example:
8862
```json
8963
{
9064
"editor.codeActionsOnSave": {
91-
"source.fixAll.eslint": true
65+
"source.fixAll.eslint": "explicit"
9266
},
9367
"editor.formatOnSave": false,
9468
"eslint.validate": [
@@ -97,8 +71,6 @@ For example:
9771
"typescript",
9872
"typescriptreact",
9973
"vue",
100-
"svelte",
101-
"astro",
10274
"json"
10375
]
10476
}

lib/configs/ts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = {
2121
parser: '@typescript-eslint/parser'
2222
},
2323
{
24-
files: ['*.js', '*.mjs', '*.cjs', '*.cts'],
24+
files: ['*.js', '*.mjs', '*.cjs'],
2525
rules: {
2626
'@typescript-eslint/no-var-requires': 'off'
2727
}

0 commit comments

Comments
 (0)