eslint-config-beslogic 5.1.2 → 5.2.1
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/CHANGELOG.md +5 -0
- package/package.json +1 -1
- package/react.mjs +12 -0
- package/stylistic.mjs +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.2.1
|
|
4
|
+
|
|
5
|
+
- Replaced `react/jsx-sort-props` with `@stylistic/jsx-sort-props`
|
|
6
|
+
- Configured `@stylistic/jsx-sort-props` to prefer reserved keywords (then) shorthands first, and prefer multilines last.
|
|
7
|
+
|
|
3
8
|
## 5.1.2
|
|
4
9
|
|
|
5
10
|
- Move `optionalDependencies` to `peerDependencies` marked with `peerDependenciesMeta.optional`
|
package/package.json
CHANGED
package/react.mjs
CHANGED
|
@@ -92,6 +92,18 @@ export default defineConfig(
|
|
|
92
92
|
// Using only max-lines and not max-lines-per-function as most of the react code lives in functions.
|
|
93
93
|
"max-lines-per-function": "off",
|
|
94
94
|
|
|
95
|
+
/*
|
|
96
|
+
* Stylistic overrides https://eslint.style/rules
|
|
97
|
+
*/
|
|
98
|
+
"react/jsx-sort-props": "off",
|
|
99
|
+
"@stylistic/jsx-sort-props": [
|
|
100
|
+
"error",
|
|
101
|
+
// Keeping special props first, and not hiding props under big multiline
|
|
102
|
+
// both help a lot with readability and semantics
|
|
103
|
+
// Still keeping alphabetical sorting for automatic consistency
|
|
104
|
+
{ "reservedFirst": true, "shorthandFirst": true, "multiline": "last" }
|
|
105
|
+
],
|
|
106
|
+
|
|
95
107
|
/*
|
|
96
108
|
* react overrides (https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules)
|
|
97
109
|
*/
|
package/stylistic.mjs
CHANGED
|
@@ -215,8 +215,7 @@ export default defineConfig(
|
|
|
215
215
|
{ "allow": "single-line" }
|
|
216
216
|
],
|
|
217
217
|
"@stylistic/jsx-pascal-case": "error",
|
|
218
|
-
"@stylistic/jsx-self-closing-comp": "error"
|
|
219
|
-
"@stylistic/jsx-sort-props": "error"
|
|
218
|
+
"@stylistic/jsx-self-closing-comp": "error"
|
|
220
219
|
}
|
|
221
220
|
}
|
|
222
221
|
)
|