eslint-plugin-code-style 1.17.2 → 2.0.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 DELETED
@@ -1,1978 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project are documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ---
9
-
10
- ## [1.17.2] - 2026-02-09
11
-
12
- **Fix: CamelCase Naming Auto-Fix & Prefix Enforcement**
13
-
14
- **Version Range:** v1.17.1 → v1.17.2
15
-
16
- ### Fixed
17
-
18
- - **`folder-based-naming-convention`** - Fix camelCase naming enforcement for constants, data, reducers, services, and strings folders
19
- - Auto-fix missing suffix: `common` → `commonConstants` on save (all camelCase folders)
20
- - Near-match prefix enforcement: `routeConstants` → `routesConstants` when file is `routes.ts`
21
- - Multi-export files with unrelated prefixes (e.g., `buttonTypeData` in `data/app.ts`) are not flagged
22
-
23
- **Full Changelog:** [v1.17.1...v1.17.2](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.17.1...v1.17.2)
24
-
25
- ---
26
-
27
- ## [1.17.1] - 2026-02-09
28
-
29
- **Fix: Index File Behavior in Wrapped Folders**
30
-
31
- **Version Range:** v1.17.0 → v1.17.1
32
-
33
- ### Fixed
34
-
35
- - **`index-exports-only`** - Enforce dual index file behavior for wrapped folder structure
36
- - Root module index (`views/index.ts`) → barrel only (re-exports)
37
- - Subfolder index (`views/assessment/index.tsx`) → must contain component code, not just re-exports
38
- - Only one barrel per module — subfolder index files that simulate a barrel are flagged
39
- - **`no-redundant-folder-suffix`** - Detect file name matching parent folder name (e.g., `assessment/assessment.tsx` → use `assessment/index.tsx`)
40
-
41
- **Full Changelog:** [v1.17.0...v1.17.1](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.17.0...v1.17.1)
42
-
43
- ---
44
-
45
- ## [1.17.0] - 2026-02-09
46
-
47
- **New Rule + Enhancements to Naming & Import Rules**
48
-
49
- **Version Range:** v1.16.0 → v1.17.0
50
-
51
- ### Added
52
-
53
- **New Rules (1)**
54
- - `inline-export-declaration` - Enforce inline export declarations (`export const x = ...`) instead of grouped export statements (`export { x }`) in non-index files 🔧
55
- - Auto-fixable: adds `export` to each declaration and removes the grouped export statement
56
- - Skips index files (barrel re-exports) and aliased exports (`export { a as b }`)
57
-
58
- ### Enhanced
59
-
60
- - **`folder-based-naming-convention`** - Extended camelCase suffix enforcement for data/constants/strings/services/reducers folders
61
- - Exports in `data/` must end with `Data` (e.g., `buttonTypeData`)
62
- - Exports in `constants/` must end with `Constants` (e.g., `localeConstants`)
63
- - Exports in `strings/` must end with `Strings` (e.g., `appStrings`)
64
- - Exports in `services/` must end with `Service`, `reducers/` with `Reducer`
65
- - **`absolute-imports-only`** - Files within the same module folder must use relative imports instead of absolute to avoid circular dependencies 🔧
66
- - Detects files at any depth inside module folders (e.g., `data/auth/login/guest.tsx`)
67
- - Allows both `./` and `../` relative imports within the same module folder
68
- - Auto-fixes absolute imports to own module folder (e.g., `@/data/auth/login/guest` → `../../login/guest`)
69
- - Now marked as auto-fixable (`fixable: "code"`)
70
- - **`folder-structure-consistency`** - Added loose module file detection: standalone files matching module folder names (e.g., `data.js`, `strings.js`) are flagged — must use folder structure instead
71
-
72
- ### Stats
73
-
74
- - Total Rules: 79 (was 78)
75
- - Auto-fixable: 70 rules (was 69) 🔧
76
- - Configurable: 19 rules (was 18)
77
- - Report-only: 9 rules (was 10)
78
-
79
- **Full Changelog:** [v1.16.0...v1.17.0](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.16.0...v1.17.0)
80
-
81
- ---
82
-
83
- ## [1.16.0] - 2026-02-09
84
-
85
- **New Rule + Enhancements + Rule Renames**
86
-
87
- **Version Range:** v1.15.0 → v1.16.0
88
-
89
- ### Added
90
-
91
- **New Rules (1)**
92
- - `folder-structure-consistency` - Enforce consistent folder structure (flat vs wrapped) in module folders
93
- - Applies to all module folders (same list as `module-index-exports`)
94
- - Detects mixed structures (some flat files, some in subfolders)
95
- - Flags unnecessary wrapper folders when each has only one file
96
- - Configurable `moduleFolders` and `extraModuleFolders` options
97
-
98
- ### Enhanced
99
-
100
- - **`folder-based-naming-convention`** (renamed from `folder-component-suffix`)
101
- - Support nested files with chained folder names (e.g., `layouts/auth/login.tsx` → `LoginAuthLayout`)
102
- - Match files at any depth within module folders
103
- - Expanded to cover: views, layouts, pages, providers, reducers, services, contexts, themes (with suffix), atoms and components (chaining only, no suffix)
104
- - Added `VariableDeclarator` detection for non-JSX folders (contexts, themes)
105
- - **`no-redundant-folder-suffix`** - Also check folder names for redundant suffixes (e.g., `views/access-control-view/` is now flagged)
106
-
107
- ### Renamed
108
-
109
- - `folder-component-suffix` → `folder-based-naming-convention` (now handles more than just components)
110
- - `svg-component-icon-naming` → `svg-icon-naming-convention` (consistent with other naming convention rules)
111
-
112
- ### Stats
113
-
114
- - Total Rules: 78 (was 77)
115
- - Auto-fixable: 67 rules
116
- - Configurable: 18 rules (was 17)
117
- - Report-only: 11 rules (was 10)
118
-
119
- **Full Changelog:** [v1.15.0...v1.16.0](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.15.0...v1.16.0)
120
-
121
- ---
122
-
123
- ## [1.15.0] - 2026-02-06
124
-
125
- **New Rule: no-redundant-folder-suffix**
126
-
127
- **Version Range:** v1.14.1 → v1.15.0
128
-
129
- ### Added
130
-
131
- **New Rules (1)**
132
- - `no-redundant-folder-suffix` - Disallow file names that redundantly include the parent or ancestor folder name as a suffix
133
- - Flags files like `layouts/main-layout.tsx` (redundant "-layout" since already in `layouts/`)
134
- - Checks all ancestor folders from `src/` onwards
135
- - Singularizes folder names automatically (layouts→layout, categories→category, classes→class)
136
- - Skips index files
137
-
138
- ### Enhanced
139
-
140
- - **`folder-component-suffix`** - Add `layouts` folder support: components in `layouts/` must end with "Layout" suffix (with auto-fix) (v1.14.4)
141
- - **`type-annotation-spacing`** - Add auto-fix to collapse function types with ≤2 params to one line; add spacing rules for async keyword and function types (v1.14.2–v1.14.3)
142
- - **`interface-format`** - Fix circular fix conflict by skipping collapse when property has multi-line function type (v1.14.3)
143
- - **`function-naming-convention`** - Detect functions destructured from hooks without proper naming, with auto-fix (v1.14.1)
144
-
145
- ### Stats
146
-
147
- - Total Rules: 77 (was 76)
148
- - Auto-fixable: 67 rules 🔧
149
- - Configurable: 17 rules ⚙️
150
- - Report-only: 10 rules (was 9)
151
-
152
- **Full Changelog:** [v1.14.1...v1.15.0](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.14.1...v1.15.0)
153
-
154
- ---
155
-
156
- ## [1.14.4] - 2026-02-06
157
-
158
- ### Enhanced
159
-
160
- - **`folder-component-suffix`** - Add `layouts` folder support: components in `layouts/` must end with "Layout" suffix (with auto-fix)
161
-
162
- ---
163
-
164
- ## [1.14.3] - 2026-02-05
165
-
166
- ### Enhanced
167
-
168
- - **`type-annotation-spacing`** - Add auto-fix to collapse function types with 2 or fewer params to one line
169
- - **`interface-format`** - Fix circular fix conflict by skipping collapse when property has multi-line function type
170
-
171
- ---
172
-
173
- ## [1.14.2] - 2026-02-05
174
-
175
- ### Enhanced
176
-
177
- - **`type-annotation-spacing`** - Add spacing rules for async keyword and function types:
178
- - Enforce space after `async` keyword: `async()` → `async ()`
179
- - Enforce space after `=>` in function types: `() =>void` → `() => void`
180
- - Format function types with 3+ params on multiple lines
181
- - **`interface-format`** - Skip collapsing single-property interfaces when property has function type with 3+ params
182
-
183
- ---
184
-
185
- ## [1.14.1] - 2026-02-05
186
-
187
- ### Enhanced
188
-
189
- - **`function-naming-convention`** - Detect functions destructured from hooks without proper naming
190
- - Flags: `const { logout } = useAuth()` (should be `logoutHandler`)
191
- - Auto-fixes to: `const { logout: logoutHandler } = useAuth()`
192
- - Renames all usages of the local variable
193
- - Only flags clear action verbs (login, logout, toggle, increment, etc.)
194
-
195
- ---
196
-
197
- ## [1.14.0] - 2026-02-05
198
-
199
- **New Rule: useState Naming Convention**
200
-
201
- **Version Range:** v1.13.0 → v1.14.0
202
-
203
- ### Added
204
-
205
- **New Rules (1)**
206
- - `use-state-naming-convention` - Enforce boolean useState variables to start with valid prefixes 🔧
207
- - Boolean state must start with: `is`, `has`, `with`, `without` (configurable)
208
- - Auto-fixes both state variable and setter function names, plus all usages
209
- - Detects boolean literals (`useState(false)`) and type annotations (`useState<boolean>()`)
210
- - Options: `booleanPrefixes`, `extendBooleanPrefixes`, `allowPastVerbBoolean`, `allowContinuousVerbBoolean`
211
-
212
- ### Enhanced
213
-
214
- - **`folder-component-suffix`** - Add auto-fix to rename component and all references in the file
215
- - **`function-naming-convention`** - Detect useCallback-wrapped functions in custom hooks
216
- - **`prop-naming-convention`** - Auto-fix now renames both type annotation AND destructured parameter with all usages
217
-
218
- ### Stats
219
-
220
- - Total Rules: 76 (was 75)
221
- - Auto-fixable: 67 rules 🔧
222
- - Configurable: 17 rules ⚙️
223
- - Report-only: 9 rules
224
-
225
- **Full Changelog:** [v1.13.0...v1.14.0](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.13.0...v1.14.0)
226
-
227
- ---
228
-
229
- ## [1.13.0] - 2026-02-05
230
-
231
- **New Rule: Prop Naming Convention & Auto-Fix Enhancements**
232
-
233
- **Version Range:** v1.12.1 → v1.13.0
234
-
235
- ### Added
236
-
237
- **New Rules (1)**
238
- - `prop-naming-convention` - Enforce naming conventions for boolean and callback props 🔧
239
- - Boolean props must start with: `is`, `has`, `with`, `without` (configurable)
240
- - Callback props must start with: `on` (configurable)
241
- - Detects React event handler types (`MouseEventHandler`, `ChangeEventHandler`, `FormEventHandler`, etc.)
242
- - Supports nested types at any depth
243
- - Applies to interfaces, type aliases, and inline types (NOT JSX attributes)
244
- - Options: `booleanPrefixes`, `extendBooleanPrefixes`, `allowPastVerbBoolean`, `allowContinuousVerbBoolean`, `callbackPrefix`, `allowActionSuffix`
245
-
246
- ### Enhanced
247
-
248
- - **`enum-format`** - Add auto-fix for member names (convert to UPPER_SNAKE_CASE)
249
- - **`interface-format`** - Add auto-fix for property names (convert to camelCase); collapse single-member nested object types to one line
250
- - **`type-format`** - Add auto-fix for property names (convert to camelCase); collapse single-member nested object types to one line; union type formatting with configurable threshold (`minUnionMembersForMultiline` option, default 5)
251
-
252
- ### Stats
253
-
254
- - Total Rules: 75 (was 74)
255
- - Auto-fixable: 66 rules 🔧
256
- - Configurable: 17 rules ⚙️
257
- - Report-only: 9 rules
258
-
259
- **Full Changelog:** [v1.12.1...v1.13.0](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.12.1...v1.13.0)
260
-
261
- ---
262
-
263
- ## [1.12.1] - 2026-02-04
264
-
265
- ### Fixed
266
-
267
- - **`function-object-destructure`** - Skip when param is used in spread operations, exclude object property keys from reference counting
268
- - **`no-empty-lines-in-function-params`** - Only check parens within function's own range (fix for `.map(config => ...)` false positives)
269
- - **`jsx-children-on-new-line`** - Remove blank line check after opening tag (handled by `no-empty-lines-in-jsx` rule)
270
-
271
- ---
272
-
273
- ## [1.12.0] - 2026-02-04
274
-
275
- **New Rule: Folder Component Suffix**
276
-
277
- **Version Range:** v1.11.1 → v1.12.0
278
-
279
- ### Added
280
-
281
- **New Rules (1)**
282
- - `folder-component-suffix` - Enforce naming conventions based on folder location:
283
- - Components in `views/` folder must end with `View` suffix
284
- - Components in `pages/` folder must end with `Page` suffix
285
-
286
- ### Stats
287
-
288
- - Total Rules: 74 (was 73)
289
- - Auto-fixable: 65 rules 🔧
290
- - Report-only: 9 rules
291
-
292
- **Full Changelog:** [v1.11.1...v1.12.0](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.11.1...v1.12.0)
293
-
294
- ---
295
-
296
- ## [1.11.9] - 2026-02-04
297
-
298
- ### Fixed
299
-
300
- - **`variable-naming-convention`** - Enforce camelCase for object property keys (no longer allows SCREAMING_SNAKE_CASE like `APP_NAME`)
301
- - **`variable-naming-convention`** - Add auto-fix to convert property names to camelCase (e.g., `APP_NAME` → `appName`)
302
-
303
- ---
304
-
305
- ## [1.11.8] - 2026-02-04
306
-
307
- ### Fixed
308
-
309
- - **`comment-format`** - Allow `/* */` syntax for ESLint directive comments (`/* eslint-disable ... */`, `/* eslint-enable ... */`, etc.) since these must use block comment syntax
310
-
311
- ---
312
-
313
- ## [1.11.7] - 2026-02-04
314
-
315
- ### Changed
316
-
317
- - **`no-hardcoded-strings`**
318
- - Remove UI component pattern exemption - ALL enum-like attribute values are now flagged (e.g., `variant="primary"`, `size="large"`, `color="danger"`)
319
- - Enforce consistent use of enums for component props to prevent typos
320
-
321
- ---
322
-
323
- ## [1.11.6] - 2026-02-04
324
-
325
- ### Changed
326
-
327
- - **`no-hardcoded-strings`**
328
- - Flag `type` attribute in JSX elements (e.g., `<input type="text" />`) - should use enums to prevent typos
329
- - Remove `type` from default ignored attributes list
330
- - Remove "text" from UI component pattern (conflicts with input type)
331
- - Update error message for JSX attributes: "should be imported from @/enums (preferred) or @/data to prevent typos"
332
-
333
- ---
334
-
335
- ## [1.11.5] - 2026-02-04
336
-
337
- ### Fixed
338
-
339
- - **`no-hardcoded-strings`**
340
- - Flag hardcoded strings in component default params (e.g., `type = "text"`, `variant = "ghost"`)
341
- - Flag hardcoded strings in ternary expressions (e.g., `showPassword ? "text" : "password"`)
342
- - Remove overly broad HTML input type exemption from general string checks
343
- - Remove "text" from CSS cursor pattern (conflicts with common input type usage)
344
-
345
- ---
346
-
347
- ## [1.11.4] - 2026-02-04
348
-
349
- ### Fixed
350
-
351
- - **`opening-brackets-same-line`**
352
- - Collapse JSX elements with simple children to single line (e.g., `<span>{strings.label}</span>`)
353
- - Handle simple LogicalExpression children (e.g., `<p>{user?.email || fallback}</p>`)
354
-
355
- - **`jsx-children-on-new-line`** / **`jsx-element-child-new-line`**
356
- - Recognize simple LogicalExpression (≤2 operands) as simple children
357
- - Recognize ChainExpression (optional chaining like `user?.name`) as simple expression
358
- - Prevent circular fix conflicts with `opening-brackets-same-line`
359
-
360
- ---
361
-
362
- ## [1.11.3] - 2026-02-04
363
-
364
- ### Fixed
365
-
366
- - **`no-hardcoded-strings`**
367
- - Skip CSS values in template literals assigned to style-related variables (e.g., `const lineGradient = \`linear-gradient(...)\``)
368
- - Flag exported hardcoded strings like `export const tokenKey = "auth_token"` (non-SCREAMING_SNAKE_CASE exports)
369
- - Skip HTML input types in default parameters (e.g., `type = "text"`)
370
- - Smarter single-word classification: all lowercase (e.g., `"loading"`) → keyword/enum, capitalized (e.g., `"Loading"`) → UI string
371
- - Descriptive error messages: UI strings → `@/strings or @/constants`, keywords → `@/data or @/enums`
372
-
373
- - **`opening-brackets-same-line`**
374
- - Collapse simple JSX logical expressions (≤2 operands, ≤80 chars) to single line
375
- - Ensure closing `}` is on its own line for multiline logical expressions with 3+ operands
376
-
377
- ---
378
-
379
- ## [1.11.2] - 2026-02-04
380
-
381
- ### Fixed
382
-
383
- - **`no-hardcoded-strings`**
384
- - Skip strings inside style object expressions (CSS values like `radial-gradient(...)`, `rotate(90deg)`, etc.)
385
- - Skip HTML input types (`text`, `password`, `email`, `number`, etc.)
386
- - Add CSS function patterns (transform, gradient, animation) to ignore list
387
- - Simplify error message to unified format: "should be imported from @/data, @/strings, @/constants, or @/enums"
388
- - Remove forced flagging of status codes, roles, HTTP methods (user intent is ambiguous)
389
-
390
- - **`ternary-condition-multiline`**
391
- - Skip collapsing ternaries with JSX branches (JSX ternaries should stay multiline for readability)
392
-
393
- - **`no-inline-type-definitions`**
394
- - Skip union types with only built-in/native types (e.g., `Error | null`, `string | null`)
395
- - Only flag unions with custom inline types like `{ user: string }`
396
-
397
- ---
398
-
399
- ## [1.11.1] - 2026-02-03
400
-
401
- ### Fixed
402
-
403
- - **`component-props-inline-type`** - Single-property type annotations spanning multiple lines now auto-fix to single line format `{ prop: Type }`
404
- - **`function-params-per-line`** - Normalize single-member type annotations to prevent circular fix conflicts
405
-
406
- ---
407
-
408
- ## [1.11.0] - 2026-02-03
409
-
410
- **New Rule: svg-component-icon-naming + Multiple Component Props Fixes**
411
-
412
- **Version Range:** v1.10.1 → v1.11.0
413
-
414
- ### Added
415
-
416
- **New Rules (1)**
417
-
418
- - **`svg-component-icon-naming`** - Enforce SVG components to have 'Icon' suffix and vice versa
419
- - Components returning only `<svg>` must end with "Icon" suffix (e.g., `SuccessIcon`)
420
- - Components with "Icon" suffix must return an `<svg>` element
421
- - Works with arrow functions and function declarations
422
-
423
- ### Fixed
424
-
425
- - **`component-props-inline-type`** - Single prop trailing comma now correctly removed (was not detecting comma in member range)
426
- - **`component-props-inline-type`** - Closing `})` now properly placed on its own line for multiple type props (was missing for non-intersection types)
427
- - **`function-params-per-line`** - Type annotations no longer removed when collapsing params (was losing entire type annotation)
428
- - **`function-params-per-line`** - Default values preserved for shorthand props (e.g., `className = ""` no longer becomes `className`)
429
- - **`function-params-per-line`** - Type annotation complexity now considered (2+ type props = complex, prevents incorrect collapsing)
430
-
431
- ### Stats
432
-
433
- - Total Rules: 73 (was 72)
434
- - Auto-fixable: 65 rules
435
- - Report-only: 8 rules
436
-
437
- **Full Changelog:** [v1.10.1...v1.11.0](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.10.1...v1.11.0)
438
-
439
- ---
440
-
441
- ## [1.10.3] - 2026-02-03
442
-
443
- ### Fixed
444
-
445
- - **`no-hardcoded-strings`** - Skip template literals inside className/style attributes (Tailwind classes in template literals)
446
- - **`component-props-inline-type`** - Auto-fix to REMOVE trailing comma for single property (not just skip adding it)
447
-
448
- ---
449
-
450
- ## [1.10.2] - 2026-02-03
451
-
452
- ### Fixed
453
-
454
- - **`component-props-inline-type`** - Don't require trailing comma for single property in inline type definitions
455
- - **`no-hardcoded-strings`** - Skip 40+ SVG attributes (strokeLinecap, strokeLinejoin, filter, result, in, in2, mode, colorInterpolationFilters, etc.)
456
- - **`no-hardcoded-strings`** - Skip SVG standard attribute values (round, butt, square, miter, bevel, none, normal, sRGB, userSpaceOnUse, etc.)
457
- - **`no-hardcoded-strings`** - Skip URL references (url(#...)) and scientific notation numbers
458
- - **`no-hardcoded-strings`** - Skip CSS property values (cursor: pointer, display: flex, position: absolute, etc.)
459
- - **`no-hardcoded-strings`** - Skip SVG filter result identifiers (BackgroundImageFix, SourceGraphic, etc.)
460
-
461
- ---
462
-
463
- ## [1.10.1] - 2026-02-03
464
-
465
- ### Fixed
466
-
467
- - **`logical-expression-multiline`** - Add collapse to single line for simple expressions (≤3 operands)
468
- - **`logical-expression-multiline`** - Skip collapsing when any operand is multiline (e.g., JSX elements)
469
-
470
- ---
471
-
472
- ## [1.10.0] - 2026-02-03
473
-
474
- **New Rule: logical-expression-multiline + Enhanced no-hardcoded-strings**
475
-
476
- **Version Range:** v1.9.1 → v1.10.0
477
-
478
- ### Added
479
-
480
- **New Rules (1)**
481
-
482
- - **`logical-expression-multiline`** - Enforce multiline formatting for logical expressions with more than maxOperands (default: 3) 🔧
483
- - Handles variable declarations: `const err = a || b || c || d || e;`
484
- - Handles return statements, assignments, and other contexts
485
- - Skips if/ternary conditions (handled by other rules)
486
- - Auto-fixes to put each operand on its own line with operator at start
487
-
488
- ### Enhanced
489
-
490
- - **`no-hardcoded-strings`** - Major improvements:
491
- - Remove single-word string length limitations (now detects all single-word hardcoded strings)
492
- - Add validation strings: `empty`, `invalid`, `missing`, `optional`, `required`, `valid`
493
- - Add auth state strings: `anonymous`, `authenticated`, `authed`, `authorized`, `denied`, `forbidden`, etc.
494
- - Add more status strings: `done`, `finished`, `inprogress`, `queued`, `ready`, `running`, etc.
495
- - Skip UI component patterns in JSX attributes: `variant="ghost"`, `size="md"`, etc.
496
- - Skip Tailwind CSS class strings: `"px-5 py-3 w-full"`, `"hover:bg-primary"`, etc.
497
- - Make technical patterns stricter to avoid false negatives
498
-
499
- ### Fixed
500
-
501
- - **`no-hardcoded-strings`** - Fix detection of strings inside exported components
502
- - **`no-hardcoded-strings`** - Fix Tailwind detection being too broad (now requires actual Tailwind syntax)
503
-
504
- ### Stats
505
-
506
- - Total Rules: 72 (was 71)
507
- - Auto-fixable: 65 rules 🔧 (was 64)
508
- - Report-only: 7 rules
509
-
510
- **Full Changelog:** [v1.9.1...v1.10.0](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.9.1...v1.10.0)
511
-
512
- ---
513
-
514
- ## [1.9.7] - 2026-02-03
515
-
516
- ### Fixed
517
-
518
- - **`no-hardcoded-strings`** - Fix Tailwind detection being too broad:
519
- - Previously: `"john"`, `"not found"` were incorrectly skipped as Tailwind classes
520
- - Now: Only strings with Tailwind syntax (hyphens, colons, slashes, brackets) are skipped
521
- - Regular strings like `const name = "john"` are now properly detected
522
- - Tailwind classes like `"px-5 py-3 w-full"` still correctly skipped
523
-
524
- ---
525
-
526
- ## [1.9.6] - 2026-02-03
527
-
528
- ### Enhanced
529
-
530
- - **`no-hardcoded-strings`** - Skip Tailwind CSS class strings:
531
- - Multi-class strings like `"px-5 py-3 w-full bg-white"` are now ignored
532
- - Individual classes: `w-5`, `p-4`, `pr-12`, `text-2xl`, `gap-4`, etc.
533
- - State modifiers: `hover:bg-primary`, `focus:ring-2`, `disabled:opacity-50`
534
- - Responsive prefixes: `sm:flex`, `md:hidden`, `lg:grid`
535
- - Opacity values: `bg-white/50`, `text-black/80`, `placeholder-error/50`
536
- - Arbitrary values: `w-[100px]`, `bg-[#ff0000]`
537
- - Negative values: `-translate-y-1/2`, `-rotate-45`
538
-
539
- ---
540
-
541
- ## [1.9.5] - 2026-02-03
542
-
543
- ### Fixed
544
-
545
- - **`no-hardcoded-strings`** - Fix bug where strings inside exported components were incorrectly skipped:
546
- - Previously: `export const Component = () => { const name = "john" }` was not detected
547
- - Now: Strings inside functions are properly detected regardless of export status
548
- - Only direct constant exports are skipped: `export const MESSAGE = "value"` or `export const DATA = { key: "value" }`
549
-
550
- ---
551
-
552
- ## [1.9.4] - 2026-02-03
553
-
554
- ### Enhanced
555
-
556
- - **`no-hardcoded-strings`** - Skip UI component patterns only in JSX attributes:
557
- - In JSX attributes: `<Button variant="ghost" />` is now ignored
558
- - In logic: `const status = "success"` or `setValue("primary")` is still detected
559
- - UI patterns: `primary`, `secondary`, `ghost`, `outline`, `link`, `muted`, `danger`, `warning`, `success`, `error`, `sm`, `md`, `lg`, `xl`, `left`, `right`, `center`, `top`, `bottom`, `hover`, `focus`, `click`, etc.
560
-
561
- ---
562
-
563
- ## [1.9.3] - 2026-02-03
564
-
565
- ### Enhanced
566
-
567
- - **`no-hardcoded-strings`** - Remove single-word string length limitations and add more special cases:
568
- - Removed length restrictions (now detects all single-word hardcoded strings)
569
- - Added validation strings: `empty`, `invalid`, `missing`, `optional`, `required`, `valid`
570
- - Added auth state strings: `anonymous`, `authenticated`, `authed`, `authorized`, `denied`, `forbidden`, `granted`, `locked`, `loggedin`, `loggedout`, `revoked`, `unauthenticated`, `unauthorized`, `unlocked`, `unverified`, `verified`
571
- - Added more status strings: `done`, `finished`, `inprogress`, `queued`, `ready`, `running`, `started`, `stopped`, `successful`, `waiting`
572
- - Made technical patterns stricter to avoid false negatives (camelCase requires uppercase in middle, snake_case requires underscore, kebab-case requires hyphen)
573
-
574
- ---
575
-
576
- ## [1.9.2] - 2026-02-03
577
-
578
- ### Enhanced
579
-
580
- - **`no-hardcoded-strings`** - Now detects special strings that should be enums:
581
- - HTTP status codes (2xx, 4xx, 5xx like "200", "404", "500")
582
- - HTTP methods ("GET", "POST", "PUT", "DELETE", etc.)
583
- - Role/permission names ("admin", "user", "moderator", etc.)
584
- - Environment names ("production", "development", "staging", etc.)
585
- - Log levels ("debug", "info", "warn", "error", etc.)
586
- - Status strings ("active", "pending", "approved", "rejected", etc.)
587
- - Priority levels ("high", "medium", "low", "critical", etc.)
588
- - All above → import from `@/enums` or `@/data`
589
- - Regular strings → import from `@/data or @/strings or @/constants or @/@constants or @/@strings`
590
-
591
- ### Fixed
592
-
593
- - **`no-hardcoded-strings`** - Fixed bug where `isInConstantsObjectHandler` incorrectly matched camelCase variable names due to case-insensitive regex flag
594
-
595
- ---
596
-
597
- ## [1.9.1] - 2026-02-03
598
-
599
- ### Enhanced
600
-
601
- - **`no-hardcoded-strings`** - Initial special string detection:
602
- - HTTP status codes (4xx, 5xx)
603
- - Role/permission names
604
-
605
- ---
606
-
607
- ## [1.9.0] - 2026-02-03
608
-
609
- **New Rule: class-method-definition-format + Enhanced Spacing Rules**
610
-
611
- **Version Range:** v1.8.1 → v1.9.0
612
-
613
- ### Added
614
-
615
- **New Rules (1)**
616
- - **`class-method-definition-format`** - Enforce consistent spacing in class and method definitions 🔧
617
- - Space before opening brace `{` in class declarations
618
- - No space between method name and opening parenthesis `(`
619
- - Space before opening brace `{` in method definitions
620
- - Opening brace must be on same line as class/method signature
621
-
622
- ### Enhanced
623
-
624
- - **`function-call-spacing`** - Now also handles:
625
- - `new` expressions (`new Class ()` → `new Class()`)
626
- - Generic type calls (`get <Type>()` → `get<Type>()`)
627
- - **`member-expression-bracket-spacing`** - Now also handles:
628
- - TypeScript indexed access types (`Type ["prop"]` → `Type["prop"]`)
629
-
630
- ### Stats
631
-
632
- - Total Rules: 71 (was 70)
633
- - Auto-fixable: 64 rules 🔧 (was 63)
634
- - Report-only: 7 rules
635
-
636
- **Full Changelog:** [v1.8.1...v1.9.0](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.8.1...v1.9.0)
637
-
638
- ---
639
-
640
- ## [1.8.4] - 2026-02-03
641
-
642
- ### Documentation
643
-
644
- - Fix v1.8.0 CHANGELOG entry to include Release Title, Version Range, and Full Changelog link (required for MINOR releases)
645
- - Add missing comparison links in CHANGELOG.md (v1.3.9 through v1.8.3)
646
- - Update manage-rule skill with CHANGELOG format requirements for new rules
647
- - Update Current releases list in AGENTS.md to include v1.8.0
648
-
649
- ---
650
-
651
- ## [1.8.3] - 2026-02-03
652
-
653
- ### Fixed
654
-
655
- - **`class-naming-convention`** - Auto-fix now renames all references to the class (including instantiations like `new ClassName()` and type annotations), not just the class declaration
656
-
657
- ---
658
-
659
- ## [1.8.2] - 2026-02-03
660
-
661
- ### Changed
662
-
663
- - **`multiline-if-conditions`** - Remove configurable `maxNestingLevel` option; nesting level is now fixed at 2 to prevent overly complex conditions. Nested groups with >maxOperands are formatted multiline inline (not extracted). Extraction only occurs when nesting exceeds 2 levels.
664
- - **`ternary-condition-multiline`** - Remove configurable `maxNestingLevel` option; nesting level is now fixed at 2 to prevent overly complex conditions. Nested groups with >maxOperands are formatted multiline inline (not extracted). Extraction only occurs when nesting exceeds 2 levels.
665
- - **`opening-brackets-same-line`** - Skip ternary condition tests and detect intentional multiline format to prevent rule conflicts
666
- - **`if-statement-format`** - Detect intentional multiline conditions to prevent collapsing formatted conditions
667
-
668
- ### Documentation
669
-
670
- - Update both rules to show multiline inline formatting examples instead of extraction
671
- - Remove `maxNestingLevel` option from documentation (now fixed internally)
672
-
673
- ---
674
-
675
- ## [1.8.1] - 2026-02-03
676
-
677
- ### Changed
678
-
679
- - **`function-naming-convention`** - Add `handleXxx` → `xxxHandler` auto-fix (converts `handleClick` to `clickHandler` instead of `handleClickHandler`)
680
-
681
- ---
682
-
683
- ## [1.8.0] - 2026-02-03
684
-
685
- **New Rule: no-hardcoded-strings**
686
-
687
- **Version Range:** v1.7.1 → v1.8.0
688
-
689
- ### Added
690
-
691
- **New Rules (1)**
692
- - **`no-hardcoded-strings`** - Enforce importing strings from constants/strings modules instead of hardcoding them inline 🔧
693
- - Detects hardcoded strings in JSX text content, attributes, and component logic
694
- - Configurable `ignoreAttributes`, `extraIgnoreAttributes`, `ignorePatterns` options
695
- - Automatically ignores technical strings (CSS units, URLs, paths, identifiers, etc.)
696
- - Valid import paths: `@/constants`, `@/strings`, `@/@constants`, `@/@strings`, `@/data/constants`, `@/data/strings`
697
-
698
- ### Changed
699
-
700
- - **`absolute-imports-only`** - Add `strings`, `@constants`, `@strings` to default allowed folders
701
- - **`module-index-exports`** - Add `strings`, `@constants`, `@strings` to default module folders
702
-
703
- ### Stats
704
-
705
- - Total Rules: 70 (was 69)
706
- - Auto-fixable: 63 rules 🔧
707
- - Report-only: 7 rules (was 6)
708
-
709
- **Full Changelog:** [v1.7.1...v1.8.0](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.7.1...v1.8.0)
710
-
711
- ---
712
-
713
- ## [1.7.6] - 2026-02-02
714
-
715
- ### Changed
716
-
717
- - **`ternary-condition-multiline`** - Now depends only on operand count, not line length:
718
- - ≤maxOperands (default: 3): Always collapse to single line regardless of line length
719
- - \>maxOperands: Format multiline with each operand on its own line
720
- - Removed `maxLineLength` option (no longer used)
721
- - This aligns behavior with `multiline-if-conditions` rule
722
-
723
- ---
724
-
725
- ## [1.7.5] - 2026-02-02
726
-
727
- ### Fixed
728
-
729
- - **`ternary-condition-multiline`** - For ≤3 operands, always collapse to single line when `?` is on different line than condition end (enforces `condition ? value : value` format for simple ternaries)
730
- - **`no-empty-lines-in-function-params`** - Add detection for empty lines in TSTypeLiteral (type annotation objects like `{ prop: Type }` in intersection types)
731
-
732
- ---
733
-
734
- ## [1.7.4] - 2026-02-02
735
-
736
- ### Fixed
737
-
738
- - **`no-empty-lines-in-function-params`** - Fix bug that deleted TypeScript type annotations when fixing empty lines in destructured params; now uses `getTokenAfter` instead of `getLastToken` to find closing brace
739
- - **`no-inline-type-definitions`** - Change threshold comparison from `>` to `>=` so 2-member unions are now flagged (with default `maxUnionMembers: 2`)
740
- - **`ternary-condition-multiline`** - Fix multiline formatting for >3 operands: first operand stays on same line as property key, `?` and `:` each on their own lines; fix circular fix bug for ≤3 operands case
741
-
742
- ---
743
-
744
- ## [1.7.3] - 2026-02-02
745
-
746
- ### Fixed
747
-
748
- - **`ternary-condition-multiline`** - Fix `?`/`:` on own line without value; collapse simple ternaries to single line when they fit
749
- - **`no-empty-lines-in-function-params`** - Detect empty lines after opening `{` and before closing `}` in ObjectPattern params
750
- - **`empty-line-after-block`** - Skip consecutive if statements (already handled by `if-else-spacing`)
751
- - **`classname-multiline`** - Fix closing backtick alignment for return statements
752
-
753
- ### Documentation
754
-
755
- - Add 6 missing rules to README detailed documentation
756
- - Add 7 missing rules to README Quick Start example
757
- - Update rule counts from 66 to 69 across all documentation files
758
- - Update AGENTS.md Tailwind section with actual rules and comparison with `tailwindcss/classnames-order`
759
- - Add README multi-section update warnings to AGENTS.md rule modification checklists
760
-
761
- ### Added
762
-
763
- - **`manage-rule` skill** - New skill for adding, editing, or removing ESLint rules with complete workflow
764
-
765
- ---
766
-
767
- ## [1.7.2] - 2026-02-02
768
-
769
- ### Fixed
770
-
771
- - **`enum-format`** - Fix double comma bug when auto-fixing trailing comma and closing brace position; check for comma token after member, not just member text
772
- - **`interface-format`** - Same fix as enum-format for trailing comma detection
773
-
774
- ---
775
-
776
- ## [1.7.1] - 2026-02-02
777
-
778
- ### Fixed
779
-
780
- - **`no-empty-lines-in-function-params`** - Detect empty lines between destructured properties inside ObjectPattern params
781
- - **`component-props-inline-type`** - Handle TSIntersectionType (e.g., `ButtonHTMLAttributes & { prop: Type }`): check `&` position, opening brace position, and apply formatting rules to type literals within intersections
782
- - **`enum-type-enforcement`** - Handle TSIntersectionType to track typed props; fix extractTypeInfoHandler argument for TSPropertySignature members
783
- - **`ternary-condition-multiline`** - Improve simple ternary prefix calculation for object properties; add checks for `?` on same line as condition end and empty lines before `?` or `:`; fix multiline formatting to not add leading newline
784
-
785
- ---
786
-
787
- ## [1.7.0] - 2026-02-02
788
-
789
- **New Rules for Blocks, Classes & Enum Enforcement + Multiple Enhancements**
790
-
791
- **Version Range:** v1.6.1 → v1.7.0
792
-
793
- ### Added
794
-
795
- **New Rules (3)**
796
- - `empty-line-after-block` - Require empty line between closing `}` of block statement and next statement 🔧
797
- - `class-naming-convention` - Enforce class declarations end with "Class" suffix 🔧
798
- - `enum-type-enforcement` - Enforce using enum values instead of string literals for typed variables (e.g., `ButtonVariantEnum.PRIMARY` instead of `"primary"`) 🔧
799
-
800
- ### Enhanced
801
-
802
- - **`ternary-condition-multiline`** - Now also collapses simple ternaries to single line when they fit within max line length (default: 120 chars). Added `maxLineLength` option.
803
- - **`function-object-destructure`** - Add auto-fix (replaces destructured usages with dot notation), expand module paths (services, constants, config, api, utils, helpers, lib, apis, configs, utilities, routes)
804
- - **`function-params-per-line`** - Handle callbacks with mixed params (destructured + simple like `({ item }, index)`)
805
- - **`array-callback-destructure`** - Fix closing brace on same line as last property
806
- - **`simple-call-single-line`** - Skip callbacks with 2+ params to avoid conflicts
807
- - **`jsx-simple-element-one-line`**, **`jsx-children-on-new-line`**, **`jsx-element-child-new-line`** - Treat simple function calls (0-1 args) as simple expressions
808
-
809
- ### Fixed
810
-
811
- - **`component-props-destructure`** - Detect body destructuring patterns even without type annotations, add auto-fix for body destructuring, preserve TypeScript type annotation when auto-fixing
812
-
813
- ### Stats
814
-
815
- - Total Rules: 69 (was 66)
816
- - Auto-fixable: 63 rules 🔧
817
- - Report-only: 6 rules
818
-
819
- **Full Changelog:** [v1.6.1...v1.7.0](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.6.1...v1.7.0)
820
-
821
- ---
822
-
823
- ## [1.6.6] - 2026-02-01
824
-
825
- ### Fixed
826
-
827
- - **`component-props-destructure`** - Detect body destructuring patterns (e.g., `const { name } = data;`) even without type annotations
828
- - **`component-props-destructure`** - Add auto-fix for body destructuring: moves props to parameter and removes body declaration
829
-
830
- ---
831
-
832
- ## [1.6.5] - 2026-02-01
833
-
834
- ### Added
835
-
836
- - **`function-object-destructure`** - Add auto-fix: replaces destructured usages with dot notation and removes declaration
837
-
838
- ---
839
-
840
- ## [1.6.4] - 2026-02-01
841
-
842
- ### Enhanced
843
-
844
- - **`function-object-destructure`** - Add more module paths: apis, configs, utilities, routes
845
-
846
- ---
847
-
848
- ## [1.6.3] - 2026-02-01
849
-
850
- ### Fixed
851
-
852
- - **`component-props-destructure`** - Preserve TypeScript type annotation when auto-fixing
853
-
854
- ---
855
-
856
- ## [1.6.2] - 2026-02-01
857
-
858
- ### Enhanced
859
-
860
- - **`function-object-destructure`** - Expand to check more module paths (services, constants, config, api, utils, helpers, lib) for dot notation enforcement
861
-
862
- ---
863
-
864
- ## [1.6.1] - 2026-02-01
865
-
866
- ### Enhanced
867
-
868
- - **`function-params-per-line`** - Handle callbacks with mixed params (destructured + simple like `({ item }, index)`)
869
- - **`array-callback-destructure`** - Fix closing brace on same line as last property
870
- - **`simple-call-single-line`** - Skip callbacks with 2+ params to avoid conflicts
871
- - **`jsx-simple-element-one-line`** - Treat simple function calls (0-1 args) as simple expressions
872
- - **`jsx-children-on-new-line`** - Treat simple function calls (0-1 args) as simple expressions
873
- - **`jsx-element-child-new-line`** - Treat simple function calls (0-1 args) as simple expressions
874
-
875
- ### Docs
876
-
877
- - Clarify version bump and tag workflow in AGENTS.md
878
-
879
- ---
880
-
881
- ## [1.6.0] - 2026-02-01
882
-
883
- **New array-callback-destructure Rule & Multiple Enhancements**
884
-
885
- **Version Range:** v1.5.1 → v1.6.0
886
-
887
- ### Added
888
-
889
- **New Rules (1)**
890
- - `array-callback-destructure` - Enforce multiline destructuring in array method callbacks (map, filter, find, etc.) when there are 2+ properties 🔧
891
-
892
- ### Enhanced
893
-
894
- - **`function-naming-convention`** - Added "forgot" to verb prefixes list
895
- - **`arrow-function-simplify`** - Extended to handle non-JSX expression statements (simple side-effect functions)
896
-
897
- ### Changed
898
-
899
- - **`no-plusplus`** - Changed from "error" to "off" in all config files
900
-
901
- ### Stats
902
-
903
- - Total Rules: 66 (was 65)
904
- - Auto-fixable: 60 rules 🔧
905
- - Report-only: 6 rules
906
-
907
- **Full Changelog:** [v1.5.1...v1.6.0](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.5.1...v1.6.0)
908
-
909
- ---
910
-
911
- ## [1.5.2] - 2026-02-01
912
-
913
- - Version bump
914
-
915
- ---
916
-
917
- ## [1.5.1] - 2026-01-30
918
-
919
- - Minor fixes
920
-
921
- ---
922
-
923
- ## [1.5.0] - 2026-01-30
924
-
925
- **New if-else-spacing Rule & Enhanced Arrow/Class Method Support**
926
-
927
- **Version Range:** v1.4.3 → v1.5.0
928
-
929
- ### Added
930
-
931
- **New Rules (1)**
932
- - `if-else-spacing` - Enforce proper spacing between if statements 🔧
933
-
934
- ### Enhanced
935
-
936
- - **`function-naming-convention`** - Now checks class methods for Handler suffix (skips constructors, getters, setters, React lifecycle)
937
- - **`arrow-function-simplify`** - Extended to handle ALL arrow functions with single return (not just JSX attributes)
938
-
939
- ### Fixed
940
-
941
- - **Circular fix conflict** between `opening-brackets-same-line` and `function-arguments-format` for multi-argument arrow function calls
942
-
943
- ### Stats
944
-
945
- - Total Rules: 65 (was 64)
946
- - Auto-fixable: 59 rules 🔧
947
- - Report-only: 6 rules
948
-
949
- **Full Changelog:** [v1.4.3...v1.5.0](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.4.3...v1.5.0)
950
-
951
- ---
952
-
953
- ## [1.4.5] - 2026-01-30
954
-
955
- - Version bump
956
-
957
- ---
958
-
959
- ## [1.4.3] - 2026-01-30
960
-
961
- ### Documentation
962
-
963
- - Add CHANGELOG for v1.4.0 release
964
-
965
- ---
966
-
967
- ## [1.4.2] - 2026-01-30
968
-
969
- **New Rules, Enhanced Auto-Fix & Comprehensive Documentation**
970
-
971
- **Version Range:** v1.3.1 → v1.4.2
972
-
973
- ### Added
974
-
975
- **New Rules (3)**
976
- - `index-exports-only` - Prevent type/interface definitions in index files (move to types file)
977
- - `ternary-condition-multiline` - Format complex ternary conditions with each operand on its own line 🔧 ⚙️
978
- - `no-inline-type-definitions` - Extract inline union types to named types in type files ⚙️
979
-
980
- **Auto-Fix Labels in Documentation**
981
- - Added 🔧 label to indicate auto-fixable rules
982
- - Added legend explaining 🔧 (auto-fixable) and ⚙️ (customizable) labels
983
-
984
- ### Enhanced
985
-
986
- - **`function-naming-convention`** - Expanded verb list from ~50 to ~200+ verbs organized by category
987
- - **`function-object-destructure`** - Added auto-fix: inserts destructuring at function body top
988
- - **`component-props-destructure`** - Added auto-fix: converts `(props)` to `({ prop1, prop2 })` 🔧
989
- - **`react-code-order`** - Added auto-fix for reordering code blocks in components/hooks
990
- - **`variable-naming-convention`** - Added auto-fix for renaming variables to camelCase
991
-
992
- ### Fixed
993
-
994
- - **`multiline-if-conditions`** - Fix indentation calculation for nested code
995
- - **`classname-multiline`** - Fix template literal indentation for inline JSX attributes
996
- - **`function-naming-convention`** - Skip React components (PascalCase + returns JSX)
997
- - **`variable-naming-convention`** - Skip PascalCase arguments (component references)
998
- - Add "poll" as recognized verb prefix in function-naming-convention
999
-
1000
- ### Documentation
1001
-
1002
- - Enhanced error messages with examples and helpful context
1003
- - Improved CHANGELOG with full details and Full Changelog links
1004
- - Added GitHub Releases guidelines to AGENTS.md
1005
-
1006
- ### Report-Only Rules (6)
1007
-
1008
- - `absolute-imports-only` - Requires knowledge of project structure
1009
- - `index-exports-only` - Requires moving code to new files
1010
- - `jsx-prop-naming-convention` - Requires cross-file prop renaming
1011
- - `module-index-exports` - Requires file creation
1012
- - `no-inline-type-definitions` - Requires extracting types to new files
1013
- - `typescript-definition-location` - Requires moving code to folders
1014
-
1015
- ### Stats
1016
-
1017
- - Total Rules: 64 (was 61)
1018
- - Auto-fixable: 58 rules 🔧
1019
- - Report-only: 6 rules
1020
-
1021
- **Full Changelog:** [v1.3.1...v1.4.2](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.3.1...v1.4.2)
1022
-
1023
- ---
1024
-
1025
- ## [1.4.1] - 2026-01-30
1026
-
1027
- ### Documentation
1028
-
1029
- - Add 🔧 label to indicate auto-fixable rules (57 of 64)
1030
- - 7 rules are report-only (require manual changes)
1031
- - Add legend explaining 🔧 (auto-fixable) and ⚙️ (customizable) labels
1032
- - Add new rules to Rules Categories table
1033
-
1034
- ---
1035
-
1036
- ## [1.4.0] - 2026-01-30
1037
-
1038
- ### Added
1039
-
1040
- - New rule: `index-exports-only` - Prevent type/interface definitions in index files
1041
- - New rule: `ternary-condition-multiline` - Format complex ternary conditions
1042
- - New rule: `no-inline-type-definitions` - Extract inline union types to type files
1043
-
1044
- ### Enhanced
1045
-
1046
- - `function-naming-convention` - Expanded verb list from ~50 to ~200+ verbs
1047
- - `function-object-destructure` - Added auto-fix for parameter dot notation
1048
-
1049
- ### Fixed
1050
-
1051
- - `multiline-if-conditions` - Fix indentation calculation for nested code
1052
- - `classname-multiline` - Fix template literal indentation for inline attributes
1053
-
1054
- ### Stats
1055
-
1056
- - Total Rules: 64 (was 61)
1057
-
1058
- ---
1059
-
1060
- ## [1.3.11] - 2026-01-30
1061
-
1062
- ### Enhanced
1063
-
1064
- - Dependency-aware ordering: statements using variables must come after their declarations
1065
- - Auto-fix for module-level constants: moves camelCase constants inside component
1066
- - Auto-fix respects dependencies: initialResult declared before useRef(initialResult)
1067
- - SCREAMING_CASE constants allowed at module level
1068
-
1069
- ---
1070
-
1071
- ## [1.3.10] - 2026-01-30
1072
-
1073
- ### Fixed
1074
-
1075
- - `function-naming-convention` - Skip React components (PascalCase + returns JSX)
1076
- - Prevents renaming components like Login to loginHandler
1077
-
1078
- ---
1079
-
1080
- ## [1.3.9] - 2026-01-29
1081
-
1082
- ### Enhanced
1083
-
1084
- - `react-code-order` - Add auto-fix
1085
- - Auto-fix preserves control flow statements (if, for, while) in their relative positions
1086
-
1087
- ---
1088
-
1089
- ## [1.3.8] - 2026-01-29
1090
-
1091
- ### Fixed
1092
-
1093
- - `variable-naming-convention` - Skip PascalCase arguments (handled by function-naming-convention)
1094
- - Avoids duplicate errors between the two rules
1095
- - Auto-fix correctly updates all references including arguments passed to functions
1096
-
1097
- ---
1098
-
1099
- ## [1.3.7] - 2026-01-29
1100
-
1101
- ### Enhanced
1102
-
1103
- - `function-naming-convention` - Enforce camelCase for functions with verb prefixes (GetForStatus → getForStatus)
1104
- - Auto-fix converts PascalCase functions to camelCase and updates all references
1105
- - React components (PascalCase without verb prefix) still correctly skipped
1106
-
1107
- ---
1108
-
1109
- ## [1.3.6] - 2026-01-29
1110
-
1111
- ### Enhanced
1112
-
1113
- - `function-naming-convention` - Add "poll" as recognized verb prefix
1114
- - Functions like pollForStatus, pollDataHandler are now valid
1115
-
1116
- ---
1117
-
1118
- ## [1.3.5] - 2026-01-28
1119
-
1120
- ### Enhanced
1121
-
1122
- - Improved error messages with examples and helpful context for all rules
1123
- - Tailwind class order shows recommended order (layout → sizing → spacing → typography → colors → effects → states)
1124
- - className multiline shows threshold and format example
1125
- - Import/export format shows single-line example with threshold
1126
- - Object/array formatting shows format examples with thresholds
1127
- - Type/Interface/Enum naming shows suggested corrected name
1128
- - React code order shows full order sequence
1129
-
1130
- ---
1131
-
1132
- ## [1.3.4] - 2026-01-28
1133
-
1134
- ### Enhanced
1135
-
1136
- - className rules - Smart detection for objects with Tailwind class values (e.g., variants object)
1137
- - Smart detection for return statements with Tailwind classes
1138
- - Applies to: classname-multiline, classname-no-extra-spaces, classname-order
1139
- - `variable-naming-convention` - Add auto-fix for SCREAMING_SNAKE_CASE and snake_case
1140
-
1141
- ---
1142
-
1143
- ## [1.3.3] - 2026-01-28
1144
-
1145
- ### Fixed
1146
-
1147
- - `function-naming-convention` - Fix overlapping fixes error in auto-fix
1148
- - Track fixed ranges to prevent duplicate fixes on same node
1149
-
1150
- ---
1151
-
1152
- ## [1.3.2] - 2026-01-28
1153
-
1154
- ### Documentation
1155
-
1156
- - Add Full Changelog links to all releases in CHANGELOG.md
1157
- - Enhance release 1.1.0 with full feature details
1158
- - Enhance release 1.0.14 with full feature details
1159
- - Add Full Changelog link instructions to AGENTS.md
1160
-
1161
- ---
1162
-
1163
- ## [1.3.1] - 2026-01-28
1164
-
1165
- ### Documentation
1166
-
1167
- - Add CHANGELOG.md with full release history
1168
- - Add GitHub Releases guidelines to AGENTS.md
1169
-
1170
- ---
1171
-
1172
- ## [1.3.0] - 2026-01-28
1173
-
1174
- **New Rules, Auto-Fix Enhancements & Agent Skills Integration**
1175
-
1176
- **Version Range:** v1.2.1 → v1.3.0
1177
-
1178
- ### Added
1179
-
1180
- **New Rules (2)**
1181
- - `classname-multiline` - Enforce multiline className formatting with string/template literal format 🔧
1182
- - `function-declaration-style` - Auto-fix function declarations to arrow expressions 🔧
1183
-
1184
- **Agent Skills** - Added Agent Skills open standard support
1185
- - `test-rule` - Test an ESLint rule after creating or modifying it
1186
- - `validate-types` - Verify TypeScript definitions match rules in index.js
1187
- - `review-config` - Review recommended ESLint configurations
1188
- - `audit-docs` - Verify documentation accuracy across all files
1189
- - Compatible with Claude Code, Cursor, VS Code, GitHub Copilot, Gemini CLI, and more
1190
-
1191
- **TypeScript Support**
1192
- - Added `index.d.ts` with full type definitions for IDE autocomplete
1193
- - All 61 rule names available as TypeScript literal types
1194
-
1195
- ### Enhanced
1196
-
1197
- - **`variable-naming-convention`** - Enforce camelCase for all variables including constants
1198
- - **`function-object-destructure`** - Add auto-fix for arrow expression body callbacks
1199
- - **`simple-call-single-line`** - Extend to collapse callbacks with params, handle optional chaining
1200
- - **`function-naming-convention`** - Add auto-fix for missing Handler suffix
1201
- - **`absolute-imports-only`** - Allow relative imports in entry files (main.tsx/main.ts), add pages folder
1202
-
1203
- ### Fixed
1204
-
1205
- - Remove space before `?.` when collapsing simple calls to single line
1206
- - Sync eslint configs and add `@stylistic/semi-style` rule
1207
-
1208
- ### Documentation
1209
-
1210
- - Reorganized AGENTS.md and CLAUDE.md for better AI agent compatibility
1211
- - Added git workflow and versioning guidelines
1212
- - Updated requirements: Node.js 20+, TypeScript 5+, Tailwind CSS 4+
1213
-
1214
- ### Stats
1215
-
1216
- - Total Rules: 61 (was 56)
1217
- - All rules are auto-fixable with `eslint --fix`
1218
-
1219
- **Full Changelog:** [v1.2.1...v1.3.0](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.2.1...v1.3.0)
1220
-
1221
- ---
1222
-
1223
- ## [1.2.9] - 2026-01-28
1224
-
1225
- ### Documentation
1226
-
1227
- - Reorganize AGENTS.md and CLAUDE.md content
1228
- - Add git workflow and versioning guidelines to AGENTS.md
1229
- - Add commit approval workflow to CLAUDE.md
1230
- - Require explicit approval for push and publish steps
1231
-
1232
- ---
1233
-
1234
- ## [1.2.8] - 2026-01-28
1235
-
1236
- ### Added
1237
-
1238
- - New rule: `function-declaration-style` - Auto-fix function declarations to arrow expressions
1239
-
1240
- ### Enhanced
1241
-
1242
- - `function-naming-convention` - Add auto-fix for missing Handler suffix
1243
- - `absolute-imports-only` - Allow relative imports in entry files (main.tsx/main.ts)
1244
- - `absolute-imports-only` - Add pages folder to default allowed folders
1245
- - `module-index-exports` - Add pages folder to default module and lazy load folders
1246
-
1247
- ### Documentation
1248
-
1249
- - Update rule count to 61 across all docs
1250
- - Add function-declaration-style docs with func-style pairing note
1251
- - Change Tailwind CSS badge to >=3.0.0
1252
-
1253
- ### Stats
1254
-
1255
- - Total Rules: 61
1256
-
1257
- ---
1258
-
1259
- ## [1.2.7] - 2026-01-27
1260
-
1261
- - Minor fixes
1262
-
1263
- ---
1264
-
1265
- ## [1.2.6] - 2026-01-27
1266
-
1267
- - Minor fixes
1268
-
1269
- ---
1270
-
1271
- ## [1.2.5] - 2026-01-27
1272
-
1273
- ### Documentation
1274
-
1275
- - Update badges and requirements for Node.js 20, TypeScript 5, Tailwind CSS 4
1276
-
1277
- ---
1278
-
1279
- ## [1.2.4] - 2026-01-27
1280
-
1281
- ### Fixed
1282
-
1283
- - Sync eslint configs and add semi-style rule
1284
- - Add missing `component-props-destructure` rule to react config and recommended react config
1285
- - Add @stylistic/semi-style rule to all configs to enforce semicolons at end of line
1286
-
1287
- ---
1288
-
1289
- ## [1.2.3] - 2026-01-27
1290
-
1291
- ### Fixed
1292
-
1293
- - `simple-call-single-line` - Remove space before ?. when collapsing simple calls to single line
1294
-
1295
- ---
1296
-
1297
- ## [1.2.2] - 2026-01-27
1298
-
1299
- ### Enhanced
1300
-
1301
- - `variable-naming-convention` - Enforce camelCase for all variables including constants (no more SCREAMING_SNAKE_CASE)
1302
- - `function-object-destructure` - Add auto-fix for arrow expression body callbacks
1303
- - `simple-call-single-line` - Extend to collapse callbacks with params and simple expression bodies, handle optional chaining
1304
-
1305
- ---
1306
-
1307
- ## [1.2.1] - 2026-01-27
1308
-
1309
- ### Added
1310
-
1311
- - New rule: `classname-multiline` - Enforce multiline className formatting when class count > 3 or length > 80
1312
-
1313
- ### Enhanced
1314
-
1315
- - JSX className with no expressions uses "..." string literal format
1316
- - JSX className with expressions uses {`...`} template literal format
1317
- - Variables/object properties use `...` template literal for multiline
1318
- - Updated `classname-no-extra-spaces` and `jsx-string-value-trim` to skip multiline format
1319
- - Upgraded test project to Tailwind CSS v4 with eslint-plugin-tailwindcss@beta
1320
-
1321
- ---
1322
-
1323
- ## [1.2.0] - 2026-01-25
1324
-
1325
- **React Code Order & TypeScript Enhancement Rules**
1326
-
1327
- **Version Range:** v1.1.10 → v1.2.0
1328
-
1329
- ### Added
1330
-
1331
- **New Rules (5)**
1332
- - `component-props-destructure` - Enforce props destructuring in React components
1333
- - `component-props-inline-type` - Enforce inline type annotations for component props
1334
- - `function-object-destructure` - Enforce typed params with body destructuring
1335
- - `react-code-order` - Enforce consistent ordering of hooks and code blocks
1336
- - `type-annotation-spacing` - Enforce proper spacing in TypeScript type annotations
1337
-
1338
- ### Stats
1339
-
1340
- - Total Rules: 56 (was 51)
1341
-
1342
- **Full Changelog:** [v1.1.10...v1.2.0](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.1.10...v1.2.0)
1343
-
1344
- ---
1345
-
1346
- ## [1.1.10] - 2026-01-20
1347
-
1348
- - Minor fixes
1349
-
1350
- ---
1351
-
1352
- ## [1.1.9] - 2026-01-20
1353
-
1354
- ### Changed
1355
-
1356
- - Sync default folders between absolute-imports-only and module-index-exports (27 folders)
1357
- - Reorganize rules export object with alphabetically ordered categories
1358
-
1359
- ---
1360
-
1361
- ## [1.1.8] - 2026-01-20
1362
-
1363
- ### Added
1364
-
1365
- - TypeScript rules test cases in src/interfaces/, src/enums/, src/types/
1366
-
1367
- ---
1368
-
1369
- ## [1.1.7] - 2026-01-20
1370
-
1371
- ### Changed
1372
-
1373
- - Add TypeScript formatting rules to recommended and test configs:
1374
- - enum-format, interface-format, type-format, typescript-definition-location
1375
-
1376
- ---
1377
-
1378
- ## [1.1.6] - 2026-01-20
1379
-
1380
- ### Added
1381
-
1382
- - New rule: `type-format` - Enforce PascalCase with Type suffix, camelCase properties
1383
-
1384
- ---
1385
-
1386
- ## [1.1.5] - 2026-01-20
1387
-
1388
- ### Added
1389
-
1390
- - New rule: `enum-format` - Enforce PascalCase with Enum suffix, UPPER_CASE members
1391
-
1392
- ---
1393
-
1394
- ## [1.1.4] - 2026-01-20
1395
-
1396
- ### Added
1397
-
1398
- - New rule: `interface-format` - Enforce PascalCase with Interface suffix, camelCase properties
1399
-
1400
- ---
1401
-
1402
- ## [1.1.3] - 2026-01-20
1403
-
1404
- ### Added
1405
-
1406
- - New rule: `typescript-definition-location` - Enforce TypeScript definitions in designated folders
1407
-
1408
- ---
1409
-
1410
- ## [1.1.2] - 2026-01-20
1411
-
1412
- - Minor fixes
1413
-
1414
- ---
1415
-
1416
- ## [1.1.1] - 2026-01-20
1417
-
1418
- - Minor fixes
1419
-
1420
- ---
1421
-
1422
- ## [1.1.0] - 2026-01-20
1423
-
1424
- **TypeScript + Tailwind Support & Configurable Rules**
1425
-
1426
- **Version Range:** v1.0.17 → v1.1.0
1427
-
1428
- ### Added
1429
-
1430
- **New Configuration: React + TypeScript + Tailwind** (`react-ts-tw`)
1431
- - TypeScript parser and TypeScript ESLint plugin support
1432
- - Tailwind CSS plugin integration
1433
- - Perfectionist rules for sorting interfaces, enums, and object types
1434
- - Comprehensive test project with TypeScript components
1435
-
1436
- **New Rule**
1437
- - `index-export-style` - Enforce consistent export formatting in index files
1438
-
1439
- **Configurable Options**
1440
- - `array-items-per-line` - Added `maxItems` option (default: 3)
1441
- - `hook-deps-per-line` - Added `maxDeps` option (default: 2)
1442
- - `multiline-if-conditions` - Added `maxOperands` option (default: 3)
1443
- - `function-arguments-format` - New rule merging multiline argument rules with customizable options
1444
-
1445
- **Documentation**
1446
- - Added AGENTS.md for AI coding agents
1447
-
1448
- ### Changed
1449
-
1450
- - `export-format` and `import-format` - Made self-sufficient, added `maxSpecifiers` option
1451
- - `object-property-per-line` - Made self-sufficient, added `minProperties` option
1452
- - `module-index-exports` - Support TypeScript index files
1453
- - Migrated to `@stylistic/eslint-plugin` for formatting rules
1454
-
1455
- ### Stats
1456
-
1457
- - Total Rules: 51 (was 45)
1458
- - All changes are backward compatible
1459
-
1460
- **Full Changelog:** [v1.0.17...v1.1.0](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.17...v1.1.0)
1461
-
1462
- ---
1463
-
1464
- ## [1.0.41] - 2026-01-19
1465
-
1466
- - Minor fixes
1467
-
1468
- ---
1469
-
1470
- ## [1.0.40] - 2026-01-19
1471
-
1472
- - Minor fixes
1473
-
1474
- ---
1475
-
1476
- ## [1.0.39] - 2026-01-19
1477
-
1478
- - Minor fixes
1479
-
1480
- ---
1481
-
1482
- ## [1.0.38] - 2026-01-19
1483
-
1484
- - Minor fixes
1485
-
1486
- ---
1487
-
1488
- ## [1.0.37] - 2026-01-13
1489
-
1490
- - Minor fixes
1491
-
1492
- ---
1493
-
1494
- ## [1.0.36] - 2026-01-13
1495
-
1496
- - Minor fixes
1497
-
1498
- ---
1499
-
1500
- ## [1.0.35] - 2026-01-13
1501
-
1502
- - Minor fixes
1503
-
1504
- ---
1505
-
1506
- ## [1.0.34] - 2026-01-13
1507
-
1508
- - Minor fixes
1509
-
1510
- ---
1511
-
1512
- ## [1.0.33] - 2026-01-13
1513
-
1514
- - Minor fixes
1515
-
1516
- ---
1517
-
1518
- ## [1.0.32] - 2026-01-13
1519
-
1520
- - Minor fixes
1521
-
1522
- ---
1523
-
1524
- ## [1.0.31] - 2026-01-13
1525
-
1526
- - Minor fixes
1527
-
1528
- ---
1529
-
1530
- ## [1.0.30] - 2026-01-13
1531
-
1532
- - Minor fixes
1533
-
1534
- ---
1535
-
1536
- ## [1.0.29] - 2026-01-12
1537
-
1538
- - Minor fixes
1539
-
1540
- ---
1541
-
1542
- ## [1.0.28] - 2026-01-12
1543
-
1544
- ### Changed
1545
-
1546
- - **BREAKING:** Merge `multiline-argument-newline` and `multiple-arguments-per-line` into `function-arguments-format`
1547
- - Add customizable options: minArgs (default: 2), skipHooks (default: true), skipSingleArg (default: true)
1548
- - Remove @stylistic/function-call-argument-newline from recommended config
1549
-
1550
- ---
1551
-
1552
- ## [1.0.27] - 2026-01-12
1553
-
1554
- ### Enhanced
1555
-
1556
- - `index-export-style` - Handle export padding for all files
1557
- - Non-index files require blank lines between exports
1558
- - Index files have no blank lines between exports
1559
-
1560
- ---
1561
-
1562
- ## [1.0.26] - 2026-01-12
1563
-
1564
- ### Documentation
1565
-
1566
- - Clarify index-export-style and @stylistic relationship
1567
- - @stylistic handles general blank lines (return, variables, expressions)
1568
- - index-export-style handles blank line enforcement in index files
1569
-
1570
- ---
1571
-
1572
- ## [1.0.25] - 2026-01-12
1573
-
1574
- ### Enhanced
1575
-
1576
- - `object-property-per-line` - Made self-sufficient
1577
- - Rule now handles complete multiline object formatting
1578
- - Remove dependency on @stylistic/object-curly-newline
1579
-
1580
- ---
1581
-
1582
- ## [1.0.24] - 2026-01-12
1583
-
1584
- ### Enhanced
1585
-
1586
- - `export-format` and `import-format` - Made self-sufficient
1587
- - Both now handle collapse (≤ threshold) and expand (> threshold)
1588
- - Remove dependency on @stylistic/object-curly-newline for imports/exports
1589
-
1590
- ---
1591
-
1592
- ## [1.0.23] - 2026-01-12
1593
-
1594
- ### Changed
1595
-
1596
- - Migrate to @stylistic/eslint-plugin for formatting rules
1597
- - Replace 24 deprecated ESLint formatting rules with @stylistic equivalents
1598
-
1599
- ---
1600
-
1601
- ## [1.0.22] - 2026-01-11
1602
-
1603
- ### Enhanced
1604
-
1605
- - `multiline-if-conditions` - Add maxOperands configuration option (default: 3)
1606
-
1607
- ---
1608
-
1609
- ## [1.0.21] - 2026-01-11
1610
-
1611
- ### Enhanced
1612
-
1613
- - `hook-deps-per-line` - Add maxDeps configuration option (default: 2)
1614
-
1615
- ---
1616
-
1617
- ## [1.0.20] - 2026-01-11
1618
-
1619
- ### Enhanced
1620
-
1621
- - `array-items-per-line` - Add maxItems configuration option (default: 3)
1622
-
1623
- ---
1624
-
1625
- ## [1.0.19] - 2026-01-11
1626
-
1627
- - Version bump
1628
-
1629
- ---
1630
-
1631
- ## [1.0.18] - 2026-01-11
1632
-
1633
- ### Enhanced
1634
-
1635
- - `import-format` and `export-format` - Add maxSpecifiers option (default: 3)
1636
- - `object-property-per-line` - Add minProperties option (default: 2)
1637
- - Remove eslint-plugin-newline dependency (redundant with object-curly-newline)
1638
-
1639
- ---
1640
-
1641
- ## [1.0.17] - 2026-01-11
1642
-
1643
- ### Documentation
1644
-
1645
- - Update rule count from 47 to 48 in all README files
1646
- - Add coverage, public, and .vite to eslint config ignores
1647
-
1648
- ---
1649
-
1650
- ## [1.0.16] - 2026-01-09
1651
-
1652
- **New Rule: index-export-style**
1653
-
1654
- **Version Range:** v1.0.15 → v1.0.16
1655
-
1656
- ### Added
1657
-
1658
- **New Rule**
1659
- - `index-export-style` - Enforce consistent export style in index files 🔧
1660
- - Support two styles: 'shorthand' (default) and 'import-export'
1661
- - Shorthand: `export { a } from './file';`
1662
- - Import-export: `import { a } from './file'; export { a };`
1663
- - Auto-fixable with eslint --fix
1664
- - Detects and reports mixed export styles
1665
-
1666
- ### Stats
1667
-
1668
- - Total Rules: 48 (was 47)
1669
-
1670
- **Full Changelog:** [v1.0.15...v1.0.16](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.15...v1.0.16)
1671
-
1672
- ---
1673
-
1674
- ## [1.0.15] - 2026-01-09
1675
-
1676
- ### Added
1677
-
1678
- - Additional perfectionist rules to recommended React config:
1679
- - perfectionist/sort-array-includes
1680
- - perfectionist/sort-maps
1681
- - perfectionist/sort-sets
1682
- - perfectionist/sort-switch-case
1683
- - perfectionist/sort-variable-declarations
1684
-
1685
- ---
1686
-
1687
- ## [1.0.14] - 2026-01-06
1688
-
1689
- **Customizable Rules, Recommended Configs & Documentation Overhaul**
1690
-
1691
- **Version Range:** v1.0.8 → v1.0.14
1692
-
1693
- ### Added
1694
-
1695
- **Customizable Folder Options**
1696
- - `absolute-imports-only` - Add extraAllowedFolders, extraReduxSubfolders, extraDeepImportFolders options
1697
- - `module-index-exports` - Add extraModuleFolders, extraLazyLoadFolders, extraIgnorePatterns options
1698
- - Users can now extend default folder lists without replacing them
1699
-
1700
- **Recommended ESLint Configurations**
1701
- - Add recommended-configs/react/ folder with model eslint.config.js
1702
- - Include comprehensive README with installation and plugin documentation
1703
-
1704
- **Comprehensive Documentation**
1705
- - Add comprehensive examples for all 47 rules in README
1706
- - Enhance README with emojis, rules summary table, and introduction section
1707
-
1708
- ### Changed
1709
-
1710
- - Standardized all internal helper function names with `Handler` suffix
1711
-
1712
- ### Documentation
1713
-
1714
- - Add comprehensive block comments to all ESLint rules with good/bad examples
1715
-
1716
- ### Stats
1717
-
1718
- - Total Rules: 47
1719
-
1720
- **Full Changelog:** [v1.0.8...v1.0.14](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.8...v1.0.14)
1721
-
1722
- ---
1723
-
1724
- ## [1.0.13] - 2026-01-06
1725
-
1726
- ### Added
1727
-
1728
- - Recommended ESLint configurations for React projects
1729
- - recommended-configs/react/ folder with model eslint.config.js
1730
-
1731
- ---
1732
-
1733
- ## [1.0.12] - 2026-01-06
1734
-
1735
- ### Documentation
1736
-
1737
- - Enhance README with emojis, rules summary table, and introduction section
1738
-
1739
- ---
1740
-
1741
- ## [1.0.11] - 2026-01-06
1742
-
1743
- ### Documentation
1744
-
1745
- - Add comprehensive examples for all 47 rules in README
1746
-
1747
- ---
1748
-
1749
- ## [1.0.10] - 2026-01-06
1750
-
1751
- ### Documentation
1752
-
1753
- - Update README file and TypeScript rules types
1754
-
1755
- ---
1756
-
1757
- ## [1.0.9] - 2026-01-06
1758
-
1759
- ### Changed
1760
-
1761
- - Standardize internal helper function names with Handler suffix
1762
- - All check*, is*, get*, has* functions renamed
1763
-
1764
- ---
1765
-
1766
- ## [1.0.8] - 2026-01-06
1767
-
1768
- ### Documentation
1769
-
1770
- - Add comprehensive block comments to all ESLint rules
1771
- - Each rule has title, description, and good/bad code examples
1772
-
1773
- ---
1774
-
1775
- ## [1.0.7] - 2026-01-06
1776
-
1777
- **TypeScript Type Definitions for IDE Support**
1778
-
1779
- **Version Range:** v1.0.6 → v1.0.7
1780
-
1781
- ### Added
1782
-
1783
- **TypeScript Support**
1784
- - Add TypeScript type definitions for IDE support (index.d.ts)
1785
- - Export all 47 rule names as literal types for autocomplete
1786
- - Add PluginRules interface mapping rules to Rule.RuleModule
1787
- - Include module augmentation for ESLint's Linter.RulesRecord
1788
-
1789
- ### Stats
1790
-
1791
- - Total Rules: 47
1792
-
1793
- **Full Changelog:** [v1.0.6...v1.0.7](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.6...v1.0.7)
1794
-
1795
- ---
1796
-
1797
- ## [1.0.6] - 2026-01-06
1798
-
1799
- **Initial Public Release**
1800
-
1801
- ### Added
1802
-
1803
- - 45+ auto-fixable ESLint rules for React/JSX projects
1804
- - Full support for ESLint v9+ flat config
1805
- - Zero dependencies (except peer dependency on ESLint)
1806
-
1807
- ### Requirements
1808
-
1809
- - ESLint >= 9.0.0
1810
- - Node.js >= 20.0.0
1811
-
1812
- ### Stats
1813
-
1814
- - Total Rules: 45+
1815
-
1816
- **Full Changelog:** [v1.0.6](https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/releases/tag/v1.0.6)
1817
-
1818
- ---
1819
-
1820
- ## [1.0.5] - 2026-01-06
1821
-
1822
- - Pre-release version
1823
-
1824
- ---
1825
-
1826
- ## [1.0.4] - 2026-01-06
1827
-
1828
- - Pre-release version
1829
-
1830
- ---
1831
-
1832
- ## [1.0.3] - 2026-01-06
1833
-
1834
- - Pre-release version
1835
-
1836
- ---
1837
-
1838
- ## [1.0.2] - 2026-01-06
1839
-
1840
- - Pre-release version
1841
-
1842
- ---
1843
-
1844
- [1.17.2]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.17.1...v1.17.2
1845
- [1.17.1]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.17.0...v1.17.1
1846
- [1.17.0]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.16.0...v1.17.0
1847
- [1.16.0]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.15.0...v1.16.0
1848
- [1.15.0]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.14.4...v1.15.0
1849
- [1.14.4]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.14.3...v1.14.4
1850
- [1.14.3]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.14.2...v1.14.3
1851
- [1.14.2]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.14.1...v1.14.2
1852
- [1.14.1]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.14.0...v1.14.1
1853
- [1.14.0]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.13.0...v1.14.0
1854
- [1.13.0]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.12.1...v1.13.0
1855
- [1.12.1]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.12.0...v1.12.1
1856
- [1.12.0]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.11.9...v1.12.0
1857
- [1.11.9]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.11.8...v1.11.9
1858
- [1.11.8]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.11.7...v1.11.8
1859
- [1.11.7]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.11.6...v1.11.7
1860
- [1.11.6]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.11.5...v1.11.6
1861
- [1.11.5]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.11.4...v1.11.5
1862
- [1.11.4]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.11.3...v1.11.4
1863
- [1.11.3]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.11.2...v1.11.3
1864
- [1.11.2]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.11.1...v1.11.2
1865
- [1.11.1]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.11.0...v1.11.1
1866
- [1.11.0]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.10.3...v1.11.0
1867
- [1.10.3]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.10.2...v1.10.3
1868
- [1.10.2]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.10.1...v1.10.2
1869
- [1.10.1]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.10.0...v1.10.1
1870
- [1.10.0]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.9.7...v1.10.0
1871
- [1.9.7]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.9.6...v1.9.7
1872
- [1.9.6]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.9.5...v1.9.6
1873
- [1.9.5]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.9.4...v1.9.5
1874
- [1.9.4]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.9.3...v1.9.4
1875
- [1.9.3]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.9.2...v1.9.3
1876
- [1.9.2]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.9.1...v1.9.2
1877
- [1.9.1]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.9.0...v1.9.1
1878
- [1.9.0]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.8.4...v1.9.0
1879
- [1.8.4]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.8.3...v1.8.4
1880
- [1.8.3]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.8.2...v1.8.3
1881
- [1.8.2]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.8.1...v1.8.2
1882
- [1.8.1]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.8.0...v1.8.1
1883
- [1.8.0]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.7.6...v1.8.0
1884
- [1.7.6]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.7.5...v1.7.6
1885
- [1.7.5]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.7.4...v1.7.5
1886
- [1.7.4]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.7.3...v1.7.4
1887
- [1.7.3]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.7.2...v1.7.3
1888
- [1.7.2]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.7.1...v1.7.2
1889
- [1.7.1]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.7.0...v1.7.1
1890
- [1.7.0]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.6.6...v1.7.0
1891
- [1.6.6]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.6.5...v1.6.6
1892
- [1.6.5]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.6.4...v1.6.5
1893
- [1.6.4]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.6.3...v1.6.4
1894
- [1.6.3]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.6.2...v1.6.3
1895
- [1.6.2]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.6.1...v1.6.2
1896
- [1.6.1]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.6.0...v1.6.1
1897
- [1.6.0]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.5.2...v1.6.0
1898
- [1.5.2]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.5.1...v1.5.2
1899
- [1.5.1]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.5.0...v1.5.1
1900
- [1.5.0]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.4.5...v1.5.0
1901
- [1.4.5]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.4.3...v1.4.5
1902
- [1.4.3]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.4.2...v1.4.3
1903
- [1.4.2]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.4.1...v1.4.2
1904
- [1.4.1]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.4.0...v1.4.1
1905
- [1.4.0]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.3.11...v1.4.0
1906
- [1.3.11]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.3.10...v1.3.11
1907
- [1.3.10]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.3.9...v1.3.10
1908
- [1.3.9]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.3.8...v1.3.9
1909
- [1.3.8]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.3.7...v1.3.8
1910
- [1.3.7]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.3.6...v1.3.7
1911
- [1.3.6]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.3.5...v1.3.6
1912
- [1.3.5]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.3.4...v1.3.5
1913
- [1.3.4]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.3.3...v1.3.4
1914
- [1.3.3]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.3.2...v1.3.3
1915
- [1.3.2]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.3.1...v1.3.2
1916
- [1.3.1]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.3.0...v1.3.1
1917
- [1.3.0]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.2.9...v1.3.0
1918
- [1.2.9]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.2.8...v1.2.9
1919
- [1.2.8]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.2.7...v1.2.8
1920
- [1.2.7]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.2.6...v1.2.7
1921
- [1.2.6]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.2.5...v1.2.6
1922
- [1.2.5]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.2.4...v1.2.5
1923
- [1.2.4]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.2.3...v1.2.4
1924
- [1.2.3]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.2.2...v1.2.3
1925
- [1.2.2]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.2.1...v1.2.2
1926
- [1.2.1]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.2.0...v1.2.1
1927
- [1.2.0]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.1.10...v1.2.0
1928
- [1.1.10]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.1.9...v1.1.10
1929
- [1.1.9]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.1.8...v1.1.9
1930
- [1.1.8]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.1.7...v1.1.8
1931
- [1.1.7]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.1.6...v1.1.7
1932
- [1.1.6]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.1.5...v1.1.6
1933
- [1.1.5]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.1.4...v1.1.5
1934
- [1.1.4]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.1.3...v1.1.4
1935
- [1.1.3]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.1.2...v1.1.3
1936
- [1.1.2]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.1.1...v1.1.2
1937
- [1.1.1]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.1.0...v1.1.1
1938
- [1.1.0]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.41...v1.1.0
1939
- [1.0.41]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.40...v1.0.41
1940
- [1.0.40]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.39...v1.0.40
1941
- [1.0.39]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.38...v1.0.39
1942
- [1.0.38]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.37...v1.0.38
1943
- [1.0.37]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.36...v1.0.37
1944
- [1.0.36]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.35...v1.0.36
1945
- [1.0.35]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.34...v1.0.35
1946
- [1.0.34]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.33...v1.0.34
1947
- [1.0.33]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.32...v1.0.33
1948
- [1.0.32]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.31...v1.0.32
1949
- [1.0.31]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.30...v1.0.31
1950
- [1.0.30]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.29...v1.0.30
1951
- [1.0.29]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.28...v1.0.29
1952
- [1.0.28]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.27...v1.0.28
1953
- [1.0.27]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.26...v1.0.27
1954
- [1.0.26]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.25...v1.0.26
1955
- [1.0.25]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.24...v1.0.25
1956
- [1.0.24]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.23...v1.0.24
1957
- [1.0.23]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.22...v1.0.23
1958
- [1.0.22]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.21...v1.0.22
1959
- [1.0.21]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.20...v1.0.21
1960
- [1.0.20]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.19...v1.0.20
1961
- [1.0.19]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.18...v1.0.19
1962
- [1.0.18]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.17...v1.0.18
1963
- [1.0.17]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.16...v1.0.17
1964
- [1.0.16]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.15...v1.0.16
1965
- [1.0.15]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.14...v1.0.15
1966
- [1.0.14]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.13...v1.0.14
1967
- [1.0.13]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.12...v1.0.13
1968
- [1.0.12]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.11...v1.0.12
1969
- [1.0.11]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.10...v1.0.11
1970
- [1.0.10]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.9...v1.0.10
1971
- [1.0.9]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.8...v1.0.9
1972
- [1.0.8]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.7...v1.0.8
1973
- [1.0.7]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.6...v1.0.7
1974
- [1.0.6]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.5...v1.0.6
1975
- [1.0.5]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.4...v1.0.5
1976
- [1.0.4]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.3...v1.0.4
1977
- [1.0.3]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/compare/v1.0.2...v1.0.3
1978
- [1.0.2]: https://github.com/Mohamed-Elhawary/eslint-plugin-code-style/releases/tag/v1.0.2