@kirklin/eslint-config 0.2.4 → 0.2.6

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.
Files changed (4) hide show
  1. package/README.md +115 -115
  2. package/README.zh-cn.md +117 -117
  3. package/index.js +5 -5
  4. package/package.json +7 -7
package/README.md CHANGED
@@ -1,115 +1,115 @@
1
- # @kirklin/eslint-config
2
- [![CI][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript_code style][code-style-image]][code-style-url]
3
-
4
- [ci-image]: https://github.com/kirklin/eslint-config/actions/workflows/release.yml/badge.svg?branch=master
5
- [ci-url]: https://github.com/kirklin/eslint-config/actions/workflows/release.yml
6
- [npm-image]: https://img.shields.io/npm/v/@kirklin/eslint-config.svg
7
- [npm-url]: https://npmjs.org/package/@kirklin/eslint-config
8
- [downloads-image]: https://img.shields.io/npm/dm/@kirklin/eslint-config.svg
9
- [downloads-url]: https://npmjs.org/package/@kirklin/eslint-config
10
- [code-style-image]: https://img.shields.io/badge/code__style-%40kirklin%2Feslint--config-brightgreen
11
- [code-style-url]: https://github.com/kirklin/eslint-config/
12
-
13
- <div align='left'>
14
- <b>English</b> | <a href="README.zh-cn.md">简体中文</a>
15
- <br>
16
- </div>
17
-
18
- ## Features
19
-
20
- - "double quotes", must semi;
21
- - Auto fix for formatting (aimed to be used standalone without Prettier)
22
- - TypeScript, Vue out-of-box
23
- - Lint also for JSON、YAML、Markdown
24
- - Sorted imports, dangling commas for cleaner commit diff
25
- - Reasonable defaults, best practices, only one-line of config
26
-
27
- ## Usage
28
-
29
- Shareable configs are designed to work with the `extends` feature of `.eslintrc` files.
30
- You can learn more about
31
- [Shareable Configs](http://eslint.org/docs/developer-guide/shareable-configs) on the
32
- official ESLint website.
33
-
34
- #### run the following command:
35
-
36
- ### Install
37
-
38
- ```bash
39
- pnpm add -D eslint @kirklin/eslint-config
40
- ```
41
- ### add this to your `.eslintrc` file:
42
-
43
- ```json
44
- {
45
- "extends": "@kirklin"
46
- }
47
- ```
48
-
49
- > You don't need `.eslintignore` normally as it has been provided by the preset.
50
-
51
- ### Add script for package.json
52
-
53
- For example:
54
-
55
- ```json
56
- {
57
- "scripts": {
58
- "lint": "eslint .",
59
- "lint:fix": "eslint . --fix"
60
- }
61
- }
62
- ```
63
-
64
- ### Config VS Code auto fix
65
-
66
- Create `.vscode/settings.json`
67
-
68
- ```json
69
- {
70
- "prettier.enable": false,
71
- "editor.formatOnSave": false,
72
- "editor.codeActionsOnSave": {
73
- "source.fixAll.eslint": true
74
- }
75
- }
76
- ```
77
- ### Customization rules
78
- add you like rules to your `.eslintrc` file:
79
- ```json
80
- {
81
- "extends": [
82
- "@kirklin"
83
- ],
84
- "rules": {
85
- "vue/component-tags-order": ["error", {
86
- "order": ["template", "script", "style"]
87
- }]
88
- }
89
- }
90
- ```
91
- ### TypeScript Aware Rules
92
-
93
- Type aware rules are enabled when a `tsconfig.eslint.json` is found in the project root. Refer to [this file](https://github.com/kirklin/eslint-config/blob/master/packages/typescript/index.js#L17).
94
-
95
- ## Badge
96
-
97
- Use this in one of your projects? Include one of these badges in your readme to
98
- let people know that your code is using the standard style.
99
-
100
-
101
- [![kirklin-code-style-image](https://img.shields.io/badge/code__style-%40kirklin%2Feslint--config-brightgreen)](https://github.com/kirklin/eslint-config/)
102
-
103
- ```markdown
104
- [![kirklin-code-style-image](https://img.shields.io/badge/code__style-%40kirklin%2Feslint--config-brightgreen)](https://github.com/kirklin/eslint-config/)
105
- ```
106
-
107
- [code-style-image]: https://img.shields.io/badge/code__style-%40kirklin%2Feslint--config-brightgreen
108
- [code-style-url]: https://github.com/kirklin/eslint-config/
109
-
110
- ## Thanks
111
- This project is based on [@antfu/eslint-config](https://github.com/antfu/eslint-config)
112
-
113
- ## License
114
-
115
- [MIT](./LICENSE) License &copy; 2019-PRESENT [Kirk Lin](https://github.com/kirklin)
1
+ # @kirklin/eslint-config
2
+ [![CI][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript_code style][code-style-image]][code-style-url]
3
+
4
+ [ci-image]: https://github.com/kirklin/eslint-config/actions/workflows/release.yml/badge.svg?branch=master
5
+ [ci-url]: https://github.com/kirklin/eslint-config/actions/workflows/release.yml
6
+ [npm-image]: https://img.shields.io/npm/v/@kirklin/eslint-config.svg
7
+ [npm-url]: https://npmjs.org/package/@kirklin/eslint-config
8
+ [downloads-image]: https://img.shields.io/npm/dm/@kirklin/eslint-config.svg
9
+ [downloads-url]: https://npmjs.org/package/@kirklin/eslint-config
10
+ [code-style-image]: https://img.shields.io/badge/code__style-%40kirklin%2Feslint--config-brightgreen
11
+ [code-style-url]: https://github.com/kirklin/eslint-config/
12
+
13
+ <div align='left'>
14
+ <b>English</b> | <a href="README.zh-cn.md">简体中文</a>
15
+ <br>
16
+ </div>
17
+
18
+ ## Features
19
+
20
+ - "double quotes", must semi;
21
+ - Auto fix for formatting (aimed to be used standalone without Prettier)
22
+ - TypeScript, Vue out-of-box
23
+ - Lint also for JSON、YAML、Markdown
24
+ - Sorted imports, dangling commas for cleaner commit diff
25
+ - Reasonable defaults, best practices, only one-line of config
26
+
27
+ ## Usage
28
+
29
+ Shareable configs are designed to work with the `extends` feature of `.eslintrc` files.
30
+ You can learn more about
31
+ [Shareable Configs](http://eslint.org/docs/developer-guide/shareable-configs) on the
32
+ official ESLint website.
33
+
34
+ #### run the following command:
35
+
36
+ ### Install
37
+
38
+ ```bash
39
+ pnpm add -D eslint @kirklin/eslint-config
40
+ ```
41
+ ### add this to your `.eslintrc` file:
42
+
43
+ ```json
44
+ {
45
+ "extends": "@kirklin"
46
+ }
47
+ ```
48
+
49
+ > You don't need `.eslintignore` normally as it has been provided by the preset.
50
+
51
+ ### Add script for package.json
52
+
53
+ For example:
54
+
55
+ ```json
56
+ {
57
+ "scripts": {
58
+ "lint": "eslint .",
59
+ "lint:fix": "eslint . --fix"
60
+ }
61
+ }
62
+ ```
63
+
64
+ ### Config VS Code auto fix
65
+
66
+ Create `.vscode/settings.json`
67
+
68
+ ```json
69
+ {
70
+ "prettier.enable": false,
71
+ "editor.formatOnSave": false,
72
+ "editor.codeActionsOnSave": {
73
+ "source.fixAll.eslint": true
74
+ }
75
+ }
76
+ ```
77
+ ### Customization rules
78
+ add you like rules to your `.eslintrc` file:
79
+ ```json
80
+ {
81
+ "extends": [
82
+ "@kirklin"
83
+ ],
84
+ "rules": {
85
+ "vue/component-tags-order": ["error", {
86
+ "order": ["template", "script", "style"]
87
+ }]
88
+ }
89
+ }
90
+ ```
91
+ ### TypeScript Aware Rules
92
+
93
+ Type aware rules are enabled when a `tsconfig.eslint.json` is found in the project root. Refer to [this file](https://github.com/kirklin/eslint-config/blob/master/packages/typescript/index.js#L17).
94
+
95
+ ## Badge
96
+
97
+ Use this in one of your projects? Include one of these badges in your readme to
98
+ let people know that your code is using the standard style.
99
+
100
+
101
+ [![kirklin-code-style-image](https://img.shields.io/badge/code__style-%40kirklin%2Feslint--config-brightgreen)](https://github.com/kirklin/eslint-config/)
102
+
103
+ ```markdown
104
+ [![kirklin-code-style-image](https://img.shields.io/badge/code__style-%40kirklin%2Feslint--config-brightgreen)](https://github.com/kirklin/eslint-config/)
105
+ ```
106
+
107
+ [code-style-image]: https://img.shields.io/badge/code__style-%40kirklin%2Feslint--config-brightgreen
108
+ [code-style-url]: https://github.com/kirklin/eslint-config/
109
+
110
+ ## Thanks
111
+ This project is based on [@antfu/eslint-config](https://github.com/antfu/eslint-config)
112
+
113
+ ## License
114
+
115
+ [MIT](./LICENSE) License &copy; 2019-PRESENT [Kirk Lin](https://github.com/kirklin)
package/README.zh-cn.md CHANGED
@@ -1,117 +1,117 @@
1
- # @kirklin/eslint-config
2
- [![CI][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript_code style][code-style-image]][code-style-url]
3
-
4
- [ci-image]: https://github.com/kirklin/eslint-config/actions/workflows/release.yml/badge.svg?branch=master
5
- [ci-url]: https://github.com/kirklin/eslint-config/actions/workflows/release.yml
6
- [npm-image]: https://img.shields.io/npm/v/@kirklin/eslint-config.svg
7
- [npm-url]: https://npmjs.org/package/@kirklin/eslint-config
8
- [downloads-image]: https://img.shields.io/npm/dm/@kirklin/eslint-config.svg
9
- [downloads-url]: https://npmjs.org/package/@kirklin/eslint-config
10
- [code-style-image]: https://img.shields.io/badge/code__style-%40kirklin-brightgreen.svg
11
- [code-style-url]: https://github.com/kirklin/eslint-config/
12
-
13
- <div align='left'>
14
- <a href="README.md">English</a> | <b>简体中文</b>
15
- <br>
16
- </div>
17
-
18
- ## 特性
19
-
20
- - "双引号",必须加分号;
21
- - 格式化的自动修复(旨在独立使用,不需要Prettier)。
22
- - TypeScript,Vue开箱即用
23
- - 对 JSON、YAML、Markdown也支持格式化
24
- - 导入自动排序,需要尾随逗号,更干净的提交差异
25
- - 合理的默认值,最佳实践,只有一行的配置
26
-
27
- ## 如何使用
28
-
29
- 可共享的配置被设计在`.eslintrc`文件的`extends`。
30
- 你可以了解更多关于
31
- [Shareable Configs](http://eslint.org/docs/developer-guide/shareable-configs) 在
32
- 官方ESLint网站上
33
-
34
- ### 运行以下命令开始使用:
35
-
36
- ### 安装
37
-
38
- ```bash
39
- pnpm add -D eslint @kirklin/eslint-config
40
- ```
41
-
42
- ### 在你的`.eslintrc`文件中加入这个。
43
-
44
- ```json
45
- {
46
- "extends": "@kirklin"
47
- }
48
- ```
49
-
50
- > 你通常不需要`.eslintignore`,因为它已经由预设提供了。
51
-
52
- ### 为package.json添加脚本配置
53
-
54
- 例如:
55
-
56
- ```json
57
- {
58
- "scripts": {
59
- "lint": "eslint .",
60
- "lint:fix": "eslint . --fix"
61
- }
62
- }
63
- ```
64
-
65
- ### 在Vscode中 配置自动修复
66
-
67
- 创建 `.vscode/settings.json`
68
-
69
- ```json
70
- {
71
- "prettier.enable": false,
72
- "editor.formatOnSave": false,
73
- "editor.codeActionsOnSave": {
74
- "source.fixAll.eslint": true
75
- }
76
- }
77
- ```
78
-
79
- ### 自定义规则
80
-
81
- 在你的`.eslintrc`文件中添加你喜欢的规则。
82
-
83
- ```json
84
- {
85
- "extends": [
86
- "@kirklin"
87
- ],
88
- "rules": {
89
- "vue/component-tags-order": ["error", {
90
- "order": ["template", "script", "style"]
91
- }]
92
- }
93
- }
94
- ```
95
- ### TypeScript Aware Rules
96
-
97
- 当在项目根目录中找到`tsconfig.eslint.json`时,将启用Type Aware Rules, [参阅此处](https://github.com/kirklin/eslint-config/blob/master/packages/typescript/index.js#L17).
98
-
99
- ## 徽章
100
- 在你的README中包括一个这样的徽章,以便让人们知道你的代码使用的是哪种ESLint样式。
101
-
102
- [![kirklin-code-style-image](https://img.shields.io/badge/code__style-%40kirklin%2Feslint--config-brightgreen)](https://github.com/kirklin/eslint-config/)
103
-
104
- ```markdown
105
- [![kirklin-code-style-image](https://img.shields.io/badge/code__style-%40kirklin%2Feslint--config-brightgreen)](https://github.com/kirklin/eslint-config/)
106
- ```
107
-
108
- [code-style-image]: https://img.shields.io/badge/code__style-%40kirklin%2Feslint--config-brightgreen
109
- [code-style-url]: https://github.com/kirklin/eslint-config/
110
-
111
- ## 致谢
112
- 本项目基于 [@antfu/eslint-config](https://github.com/antfu/eslint-config)
113
-
114
-
115
- ## 开源协议
116
-
117
- [MIT](./LICENSE) License &copy; 2019-PRESENT [Kirk Lin](https://github.com/kirklin)
1
+ # @kirklin/eslint-config
2
+ [![CI][ci-image]][ci-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript_code style][code-style-image]][code-style-url]
3
+
4
+ [ci-image]: https://github.com/kirklin/eslint-config/actions/workflows/release.yml/badge.svg?branch=master
5
+ [ci-url]: https://github.com/kirklin/eslint-config/actions/workflows/release.yml
6
+ [npm-image]: https://img.shields.io/npm/v/@kirklin/eslint-config.svg
7
+ [npm-url]: https://npmjs.org/package/@kirklin/eslint-config
8
+ [downloads-image]: https://img.shields.io/npm/dm/@kirklin/eslint-config.svg
9
+ [downloads-url]: https://npmjs.org/package/@kirklin/eslint-config
10
+ [code-style-image]: https://img.shields.io/badge/code__style-%40kirklin-brightgreen.svg
11
+ [code-style-url]: https://github.com/kirklin/eslint-config/
12
+
13
+ <div align='left'>
14
+ <a href="README.md">English</a> | <b>简体中文</b>
15
+ <br>
16
+ </div>
17
+
18
+ ## 特性
19
+
20
+ - "双引号",必须加分号;
21
+ - 格式化的自动修复(旨在独立使用,不需要Prettier)。
22
+ - TypeScript,Vue开箱即用
23
+ - 对 JSON、YAML、Markdown也支持格式化
24
+ - 导入自动排序,需要尾随逗号,更干净的提交差异
25
+ - 合理的默认值,最佳实践,只有一行的配置
26
+
27
+ ## 如何使用
28
+
29
+ 可共享的配置被设计在`.eslintrc`文件的`extends`。
30
+ 你可以了解更多关于
31
+ [Shareable Configs](http://eslint.org/docs/developer-guide/shareable-configs) 在
32
+ 官方ESLint网站上
33
+
34
+ ### 运行以下命令开始使用:
35
+
36
+ ### 安装
37
+
38
+ ```bash
39
+ pnpm add -D eslint @kirklin/eslint-config
40
+ ```
41
+
42
+ ### 在你的`.eslintrc`文件中加入这个。
43
+
44
+ ```json
45
+ {
46
+ "extends": "@kirklin"
47
+ }
48
+ ```
49
+
50
+ > 你通常不需要`.eslintignore`,因为它已经由预设提供了。
51
+
52
+ ### 为package.json添加脚本配置
53
+
54
+ 例如:
55
+
56
+ ```json
57
+ {
58
+ "scripts": {
59
+ "lint": "eslint .",
60
+ "lint:fix": "eslint . --fix"
61
+ }
62
+ }
63
+ ```
64
+
65
+ ### 在Vscode中 配置自动修复
66
+
67
+ 创建 `.vscode/settings.json`
68
+
69
+ ```json
70
+ {
71
+ "prettier.enable": false,
72
+ "editor.formatOnSave": false,
73
+ "editor.codeActionsOnSave": {
74
+ "source.fixAll.eslint": true
75
+ }
76
+ }
77
+ ```
78
+
79
+ ### 自定义规则
80
+
81
+ 在你的`.eslintrc`文件中添加你喜欢的规则。
82
+
83
+ ```json
84
+ {
85
+ "extends": [
86
+ "@kirklin"
87
+ ],
88
+ "rules": {
89
+ "vue/component-tags-order": ["error", {
90
+ "order": ["template", "script", "style"]
91
+ }]
92
+ }
93
+ }
94
+ ```
95
+ ### TypeScript Aware Rules
96
+
97
+ 当在项目根目录中找到`tsconfig.eslint.json`时,将启用Type Aware Rules, [参阅此处](https://github.com/kirklin/eslint-config/blob/master/packages/typescript/index.js#L17).
98
+
99
+ ## 徽章
100
+ 在你的README中包括一个这样的徽章,以便让人们知道你的代码使用的是哪种ESLint样式。
101
+
102
+ [![kirklin-code-style-image](https://img.shields.io/badge/code__style-%40kirklin%2Feslint--config-brightgreen)](https://github.com/kirklin/eslint-config/)
103
+
104
+ ```markdown
105
+ [![kirklin-code-style-image](https://img.shields.io/badge/code__style-%40kirklin%2Feslint--config-brightgreen)](https://github.com/kirklin/eslint-config/)
106
+ ```
107
+
108
+ [code-style-image]: https://img.shields.io/badge/code__style-%40kirklin%2Feslint--config-brightgreen
109
+ [code-style-url]: https://github.com/kirklin/eslint-config/
110
+
111
+ ## 致谢
112
+ 本项目基于 [@antfu/eslint-config](https://github.com/antfu/eslint-config)
113
+
114
+
115
+ ## 开源协议
116
+
117
+ [MIT](./LICENSE) License &copy; 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.2.4",
3
+ "version": "0.2.6",
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,9 +16,8 @@
16
16
  "eslint": ">=7.4.0"
17
17
  },
18
18
  "dependencies": {
19
- "@kirklin/eslint-config-vue": "0.2.4",
20
- "@typescript-eslint/eslint-plugin": "^5.48.2",
21
- "@typescript-eslint/parser": "^5.48.2",
19
+ "@typescript-eslint/eslint-plugin": "^5.51.0",
20
+ "@typescript-eslint/parser": "^5.51.0",
22
21
  "eslint-plugin-eslint-comments": "^3.2.0",
23
22
  "eslint-plugin-html": "^7.1.0",
24
23
  "eslint-plugin-import": "^2.27.5",
@@ -27,11 +26,12 @@
27
26
  "eslint-plugin-promise": "^6.1.1",
28
27
  "eslint-plugin-unicorn": "^45.0.2",
29
28
  "eslint-plugin-vue": "^9.9.0",
30
- "eslint-plugin-yml": "^1.4.0",
29
+ "eslint-plugin-yml": "^1.5.0",
31
30
  "jsonc-eslint-parser": "^2.1.0",
32
- "yaml-eslint-parser": "^1.1.0"
31
+ "yaml-eslint-parser": "^1.1.0",
32
+ "@kirklin/eslint-config-vue": "0.2.6"
33
33
  },
34
34
  "devDependencies": {
35
- "eslint": "^8.32.0"
35
+ "eslint": "^8.34.0"
36
36
  }
37
37
  }