eslint-config-beslogic 5.1.2 → 5.2.2
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/.dprint.jsonc +1 -1
- package/CHANGELOG.md +9 -0
- package/LICENSE +1 -1
- package/angular.mjs +1 -1
- package/eslint.config.mjs +1 -1
- package/extra-strict.mjs +7 -2
- package/index.mjs +1 -1
- package/javascript.mjs +1 -1
- package/jest.mjs +1 -1
- package/json-like.mjs +1 -1
- package/lib/utils.mjs +11 -0
- package/mui.mjs +1 -1
- package/node-js.mjs +1 -1
- package/package.json +1 -1
- package/react-native.mjs +1 -1
- package/react-redux.mjs +1 -1
- package/react.mjs +8 -2
- package/rxjs.mjs +1 -1
- package/storybook.mjs +1 -1
- package/stylistic.mjs +2 -3
- package/tsconfig.4.3.json +1 -1
- package/tsconfig.5.0.json +1 -1
- package/tsconfig.5.6.json +1 -1
- package/tsconfig.json +1 -1
- package/typescript.mjs +1 -1
package/.dprint.jsonc
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.2.2
|
|
4
|
+
|
|
5
|
+
- Don't sort alphabetically by default in `@stylistic/jsx-sort-props`
|
|
6
|
+
|
|
7
|
+
## 5.2.1
|
|
8
|
+
|
|
9
|
+
- Replaced `react/jsx-sort-props` with `@stylistic/jsx-sort-props`
|
|
10
|
+
- Configured `@stylistic/jsx-sort-props` to prefer reserved keywords (then) shorthands first, and prefer multilines last.
|
|
11
|
+
|
|
3
12
|
## 5.1.2
|
|
4
13
|
|
|
5
14
|
- Move `optionalDependencies` to `peerDependencies` marked with `peerDependenciesMeta.optional`
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License
|
|
2
2
|
|
|
3
|
-
Copyright
|
|
3
|
+
Copyright 2026 Beslogic Inc.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
|
package/angular.mjs
CHANGED
package/eslint.config.mjs
CHANGED
package/extra-strict.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2026 Beslogic Inc.
|
|
3
3
|
|
|
4
4
|
import { defineConfig } from "@eslint/config-helpers"
|
|
5
5
|
|
|
6
|
-
import { jestFilePatterns, resolveModuleLocation } from "./lib/utils.mjs"
|
|
6
|
+
import { jestFilePatterns, jsxSortPropsConfig, resolveModuleLocation } from "./lib/utils.mjs"
|
|
7
7
|
import { noFloatingPromisesKnownSafeCalls, noRestrictedSyntax as noRestrictedSyntaxTS, restrictTemplateExpressionsConfig } from "./typescript.mjs"
|
|
8
8
|
|
|
9
9
|
// These extra strict configs are not only for Angular. User may be using a different framework
|
|
@@ -53,6 +53,11 @@ export default defineConfig(
|
|
|
53
53
|
"**/*.tsx"
|
|
54
54
|
],
|
|
55
55
|
"rules": {
|
|
56
|
+
"@stylistic/jsx-sort-props": ["error", {
|
|
57
|
+
...jsxSortPropsConfig,
|
|
58
|
+
"noSortAlphabetically": false
|
|
59
|
+
}],
|
|
60
|
+
|
|
56
61
|
// This is caught when noImplicitThis is enabled, which we assume in this config
|
|
57
62
|
// https://typescript-eslint.io/rules/no-invalid-this/
|
|
58
63
|
"@typescript-eslint/no-invalid-this": "off",
|
package/index.mjs
CHANGED
package/javascript.mjs
CHANGED
package/jest.mjs
CHANGED
package/json-like.mjs
CHANGED
package/lib/utils.mjs
CHANGED
|
@@ -85,3 +85,14 @@ export const idLenghtConfig = {
|
|
|
85
85
|
"z"
|
|
86
86
|
]
|
|
87
87
|
}
|
|
88
|
+
|
|
89
|
+
export const jsxSortPropsConfig = {
|
|
90
|
+
// Keeping special props first, and not hiding props under big multiline
|
|
91
|
+
// both help a lot with readability and semantics
|
|
92
|
+
"reservedFirst": true,
|
|
93
|
+
"shorthandFirst": true,
|
|
94
|
+
"multiline": "last",
|
|
95
|
+
// Alphabetical sorting is nice for automated consistency,
|
|
96
|
+
// but is too pedantic for widespread adoption. Set in extra-strict preset.
|
|
97
|
+
"noSortAlphabetically": true
|
|
98
|
+
}
|
package/mui.mjs
CHANGED
package/node-js.mjs
CHANGED
package/package.json
CHANGED
package/react-native.mjs
CHANGED
package/react-redux.mjs
CHANGED
package/react.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2026 Beslogic Inc.
|
|
3
3
|
|
|
4
4
|
import { defineConfig } from "@eslint/config-helpers"
|
|
5
5
|
import jsxA11y from "eslint-plugin-jsx-a11y"
|
|
@@ -10,7 +10,7 @@ import testingLibrary from "eslint-plugin-testing-library"
|
|
|
10
10
|
import globals from "globals"
|
|
11
11
|
|
|
12
12
|
import beslogicJavascript, { preventAbbreviationsConfig as preventAbbreviationsConfigJS } from "./javascript.mjs"
|
|
13
|
-
import { jestFilePatterns } from "./lib/utils.mjs"
|
|
13
|
+
import { jestFilePatterns, jsxSortPropsConfig } from "./lib/utils.mjs"
|
|
14
14
|
import beslogicTypeScript from "./typescript.mjs"
|
|
15
15
|
|
|
16
16
|
const typeDeclarationOverride = beslogicTypeScript.find(
|
|
@@ -92,6 +92,12 @@ 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": ["error", jsxSortPropsConfig],
|
|
100
|
+
|
|
95
101
|
/*
|
|
96
102
|
* react overrides (https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules)
|
|
97
103
|
*/
|
package/rxjs.mjs
CHANGED
package/storybook.mjs
CHANGED
package/stylistic.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2026 Beslogic Inc.
|
|
3
3
|
|
|
4
4
|
import { defineConfig } from "@eslint/config-helpers"
|
|
5
5
|
import stylistic from "@stylistic/eslint-plugin"
|
|
@@ -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
|
)
|
package/tsconfig.4.3.json
CHANGED
package/tsconfig.5.0.json
CHANGED
package/tsconfig.5.6.json
CHANGED
package/tsconfig.json
CHANGED
package/typescript.mjs
CHANGED