@asd14/eslint-config 6.12.0 → 6.15.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/README.md +49 -21
- package/package.json +26 -31
package/README.md
CHANGED
|
@@ -2,13 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://circleci.com/gh/asd-xiv/eslint-config)
|
|
4
4
|
[](https://badge.fury.io/js/%40asd14%2Feslint-config)
|
|
5
|
-
[](https://david-dm.org/asd14-xyz/eslint-config?type=peer)
|
|
6
5
|
|
|
7
6
|
# JavaScript ESLint rules
|
|
8
7
|
|
|
9
|
-
JavaScript ESLint bundle with best practices and common use rules for writing
|
|
8
|
+
JavaScript ESLint bundle with best practices and common use rules for writing
|
|
9
|
+
more consistent code.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
[`"semi": [ "error", "never" ]`](http://eslint.org/docs/rules/semi) :godmode:
|
|
12
|
+
...
|
|
13
|
+
[the horror](http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding)
|
|
14
|
+
:goberserk:
|
|
15
|
+
|
|
16
|
+
Other similar bundles: [XO](https://www.npmjs.com/package/xo),
|
|
17
|
+
[eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb),
|
|
18
|
+
[eslint-config-google](https://github.com/google/eslint-config-google),
|
|
19
|
+
[more](https://www.npmjs.com/search?q=+eslint-config-)
|
|
12
20
|
|
|
13
21
|
---
|
|
14
22
|
|
|
@@ -33,21 +41,22 @@ npm install @asd14/eslint-config --save-dev
|
|
|
33
41
|
|
|
34
42
|
## Targets
|
|
35
43
|
|
|
36
|
-
Run `npm info "@asd14/eslint-config@latest" peerDependencies` to get the base
|
|
44
|
+
Run `npm info "@asd14/eslint-config@latest" peerDependencies` to get the base
|
|
45
|
+
packages needed.
|
|
37
46
|
|
|
38
47
|
It should be something like:
|
|
39
48
|
|
|
40
49
|
```javascript
|
|
41
|
-
"eslint": "^8.
|
|
50
|
+
"eslint": "^8.8.0",
|
|
42
51
|
"eslint-config-prettier": "^8.3.0",
|
|
43
|
-
"eslint-plugin-import": "^2.25.
|
|
44
|
-
"eslint-plugin-jsdoc": "^37.
|
|
52
|
+
"eslint-plugin-import": "^2.25.4",
|
|
53
|
+
"eslint-plugin-jsdoc": "^37.7.0",
|
|
45
54
|
"eslint-plugin-json": "^3.1.0",
|
|
46
55
|
"eslint-plugin-no-inferred-method-name": "^2.0.0",
|
|
47
56
|
"eslint-plugin-prettier": "^4.0.0",
|
|
48
57
|
"eslint-plugin-promise": "^6.0.0",
|
|
49
|
-
"eslint-plugin-unicorn": "^40.
|
|
50
|
-
"prettier": "^2.5.
|
|
58
|
+
"eslint-plugin-unicorn": "^40.1.0",
|
|
59
|
+
"prettier": "^2.5.1"
|
|
51
60
|
```
|
|
52
61
|
|
|
53
62
|
Add these packages to your `devDependencies` in `package.json`.
|
|
@@ -105,20 +114,38 @@ Link ESLint to `react` target.
|
|
|
105
114
|
|
|
106
115
|
## Inside
|
|
107
116
|
|
|
108
|
-
- [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) -
|
|
109
|
-
|
|
110
|
-
- [eslint-plugin-
|
|
111
|
-
|
|
112
|
-
- [eslint-plugin-
|
|
113
|
-
|
|
114
|
-
- [eslint-plugin-
|
|
115
|
-
|
|
116
|
-
- [
|
|
117
|
-
|
|
117
|
+
- [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) - JSDoc
|
|
118
|
+
specific linting rules
|
|
119
|
+
- [eslint-plugin-import](https://www.npmjs.org/package/eslint-plugin-import) -
|
|
120
|
+
Support for ES2015+ (ES6+) import/export syntax
|
|
121
|
+
- [eslint-plugin-promise](https://www.npmjs.org/package/eslint-plugin-promise) -
|
|
122
|
+
Enforce best practices for JavaScript promises
|
|
123
|
+
- [eslint-plugin-unicorn](https://www.npmjs.org/package/eslint-plugin-unicorn) -
|
|
124
|
+
Various awesome ESLint rules
|
|
125
|
+
- [eslint-plugin-html](https://www.npmjs.org/package/eslint-plugin-html) -
|
|
126
|
+
Allows linting and fixing inline scripts contained in HTML files
|
|
127
|
+
- [eslint-plugin-react](https://www.npmjs.org/package/eslint-plugin-react) -
|
|
128
|
+
React specific linting rules
|
|
129
|
+
- [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks) -
|
|
130
|
+
Linting rules rules of React Hooks.
|
|
131
|
+
- [eslint-plugin-no-inferred-method-name](https://www.npmjs.org/package/eslint-plugin-no-inferred-method-name) -
|
|
132
|
+
In ES6, compact methods and unnamed function expression assignments within
|
|
133
|
+
object literals do not create a lexical identification (name) binding that
|
|
134
|
+
corresponds to the function name identifier for recursion or event binding.
|
|
135
|
+
The compact method syntax will not be an appropriate option for these types of
|
|
136
|
+
solutions, and a named function expression should be used instead. This custom
|
|
137
|
+
ESLint rule will identify instances where a function name is being called and
|
|
138
|
+
a lexical identifier is unavailable within a compact object literal.
|
|
139
|
+
- [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser) -
|
|
140
|
+
ESLint parser which leverages TypeScript ESTree to allow for ESLint to lint
|
|
141
|
+
TypeScript source code.
|
|
142
|
+
- [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin) -
|
|
143
|
+
ESLint plugin which provides lint rules for TypeScript codebases.
|
|
118
144
|
|
|
119
145
|
## Example config
|
|
120
146
|
|
|
121
|
-
Using [`babel-eslint`](https://github.com/babel/babel-eslint) and
|
|
147
|
+
Using [`babel-eslint`](https://github.com/babel/babel-eslint) and
|
|
148
|
+
[`eslint-import-resolver-webpack`](https://www.npmjs.com/package/eslint-import-resolver-webpack)
|
|
122
149
|
|
|
123
150
|
`.eslintrc`
|
|
124
151
|
|
|
@@ -188,4 +215,5 @@ trim_trailing_whitespace = false
|
|
|
188
215
|
|
|
189
216
|
## Changelog
|
|
190
217
|
|
|
191
|
-
See the [releases section](https://github.com/asd14-xyz/eslint-config/releases)
|
|
218
|
+
See the [releases section](https://github.com/asd14-xyz/eslint-config/releases)
|
|
219
|
+
for details.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asd14/eslint-config",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.15.0",
|
|
4
4
|
"description": "JavaScript ESLint rules",
|
|
5
5
|
"homepage": "https://github.com/asd-xiv/eslint-config",
|
|
6
6
|
"main": "targets/node.js",
|
|
@@ -35,55 +35,50 @@
|
|
|
35
35
|
"----UTIL": "",
|
|
36
36
|
"prepare": "git config --local core.hooksPath .githook",
|
|
37
37
|
"setup": "npm ci --also=dev",
|
|
38
|
-
"update": "
|
|
38
|
+
"update": "ncu --interactive",
|
|
39
39
|
"postupdate": "npm audit fix",
|
|
40
|
-
"
|
|
40
|
+
"format": "prettier --write --prose-wrap=always . && eslint --fix .",
|
|
41
|
+
"----CHECK": "",
|
|
41
42
|
"lint.js": "eslint --quiet 'rules/*' 'targets/*'",
|
|
42
|
-
"lint.js-staged": "eslint --quiet",
|
|
43
43
|
"lint.md": "markdownlint '*.md' --ignore CHANGELOG.md",
|
|
44
|
-
"lint.md-staged": "markdownlint --ignore CHANGELOG.md",
|
|
45
44
|
"lint": "npm run lint.js && npm run lint.md",
|
|
46
45
|
"----PUBLISH": "",
|
|
47
46
|
"publish": "semantic-release"
|
|
48
47
|
},
|
|
48
|
+
"lint-staged": {
|
|
49
|
+
"*.{js,json}": "eslint --quiet",
|
|
50
|
+
"*.md": "markdownlint --ignore CHANGELOG.md",
|
|
51
|
+
".circleci/config.yml": "circleci config validate"
|
|
52
|
+
},
|
|
49
53
|
"devDependencies": {
|
|
50
|
-
"@commitlint/cli": "^16.
|
|
51
|
-
"@commitlint/config-conventional": "^16.
|
|
54
|
+
"@commitlint/cli": "^16.2.3",
|
|
55
|
+
"@commitlint/config-conventional": "^16.2.1",
|
|
52
56
|
"@semantic-release/changelog": "^6.0.1",
|
|
53
57
|
"@semantic-release/git": "^10.0.1",
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
55
|
-
"@typescript-eslint/parser": "^5.
|
|
56
|
-
"eslint": "^8.6.0",
|
|
57
|
-
"eslint-config-prettier": "^8.3.0",
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^5.19.0",
|
|
59
|
+
"@typescript-eslint/parser": "^5.19.0",
|
|
58
60
|
"eslint-plugin-html": "^6.2.0",
|
|
59
|
-
"eslint-plugin-
|
|
60
|
-
"eslint-plugin-
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"eslint-plugin-react": "^7.28.0",
|
|
66
|
-
"eslint-plugin-react-hooks": "^4.3.0",
|
|
67
|
-
"eslint-plugin-unicorn": "^40.0.0",
|
|
68
|
-
"lint-staged": "^12.1.4",
|
|
69
|
-
"markdownlint-cli": "^0.30.0",
|
|
70
|
-
"npm-check": "^5.9.2",
|
|
71
|
-
"prettier": "^2.5.1",
|
|
72
|
-
"semantic-release": "^18.0.1"
|
|
61
|
+
"eslint-plugin-react": "^7.29.4",
|
|
62
|
+
"eslint-plugin-react-hooks": "^4.4.0",
|
|
63
|
+
"lint-staged": "^12.3.8",
|
|
64
|
+
"npm-check-updates": "^12.5.9",
|
|
65
|
+
"markdownlint-cli": "^0.31.1",
|
|
66
|
+
"semantic-release": "^19.0.2"
|
|
73
67
|
},
|
|
74
68
|
"peerDependencies": {
|
|
75
|
-
"eslint": "^8.
|
|
69
|
+
"eslint": "^8.8.0",
|
|
76
70
|
"eslint-config-prettier": "^8.3.0",
|
|
77
|
-
"eslint-plugin-import": "^2.25.
|
|
78
|
-
"eslint-plugin-jsdoc": "^37.
|
|
71
|
+
"eslint-plugin-import": "^2.25.4",
|
|
72
|
+
"eslint-plugin-jsdoc": "^37.7.0",
|
|
79
73
|
"eslint-plugin-json": "^3.1.0",
|
|
80
74
|
"eslint-plugin-no-inferred-method-name": "^2.0.0",
|
|
81
75
|
"eslint-plugin-prettier": "^4.0.0",
|
|
82
76
|
"eslint-plugin-promise": "^6.0.0",
|
|
83
|
-
"eslint-plugin-unicorn": "^40.
|
|
84
|
-
"prettier": "^2.5.
|
|
77
|
+
"eslint-plugin-unicorn": "^40.1.0",
|
|
78
|
+
"prettier": "^2.5.1"
|
|
85
79
|
},
|
|
86
80
|
"engines": {
|
|
87
|
-
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
|
81
|
+
"node": "^12.20.0 || ^14.13.1 || >=16.0.0",
|
|
82
|
+
"npm": ">=7"
|
|
88
83
|
}
|
|
89
84
|
}
|