eslint-config-beslogic 5.2.1 → 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 +4 -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 +3 -9
- package/rxjs.mjs +1 -1
- package/storybook.mjs +1 -1
- package/stylistic.mjs +1 -1
- 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
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(
|
|
@@ -96,13 +96,7 @@ export default defineConfig(
|
|
|
96
96
|
* Stylistic overrides https://eslint.style/rules
|
|
97
97
|
*/
|
|
98
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
|
-
],
|
|
99
|
+
"@stylistic/jsx-sort-props": ["error", jsxSortPropsConfig],
|
|
106
100
|
|
|
107
101
|
/*
|
|
108
102
|
* react overrides (https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules)
|
package/rxjs.mjs
CHANGED
package/storybook.mjs
CHANGED
package/stylistic.mjs
CHANGED
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