Releases: ESLint-Plugin-Code-Style/plugin
Organization Migration, Automated Website Sync & Context7 Integration
Version Range: v3.0.6 → v3.1.0
Changed
- Organization - Moved repository from
Mohamed-Elhawary/eslint-plugin-code-styletoESLint-Plugin-Code-Style/pluginunder a dedicated GitHub organization - Website - Extracted documentation website into a separate repository (
ESLint-Plugin-Code-Style/website), fully independent with no local cross-repo dependencies - Structure - Moved
docs/rules/torules/at the root level, removeddocs/directory - Sync - Replaced manual website sync with fully automated pipeline via
metadata.jsonand GitHub Actions (repository_dispatch) - Website - All hardcoded rule counts (30+ instances) replaced with dynamic imports from auto-generated data
- URLs - Updated all GitHub URLs across README, AGENTS, package.json, recommended configs, and website source code to new org
Added
metadata.json- Single source of truth for all rule data, version, examples, options, and metadata consumed by the website.github/workflows/sync-website.yml- GitHub Action to trigger website sync on plugin changescontext7.json- Context7 library ownership claim- Automated website pipeline: plugin push → GitHub Action → website fetches metadata + changelog → auto-generates rules.ts, config.ts, navigation.ts → Vercel deploys
Fixed
- All ESLint errors in the documentation website resolved (plugin's own rules applied as showcase)
- Removed all stale references to old
docs/website/structure - Removed
validate-sync.js(redundant with automated sync)
Full Changelog: v3.0.6...v3.1.0
Documentation Website, Next.js Compatibility & ESLint v10 Support
Version Range: v2.2.5 → v3.0.0
Added
- Production-quality documentation website (
docs/website/) built with Next.js 15, React 19, Tailwind CSS v4, and TypeScript — deployed at https://www.eslint-plugin-code-style.org- Landing page with hero section, feature highlights, stats, and quick-start guide
- Getting Started, Configuration, Philosophy, and Contributing guide pages
- Rules Reference with all 81 rules across 17 category pages — descriptions, rationale, options, good/bad code examples
- Dark/light mode with system preference detection
- Responsive layout with sidebar navigation and mobile support
- Polished code blocks with copy-to-clipboard and horizontal scrolling
- Per-page SEO metadata (title, description, OpenGraph)
- Full ESLint compliance with the
react-ts-twrecommended config (0 errors, 0 rules disabled) - All hardcoded strings extracted to centralized data files
- Plugin version sourced from single
docs/website/src/data/config.tsconstant
- ESLint v10 recommended configurations for all 4 project types (
recommended-configs/v10/)- v10 configs use
@eslint-react/eslint-plugininstead ofeslint-plugin-reactandeslint-plugin-react-hooks - READMEs with migration guide and plugin mapping table for each v10 config
- v10 configs use
- ESLint v10 test projects (
_tests_/v10/) for all 4 project types - Website sync requirements in AGENTS.md and CLAUDE.md — complete checklist for keeping the website 100% in sync with plugin changes
Enhanced
function-naming-convention— Skip Next.js reserved exports (generateMetadata,generateStaticParams,generateViewport,GET,POST,PUT,DELETE,PATCH,HEAD,OPTIONS); add 16 new verbs (notify,broadcast,emit,dispatch,join,combine,bind, etc.)folder-based-naming-convention— Skip Next.js special folder patterns ([slug],(group),@parallel,_private) insideapp/directoryfolder-structure-consistency— Skip files inside Next.jsapp/directorymodule-index-exports— Skip Next.js reserved filenames (page,layout,loading,error,not-found,template,default,route,middleware)- Added
.next/**to ignores in all recommended config and test project ESLint configs
Changed
- Reorganized recommended configs into
recommended-configs/v9/andrecommended-configs/v10/ - Reorganized test projects into
_tests_/v9/and_tests_/v10/ - Homepage URL changed to https://www.eslint-plugin-code-style.org
- Website domain added to README.md and docs/rules/README.md
Removed
docs/frontend-guide/folder (moved to separate repository)
BREAKING CHANGES
- Recommended config paths changed:
recommended-configs/react/→recommended-configs/v9/react/(same for all 4 variants) - Test project paths changed:
_tests_/react/→_tests_/v9/react/(same for all 4 variants) - Removed
docs/frontend-guide/directory
Full Changelog: v2.2.5...v3.0.0
Originally released on 2026-03-26
New Rule, Component Naming Enhancements & Folder Flattening Detection
Version Range: v2.1.1 → v2.2.0
Added
New Rules (1)
hook-function-naming-convention- Enforce that exported hook function names match the camelCase of the file name (e.g.,use-create-super-admin.tsmust exportuseCreateSuperAdmin) 🔧
New Features
folder-based-naming-convention— Singularize plural folder names in component chain for named files (e.g.,discount/types/code.tsx→CodeTypeDiscountnotCodeTypesDiscount); index files keep pluralfolder-based-naming-convention— ConfigurablechainOrderoption:"child-parent"(default) or"parent-child"with per-path overrides viafilesarrayfolder-structure-consistency— Detect unnecessary nesting when a folder has only one subfolder and no direct code files, suggesting flattening (e.g.,discount/types/→discount-types/)
Enhanced
folder-based-naming-convention— Now configurable withchainOrderandfilesoptions ⚙️no-redundant-folder-suffix— SharedsingularizeHandlerextracted to module level for reuse
Fixed
function-object-destructure— Skip array method callbacks, add auto-fix for destructure-and-return pattern (from v2.1.1)
Stats
- Total Rules: 81 (was 80)
- Auto-fixable: 71 rules 🔧 (was 70)
- Configurable: 20 rules ⚙️ (was 19)
- Report-only: 10 rules
Full Changelog: v2.1.1...v2.2.0
Originally released on 2026-02-24
New Rule: Hook File Naming Convention + 18 Fixes & Enhancements
Version Range: v2.0.18 → v2.1.0
Added
New Rules (1)
hook-file-naming-convention- Enforce naming conventions for hook files insidehooks/module subfolders: verb hooks must followuse-{verb}-{module-singular}, list hooks must followuse-{module-plural}-list
Enhanced
nested-call-closing-brackets— Collapse closing)onto the same line as arrow function body for single-arg calls (block bodies, expression bodies, ternaries), removing trailing commasopening-brackets-same-line— Collapsefn(\n () =>tofn(() =>for zero-param arrow callbacks; split destructured callback params with 2+ properties to multi-line; move arrow body to=>line for destructured callback paramsno-redundant-folder-suffix— Added exception for hook files (use-*) insidehooks/folders, since they intentionally include the module name as required byhook-file-naming-convention
Fixed
folder-structure-consistency— Enforce consistency in nested subfolders (e.g.,components/shared/), not just top-level module folders; treat index-file folders and folders with subdirectories as justified wrappingno-redundant-folder-suffix— Detect plural folder suffix in file names (e.g.,auth-interfaces.tsininterfaces/folder), not just singular formsfolder-based-naming-convention— Flag PascalCase names in camelCase folders and auto-fix to camelCase; enforce PascalCase forproviders/folder; detect wrong-folder placement by suffix; enforce file name + folder chain in camelCase naming; addschemasfolder withSchemasuffixsingle-argument-on-one-line— Collapse method chain inter-call line breaks; collapse method chains to one line when all calls have ≤1 simple argument; skip multi-line template literalsno-hardcoded-strings— Fix Tailwind class regex to handle decimal values; detect any function call insideclassNameas a class utility; skip strings inside class utility calls; added missing single-word Tailwind utilitiescomponent-naming— Skip generic grouping folders (shared,common,ui,base,general,core) when chaining folder namesopening-brackets-same-line— CollapseBinaryExpression,LogicalExpression, andUnaryExpressionin JSX attributes to single linefunction-arguments-format— Remove trailing comma for single template literal arguments; skip singleTemplateLiteralargumentstype-annotation-spacing— No trailing comma on last generic type parameter; single generic collapses inline; multiple generics expand to separate linestype-format— Enforce trailing comma on last property; detect nested type literals inside array types; closing brace on own line for 2+ properties; single-property collapse; union types with multi-property objects stay expanded; intersection type formattingfunction-object-destructure— Recognize components insideReact.forwardRef(),memo(),observer()wrapper callsenum-type-enforcement— Auto-fix only replaces string literals when enum exists in scopevariable-naming-convention— Allow PascalCase for component re-exports from PascalCase namespacesfunction-params-per-line— Destructured properties in callback arrow params get one-per-line formattingarrow-function-simple-jsx— Fixed multiline JSX collapse and missing space after=>classname-multiline— Added CallExpression handler for class utility callsabsolute-imports-only— Auto-fix deep import violations; auto-fix absolute imports to relative within same modulecomponent-props-inline-type— Skip qualified library types (React.HTMLAttributes, etc.)
Stats
- Total Rules: 80 (was 79)
- Auto-fixable: 70 rules 🔧
- Configurable: 19 rules ⚙️
- Report-only: 10 rules (was 9)
Full Changelog: v2.0.18...v2.1.0
Originally released on 2026-02-19
Modular Source Architecture + Minified Build
Version Range: v1.20.0 → v2.0.0
Changed
- BREAKING: Modular source architecture — Split monolithic 23K-line
index.jsintosrc/with 17 category files + shared utilitiessrc/index.js— Entry point importing all rulessrc/rules/*.js— 17 category files (arrays, arrow-functions, call-expressions, classes, comments, components, control-flow, functions, hooks, imports-exports, jsx, objects, react, spacing, strings, typescript, variables)src/utils/tailwind.js— Shared Tailwind CSS class utilities
- Build system — Added esbuild to bundle and minify
src/intodist/index.jsnpm run buildgenerates the bundled output- Output is ~269 KB (was ~1 MB), a 73% reduction
- Package entry point —
mainandexportsnow point todist/index.jsinstead ofindex.js - npm package — Publishes
dist/index.jsinstead of rootindex.js; removed rootindex.jsfrom package
Added
esbuild.config.js— Build configurationesbuildas devDependencynpm run buildscript
Stats
- Total Rules: 79
- Auto-fixable: 70 rules 🔧
- Configurable: 19 rules ⚙️
- Report-only: 9 rules
- Unpacked size: ~400 KB (was ~1.26 MB)
Full Changelog: v1.20.0...v2.0.0
Originally released on 2026-02-09
README Reorganization — Split Rules Reference into docs/rules/
Version Range: v1.19.0 → v1.20.0
Added
- Rules Reference Documentation (
docs/rules/) — 17 category files with detailed rule documentation, examples, and configuration optionsarrays.md,arrow-functions.md,call-expressions.md,classes.md,comments.md,components.md,control-flow.md,functions.md,hooks.md,imports-exports.md,jsx.md,objects.md,react.md,spacing.md,strings.md,typescript.md,variables.md
- Rules index page (
docs/rules/README.md) — Overview table linking to all 17 category files
Changed
- README.md — Reorganized from ~4,150 lines to ~475 lines by moving detailed rule documentation to
docs/rules/- Kept: badges, Why This Plugin, Recommended Configs, Features, Installation, Quick Start, Enable All Rules, Rules Summary table, Rules Reference links, Auto-fixing, Disabling Rules, Contributing, License
- Moved: All detailed rule examples, options, and explanations to
docs/rules/category files
- Recommended config READMEs — Updated rule documentation links to point to
docs/rules/instead of main README - AGENTS.md — Updated documentation references to reflect new
docs/rules/structure - package.json — Added
docs/to npmfilesarray
Full Changelog: v1.19.0...v1.20.0
Originally released on 2026-02-09
New: React + Tailwind Test Project & Recommended Config
Version Range: v1.18.0 → v1.19.0
Added
- React + Tailwind test project (
_tests_/react-tw/) — React + Tailwind CSS project (no TypeScript) with 70 code-style rules enabled and Tailwind CSS v4 plugin - React + Tailwind recommended config (
recommended-configs/react-tw/) — Ready-to-use ESLint flat config for React + Tailwind CSS projects without TypeScript- Includes 70 JavaScript-compatible code-style rules, Tailwind CSS plugin, and recommended third-party plugins
- Documented with installation instructions, rule explanations, and customization guide
Changed
- Updated Available Configurations table in README.md — React + Tailwind now links to config instead of "Coming Soon"
- Updated AGENTS.md — React + Tailwind marked as Available with folder paths
Full Changelog: v1.18.0...v1.19.0
Originally released on 2026-02-09
New: React + TypeScript Test Project & Recommended Config
Version Range: v1.17.2 → v1.18.0
Added
- React + TypeScript test project (
_tests_/react-ts/) — React + TypeScript project (no Tailwind) with all 79 code-style rules enabled and @typescript-eslint parser - React + TypeScript recommended config (
recommended-configs/react-ts/) — Ready-to-use ESLint flat config for React + TypeScript projects without Tailwind CSS- Includes all 79 code-style rules, TypeScript parser, and recommended third-party plugins
- Documented with installation instructions, rule explanations, and customization guide
Changed
- Updated Available Configurations table in README.md — React + TypeScript now links to config instead of "Coming Soon"
- Updated AGENTS.md — React + TypeScript marked as Available with folder paths
Full Changelog: v1.17.2...v1.18.0
Originally released on 2026-02-09
New Rule + Enhancements to Naming & Import Rules
Version Range: v1.16.0 → v1.17.0
Added
New Rules (1)
inline-export-declaration- Enforce inline export declarations (export const x = ...) instead of grouped export statements (export { x }) in non-index files 🔧- Auto-fixable: adds
exportto each declaration and removes the grouped export statement - Skips index files (barrel re-exports) and aliased exports (
export { a as b })
- Auto-fixable: adds
Enhanced
folder-based-naming-convention- Extended camelCase suffix enforcement for data/constants/strings/services/reducers folders- Exports in
data/must end withData(e.g.,buttonTypeData) - Exports in
constants/must end withConstants(e.g.,localeConstants) - Exports in
strings/must end withStrings(e.g.,appStrings) - Exports in
services/must end withService,reducers/withReducer
- Exports in
absolute-imports-only- Files within the same module folder must use relative imports instead of absolute to avoid circular dependencies 🔧- Detects files at any depth inside module folders (e.g.,
data/auth/login/guest.tsx) - Allows both
./and../relative imports within the same module folder - Auto-fixes absolute imports to own module folder (e.g.,
@/data/auth/login/guest→../../login/guest) - Now marked as auto-fixable (
fixable: "code")
- Detects files at any depth inside module folders (e.g.,
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
Stats
- Total Rules: 79 (was 78)
- Auto-fixable: 70 rules (was 69) 🔧
- Configurable: 19 rules (was 18)
- Report-only: 9 rules (was 10)
Full Changelog: v1.16.0...v1.17.0
Originally released on 2026-02-09
New Rule + Enhancements + Rule Renames
Version Range: v1.15.0 → v1.16.0
Added
New Rules (1)
folder-structure-consistency- Enforce consistent folder structure (flat vs wrapped) in module folders- Applies to all module folders (same list as
module-index-exports) - Detects mixed structures (some flat files, some in subfolders)
- Flags unnecessary wrapper folders when each has only one file
- Configurable
moduleFoldersandextraModuleFoldersoptions
- Applies to all module folders (same list as
Enhanced
folder-based-naming-convention(renamed fromfolder-component-suffix)- Support nested files with chained folder names (e.g.,
layouts/auth/login.tsx→LoginAuthLayout) - Match files at any depth within module folders
- Expanded to cover: views, layouts, pages, providers, reducers, services, contexts, themes (with suffix), atoms and components (chaining only, no suffix)
- Added
VariableDeclaratordetection for non-JSX folders (contexts, themes)
- Support nested files with chained folder names (e.g.,
no-redundant-folder-suffix- Also check folder names for redundant suffixes (e.g.,views/access-control-view/is now flagged)
Renamed
folder-component-suffix→folder-based-naming-convention(now handles more than just components)svg-component-icon-naming→svg-icon-naming-convention(consistent with other naming convention rules)
Stats
- Total Rules: 78 (was 77)
- Auto-fixable: 67 rules
- Configurable: 18 rules (was 17)
- Report-only: 11 rules (was 10)
Full Changelog: v1.15.0...v1.16.0
Originally released on 2026-02-09