eslint-plugin-code-style 2.2.2 → 3.0.0

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.
Files changed (3) hide show
  1. package/README.md +41 -16
  2. package/dist/index.js +262 -262
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -27,7 +27,7 @@
27
27
 
28
28
  ## 🎯 Why This Plugin?
29
29
 
30
- This plugin provides **81 custom rules** (71 auto-fixable, 20 configurable) for code formatting. Built for **ESLint v9 flat configs**.
30
+ This plugin provides **81 custom rules** (71 auto-fixable, 20 configurable) for code formatting. Built for **ESLint v9+ flat configs** (v9 and v10 supported).
31
31
 
32
32
  > **Note:** ESLint [deprecated 79 formatting rules](https://eslint.org/blog/2023/10/deprecating-formatting-rules/) in v8.53.0. Our recommended configs use `@stylistic/eslint-plugin` as the replacement for these deprecated rules.
33
33
 
@@ -44,6 +44,7 @@ When combined with ESLint's native rules and other popular plugins, this package
44
44
 
45
45
  <br />
46
46
 
47
+ [Documentation](https://eslint-plugin-code-style.vercel.app) •
47
48
  [Installation](#-installation) •
48
49
  [Quick Start](#-quick-start) •
49
50
  [Recommended Configs](#-recommended-configurations) •
@@ -67,20 +68,36 @@ We provide **ready-to-use ESLint flat configuration files** that combine `eslint
67
68
 
68
69
  ### 📋 Available Configurations
69
70
 
70
- | Configuration | Description | Status |
71
- |---------------|-------------|--------|
72
- | **React** | React.js projects (JavaScript, JSX) | [View Config](./recommended-configs/react/) |
73
- | **React + TS + Tailwind** | React + TypeScript + Tailwind CSS | [View Config](./recommended-configs/react-ts-tw/) |
74
- | **React + TypeScript** | React + TypeScript projects | [View Config](./recommended-configs/react-ts/) |
75
- | **React + Tailwind** | React + Tailwind CSS projects | [View Config](./recommended-configs/react-tw/) |
71
+ Configs are organized by ESLint version:
72
+
73
+ #### ESLint v9 (`recommended-configs/v9/`)
74
+
75
+ | Configuration | Description | Link |
76
+ |---------------|-------------|------|
77
+ | **React** | React.js projects (JavaScript, JSX) | [View Config](./recommended-configs/v9/react/) |
78
+ | **React + TypeScript** | React + TypeScript projects | [View Config](./recommended-configs/v9/react-ts/) |
79
+ | **React + Tailwind** | React + Tailwind CSS projects | [View Config](./recommended-configs/v9/react-tw/) |
80
+ | **React + TS + Tailwind** | React + TypeScript + Tailwind CSS | [View Config](./recommended-configs/v9/react-ts-tw/) |
81
+
82
+ #### ESLint v10 (`recommended-configs/v10/`)
83
+
84
+ | Configuration | Description | Link |
85
+ |---------------|-------------|------|
86
+ | **React** | React.js projects (JavaScript, JSX) | [View Config](./recommended-configs/v10/react/) |
87
+ | **React + TypeScript** | React + TypeScript projects | [View Config](./recommended-configs/v10/react-ts/) |
88
+ | **React + Tailwind** | React + Tailwind CSS projects | [View Config](./recommended-configs/v10/react-tw/) |
89
+ | **React + TS + Tailwind** | React + TypeScript + Tailwind CSS | [View Config](./recommended-configs/v10/react-ts-tw/) |
90
+
91
+ > **ESLint v10 note:** The v10 configs replace `eslint-plugin-react` and `eslint-plugin-react-hooks` with `@eslint-react/eslint-plugin`, and remove `eslint-plugin-jsx-a11y` (no v10-compatible version available).
76
92
 
77
93
  ### ⚡ Quick Start with Recommended Config
78
94
 
79
95
  1. Navigate to the [recommended-configs](./recommended-configs/) folder
80
- 2. Choose the configuration for your project type
81
- 3. Follow the installation instructions in the README
82
- 4. Copy the `eslint.config.js` to your project root
83
- 5. Run `eslint src/ --fix`
96
+ 2. Choose `v9/` or `v10/` based on your ESLint version
97
+ 3. Choose the configuration for your project type
98
+ 4. Follow the installation instructions in the README
99
+ 5. Copy the `eslint.config.js` to your project root
100
+ 6. Run `eslint src/ --fix`
84
101
 
85
102
  > **Note:** Each configuration includes a detailed README with installation commands, plugin explanations, and rule documentation.
86
103
 
@@ -110,8 +127,8 @@ Built specifically for React projects with comprehensive JSX formatting rules.
110
127
  <tr>
111
128
  <td width="50%">
112
129
 
113
- ### ✅ ESLint v9+ Ready
114
- Designed for ESLint's new flat config system. Modern and future-proof.
130
+ ### ✅ ESLint v9 & v10 Ready
131
+ Designed for ESLint's flat config system. Supports both ESLint v9 and v10 with dedicated recommended configurations.
115
132
 
116
133
  </td>
117
134
  <td width="50%">
@@ -271,7 +288,9 @@ rules: {
271
288
 
272
289
  ## 📖 Rules Categories
273
290
 
274
- > **81 rules total** — 71 with auto-fix 🔧, 20 configurable ⚙️, 10 report-only. See detailed examples in the [Rules Reference](./docs/rules/).
291
+ > **81 rules total** — 71 with auto-fix 🔧, 20 configurable ⚙️, 10 report-only
292
+ >
293
+ > 📖 **Full documentation with examples:** [eslint-plugin-code-style.vercel.app](https://eslint-plugin-code-style.vercel.app/docs/rules) • [Local docs](./docs/rules/)
275
294
  >
276
295
  > **Legend:** 🔧 Auto-fixable with `eslint --fix` • ⚙️ Customizable options
277
296
 
@@ -382,7 +401,7 @@ rules: {
382
401
 
383
402
  ## 📖 Rules Reference
384
403
 
385
- For detailed documentation with examples, configuration options, and best practices for each rule, see the **[Rules Reference Documentation](./docs/rules/)**.
404
+ For detailed documentation with examples, configuration options, and best practices for each rule, see the **[Rules Reference Documentation](https://eslint-plugin-code-style.vercel.app/docs/rules)** or the [local docs](./docs/rules/).
386
405
 
387
406
  | Category | Rules | Highlights |
388
407
  |----------|:-----:|------------|
@@ -447,6 +466,12 @@ rules: {
447
466
 
448
467
  <br />
449
468
 
469
+ ## 📖 Documentation
470
+
471
+ Full documentation is available at **[eslint-plugin-code-style.vercel.app](https://eslint-plugin-code-style.vercel.app)** — including installation guides, configuration examples, and detailed rule references with good/bad code examples.
472
+
473
+ <br />
474
+
450
475
  ## 🤝 Contributing
451
476
 
452
477
  Contributions are welcome! Please feel free to submit a Pull Request.
@@ -454,7 +479,7 @@ Contributions are welcome! Please feel free to submit a Pull Request.
454
479
  1. Fork the repository
455
480
  2. Create your feature branch (`git checkout -b feature/amazing-feature`)
456
481
  3. Build the project (`npm run build`)
457
- 4. Test your changes in all 4 test projects (`cd _tests_/react-ts-tw && npm run lint`)
482
+ 4. Test your changes in all 4 test projects (`cd _tests_/v9/react-ts-tw && npm run lint`)
458
483
  5. Commit your changes (`git commit -m 'Add some amazing feature'`)
459
484
  6. Push to the branch (`git push origin feature/amazing-feature`)
460
485
  7. Open a Pull Request