@will-stone/eslint-config 6.1.0 → 6.2.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/package.json +3 -3
- package/rules/unicorn.js +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@will-stone/eslint-config",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "My ESLint config",
|
|
6
6
|
"repository": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@typescript-eslint/eslint-plugin": "^5.4.0",
|
|
24
24
|
"@typescript-eslint/parser": "^5.4.0",
|
|
25
|
-
"eslint": "^8.
|
|
25
|
+
"eslint": "^8.3.0",
|
|
26
26
|
"eslint-plugin-import": "^2.25.3",
|
|
27
27
|
"eslint-plugin-jest": "^25.2.4",
|
|
28
28
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"eslint-plugin-react-hooks": "^4.3.0",
|
|
33
33
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
34
34
|
"eslint-plugin-switch-case": "^1.1.2",
|
|
35
|
-
"eslint-plugin-unicorn": "^
|
|
35
|
+
"eslint-plugin-unicorn": "^39.0.0",
|
|
36
36
|
"typescript": "4.x"
|
|
37
37
|
},
|
|
38
38
|
"peerDependenciesMeta": {
|
package/rules/unicorn.js
CHANGED
|
@@ -67,6 +67,9 @@ module.exports = {
|
|
|
67
67
|
// for..of is much easier to read
|
|
68
68
|
'unicorn/no-array-reduce': 'error',
|
|
69
69
|
|
|
70
|
+
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-await-expression-member.md
|
|
71
|
+
'unicorn/no-await-expression-member': 'warn',
|
|
72
|
+
|
|
70
73
|
// Do not use leading/trailing space between console.log parameters
|
|
71
74
|
'unicorn/no-console-spaces': 'warn',
|
|
72
75
|
|
|
@@ -177,6 +180,10 @@ module.exports = {
|
|
|
177
180
|
// Prefer .at() method for index access and String#charAt()
|
|
178
181
|
'unicorn/prefer-at': 'warn',
|
|
179
182
|
|
|
183
|
+
// Prefer String#codePointAt(…) over String#charCodeAt(…)
|
|
184
|
+
// and String.fromCodePoint(…) over String.fromCharCode(…)
|
|
185
|
+
'unicorn/prefer-code-point': 'error',
|
|
186
|
+
|
|
180
187
|
// Prefer Date.now() to get the number of milliseconds since the Unix Epoch
|
|
181
188
|
'unicorn/prefer-date-now': 'warn',
|
|
182
189
|
|