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 CHANGED
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  {
5
5
  // https://dprint.dev/config/#extending-a-different-configuration-file
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 2025 Beslogic Inc.
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
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  import { ASTUtils } from "@angular-eslint/utils"
5
5
  import { defineConfig } from "@eslint/config-helpers"
package/eslint.config.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  import { defineConfig } from "@eslint/config-helpers"
5
5
  import eslintPlugin from "eslint-plugin-eslint-plugin"
package/extra-strict.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
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
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  import beslogicJavascript from "./javascript.mjs"
5
5
  import beslogicTypeScript from "./typescript.mjs"
package/javascript.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  import { fixupPluginRules } from "@eslint/compat"
5
5
  import { defineConfig } from "@eslint/config-helpers"
package/jest.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  import { defineConfig } from "@eslint/config-helpers"
5
5
  import jest from "eslint-plugin-jest"
package/json-like.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  import { defineConfig } from "@eslint/config-helpers"
5
5
 
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
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  import { defineConfig } from "@eslint/config-helpers"
5
5
  import mui from "eslint-plugin-mui"
package/node-js.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  import { defineConfig } from "@eslint/config-helpers"
5
5
  import { createNodeResolver } from "eslint-plugin-import-x"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-beslogic",
3
- "version": "5.1.2",
3
+ "version": "5.2.2",
4
4
  "description": "ESLint rules, plugins and configs used at Beslogic",
5
5
  "main": "index.js",
6
6
  "type": "module",
package/react-native.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  import { defineConfig } from "@eslint/config-helpers"
5
5
 
package/react-redux.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  import { defineConfig } from "@eslint/config-helpers"
5
5
  import reactRedux from "eslint-plugin-react-redux"
package/react.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
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
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  import { defineConfig } from "@eslint/config-helpers"
5
5
  import rxjsX from "eslint-plugin-rxjs-x"
package/storybook.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  import { defineConfig, globalIgnores } from "@eslint/config-helpers"
5
5
  import storybook from "eslint-plugin-storybook"
package/stylistic.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
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
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  {
5
5
  "compilerOptions": {
package/tsconfig.5.0.json CHANGED
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  {
5
5
  "extends": "./tsconfig.4.3.json",
package/tsconfig.5.6.json CHANGED
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  {
5
5
  "extends": "./tsconfig.5.0.json",
package/tsconfig.json CHANGED
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  {
5
5
  "extends": "./tsconfig.5.6.json",
package/typescript.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // Copyright 2025 Beslogic Inc.
2
+ // Copyright 2026 Beslogic Inc.
3
3
 
4
4
  import { defineConfig } from "@eslint/config-helpers"
5
5
  import { createTypeScriptImportResolver } from "eslint-import-resolver-typescript"