@zairakai/js-dev-tools 1.4.2 → 1.4.3

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.
@@ -136,7 +136,17 @@ export default [
136
136
  '@typescript-eslint/no-explicit-any': 'warn',
137
137
  '@typescript-eslint/explicit-function-return-type': 'off',
138
138
  '@typescript-eslint/explicit-module-boundary-types': 'off',
139
- '@typescript-eslint/prefer-nullish-coalescing': 'error',
139
+ '@typescript-eslint/prefer-nullish-coalescing': [
140
+ 'error',
141
+ {
142
+ // Boolean OR (e.g. combining two route-guard flags) is not the same
143
+ // operation as null-coalescing: `??` only falls through on
144
+ // null/undefined, so `false ?? true` stays `false` where
145
+ // `false || true` correctly yields `true`. Forcing `??` here would
146
+ // silently break any logic relying on an explicit `false`.
147
+ ignorePrimitives: { boolean: true },
148
+ },
149
+ ],
140
150
  '@typescript-eslint/prefer-optional-chain': 'error',
141
151
  '@typescript-eslint/no-non-null-assertion': 'warn',
142
152
  },
@@ -171,7 +181,13 @@ export default [
171
181
  '@typescript-eslint/no-explicit-any': 'warn',
172
182
  '@typescript-eslint/explicit-function-return-type': 'off',
173
183
  '@typescript-eslint/explicit-module-boundary-types': 'off',
174
- '@typescript-eslint/prefer-nullish-coalescing': 'error',
184
+ '@typescript-eslint/prefer-nullish-coalescing': [
185
+ 'error',
186
+ {
187
+ // See the .ts block above for why boolean operands are exempted.
188
+ ignorePrimitives: { boolean: true },
189
+ },
190
+ ],
175
191
  '@typescript-eslint/prefer-optional-chain': 'error',
176
192
  '@typescript-eslint/no-non-null-assertion': 'warn',
177
193
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zairakai/js-dev-tools",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "The unified and centralized development toolkit for JavaScript/TypeScript projects - ESLint, Prettier, Stylelint, Knip, Vitest, Git Hooks, and GitLab CI pipeline templates",
5
5
  "keywords": [
6
6
  "dev-tools",