eslint-plugin-crisp 1.2.10 → 1.2.12
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 +2 -1
- package/package.json +1 -1
- package/recommended-ts.js +2 -1
- package/recommended-vue.js +2 -1
- package/recommended.js +1 -0
- package/rules/enforce-optional.js +2 -1
package/README.md
CHANGED
|
@@ -60,8 +60,9 @@ Each item has emojis denoting:
|
|
|
60
60
|
|
|
61
61
|
| Name | Description | 🟠 | 🟢 | 🟣 |
|
|
62
62
|
| :- | :- | :- | :- | :- |
|
|
63
|
-
| [
|
|
63
|
+
| [array-callback-return](https://eslint.org/docs/latest/rules/array-callback-return) | Enforces `return` statements in callbacks of arrow function | 🟠 | 🟢 | 🟣 |
|
|
64
64
|
| [arrow-body-style](https://eslint.org/docs/latest/rules/arrow-body-style) | Requires braces around arrow function bodies | | 🟢 | 🟣 |
|
|
65
|
+
| [arrow-parens](https://eslint.org/docs/latest/rules/arrow-parens) | Requires parentheses around arrow function arguments | 🟠 | 🟢 | 🟣 |
|
|
65
66
|
| [brace-style](https://eslint.org/docs/latest/rules/brace-style) | Enforces one true brace style for blocks | 🟠 | 🟢 | 🟣 |
|
|
66
67
|
| [comma-dangle](https://eslint.org/docs/latest/rules/comma-dangle) | Disallows trailing commas | 🟠 | 🟢 | 🟣 |
|
|
67
68
|
| [comma-spacing](https://eslint.org/docs/latest/rules/comma-spacing) | Enforces consistent spacing before and after commas | | 🟢 | 🟣 |
|
package/package.json
CHANGED
package/recommended-ts.js
CHANGED
|
@@ -31,8 +31,9 @@ export default function configRecommendedTS(pluginCrisp) {
|
|
|
31
31
|
"@typescript-eslint/no-unused-vars": "warn",
|
|
32
32
|
|
|
33
33
|
// General JS rules
|
|
34
|
-
"
|
|
34
|
+
"array-callback-return": ["error", { checkForEach: true }],
|
|
35
35
|
"arrow-body-style": ["error", "always"],
|
|
36
|
+
"arrow-parens": ["error", "always"],
|
|
36
37
|
"brace-style": [
|
|
37
38
|
"error",
|
|
38
39
|
"1tbs",
|
package/recommended-vue.js
CHANGED
|
@@ -48,8 +48,9 @@ export default function configRecommendedVue(pluginCrisp) {
|
|
|
48
48
|
|
|
49
49
|
rules: {
|
|
50
50
|
// General JS rules
|
|
51
|
-
"
|
|
51
|
+
"array-callback-return": ["error", { checkForEach: true }],
|
|
52
52
|
"arrow-body-style": ["error", "always"],
|
|
53
|
+
"arrow-parens": ["error", "always"],
|
|
53
54
|
"brace-style": [
|
|
54
55
|
"error",
|
|
55
56
|
"1tbs",
|
package/recommended.js
CHANGED
|
@@ -44,7 +44,8 @@ export default {
|
|
|
44
44
|
|
|
45
45
|
if (
|
|
46
46
|
index === 1 &&
|
|
47
|
-
/Object\.(keys|values|entries)\(/.test(match[1])
|
|
47
|
+
(/Object\.(keys|values|entries)\(/.test(match[1]) ||
|
|
48
|
+
/Array\.(from)\(/.test(match[1]))
|
|
48
49
|
) {
|
|
49
50
|
// Ignore `Object.keys(foo || {})` (and others) as it cannot be \
|
|
50
51
|
// safely transformed to optional chaining
|