@kirklin/eslint-config 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -58
- package/index.js +5 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
# @kirklin/eslint-config
|
|
2
|
-
|
|
3
|
-
[](https://npmjs.com/package/@kirklin/eslint-config)
|
|
4
|
-
|
|
5
|
-
- double quotes, must semi
|
|
6
|
-
- Auto fix for formatting (aimed to be used standalone without Prettier)
|
|
7
|
-
- TypeScript, Vue, React out-of-box
|
|
8
|
-
- Lint also for json, yaml, markdown
|
|
9
|
-
- Sorted imports, dangling commas for cleaner commit diff
|
|
10
|
-
- Reasonable defaults, best practices, only one-line of config
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
|
|
14
|
-
### Install
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
pnpm add -D eslint @kirklin/eslint-config
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
### Config `.eslintrc`
|
|
21
|
-
|
|
22
|
-
```json
|
|
23
|
-
{
|
|
24
|
-
"extends": "@kirklin"
|
|
25
|
-
}
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
> You don't need `.eslintignore` normally as it has been provided by the preset.
|
|
29
|
-
|
|
30
|
-
### Add script for package.json
|
|
31
|
-
|
|
32
|
-
For example:
|
|
33
|
-
|
|
34
|
-
```json
|
|
35
|
-
{
|
|
36
|
-
"scripts": {
|
|
37
|
-
"lint": "eslint .",
|
|
38
|
-
"lint:fix": "eslint . --fix"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
### Config VS Code auto fix
|
|
44
|
-
|
|
45
|
-
Create `.vscode/settings.json`
|
|
46
|
-
|
|
47
|
-
```json
|
|
48
|
-
{
|
|
49
|
-
"prettier.enable": false,
|
|
50
|
-
"editor.codeActionsOnSave": {
|
|
51
|
-
"source.fixAll.eslint": true
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## License
|
|
57
|
-
|
|
58
|
-
[MIT](./LICENSE) License © 2019-PRESENT [Kirk Lin](https://github.com/kirklin)
|
|
1
|
+
# @kirklin/eslint-config
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.com/package/@kirklin/eslint-config)
|
|
4
|
+
|
|
5
|
+
- double quotes, must semi
|
|
6
|
+
- Auto fix for formatting (aimed to be used standalone without Prettier)
|
|
7
|
+
- TypeScript, Vue, React out-of-box
|
|
8
|
+
- Lint also for json, yaml, markdown
|
|
9
|
+
- Sorted imports, dangling commas for cleaner commit diff
|
|
10
|
+
- Reasonable defaults, best practices, only one-line of config
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
### Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pnpm add -D eslint @kirklin/eslint-config
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### Config `.eslintrc`
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"extends": "@kirklin"
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
> You don't need `.eslintignore` normally as it has been provided by the preset.
|
|
29
|
+
|
|
30
|
+
### Add script for package.json
|
|
31
|
+
|
|
32
|
+
For example:
|
|
33
|
+
|
|
34
|
+
```json
|
|
35
|
+
{
|
|
36
|
+
"scripts": {
|
|
37
|
+
"lint": "eslint .",
|
|
38
|
+
"lint:fix": "eslint . --fix"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Config VS Code auto fix
|
|
44
|
+
|
|
45
|
+
Create `.vscode/settings.json`
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"prettier.enable": false,
|
|
50
|
+
"editor.codeActionsOnSave": {
|
|
51
|
+
"source.fixAll.eslint": true
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
[MIT](./LICENSE) License © 2019-PRESENT [Kirk Lin](https://github.com/kirklin)
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
extends: [
|
|
3
|
-
"@kirklin/eslint-config-vue",
|
|
4
|
-
],
|
|
5
|
-
};
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: [
|
|
3
|
+
"@kirklin/eslint-config-vue",
|
|
4
|
+
],
|
|
5
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kirklin/eslint-config",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Kirk Lin's ESLint config",
|
|
5
5
|
"author": "Kirk Lin <linkirk@163.com> (https://github.com/kirklin)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"eslint": ">=7.4.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@kirklin/eslint-config-vue": "0.1.
|
|
19
|
+
"@kirklin/eslint-config-vue": "0.1.8",
|
|
20
20
|
"@typescript-eslint/eslint-plugin": "^5.36.1",
|
|
21
21
|
"@typescript-eslint/parser": "^5.36.1",
|
|
22
22
|
"eslint-plugin-eslint-comments": "^3.2.0",
|