@kirklin/eslint-config 0.1.0
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/LICENSE +21 -0
- package/README.md +58 -0
- package/index.js +6 -0
- package/package.json +38 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019-PRESENT Kirk Lin<https://github.com/kirklin>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +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)
|
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kirklin/eslint-config",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Kirk Lin's ESLint config",
|
|
5
|
+
"author": "Kirk Lin <linkirk@163.com> (https://github.com/kirklin)",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://github.com/kirklin/eslint-config",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"eslint-config"
|
|
10
|
+
],
|
|
11
|
+
"main": "index.js",
|
|
12
|
+
"files": [
|
|
13
|
+
"index.js"
|
|
14
|
+
],
|
|
15
|
+
"peerDependencies": {
|
|
16
|
+
"eslint": ">=7.4.0"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@kirklin/eslint-config-react": "0.1.0",
|
|
20
|
+
"@kirklin/eslint-config-vue": "0.1.0",
|
|
21
|
+
"@typescript-eslint/eslint-plugin": "^5.35.1",
|
|
22
|
+
"@typescript-eslint/parser": "^5.35.1",
|
|
23
|
+
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
24
|
+
"eslint-plugin-html": "^7.1.0",
|
|
25
|
+
"eslint-plugin-import": "^2.26.0",
|
|
26
|
+
"eslint-plugin-jsonc": "^2.4.0",
|
|
27
|
+
"eslint-plugin-n": "^15.2.5",
|
|
28
|
+
"eslint-plugin-promise": "^6.0.1",
|
|
29
|
+
"eslint-plugin-unicorn": "^43.0.2",
|
|
30
|
+
"eslint-plugin-vue": "^9.4.0",
|
|
31
|
+
"eslint-plugin-yml": "^1.1.0",
|
|
32
|
+
"jsonc-eslint-parser": "^2.1.0",
|
|
33
|
+
"yaml-eslint-parser": "^1.1.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"eslint": "^8.23.0"
|
|
37
|
+
}
|
|
38
|
+
}
|