@jimmy.codes/eslint-config 5.4.0 β†’ 5.5.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 (4) hide show
  1. package/README.md +28 -73
  2. package/dist/index.d.ts +5779 -3910
  3. package/dist/index.js +66 -1
  4. package/package.json +11 -10
package/README.md CHANGED
@@ -3,45 +3,37 @@
3
3
  ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/jimmy-guzman/eslint-config/cd.yml?style=flat-square&logo=github-actions)
4
4
  [![version](https://img.shields.io/npm/v/@jimmy.codes/eslint-config.svg?logo=npm&style=flat-square)](https://www.npmjs.com/package/@jimmy.codes/eslint-config)
5
5
  [![downloads](https://img.shields.io/npm/dm/@jimmy.codes/eslint-config.svg?logo=npm&style=flat-square)](http://www.npmtrends.com/@jimmy.codes/eslint-config)
6
- [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://semantic-release.gitbook.io/semantic-release)
7
- [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square&logo=prettier)](https://github.com/prettier/prettier)
8
6
 
9
- > πŸ” A pragmatic and opinionated [ESLint](https://eslint.org) config for modern development.
7
+ > A simple, modern ESLint config that covers most use cases.
10
8
 
11
- ## **✨ Features**
9
+ ## **Why Use This?**
12
10
 
13
- - **πŸ“‘ Auto-detects your stack** – Supports React, TypeScript, Astro, Next.js, Vitest, Jest, Playwright, Storybook, and TanStack Query.
14
- - **⚑ Efficient & lightweight** – Dynamically imports configs for better performance.
15
- - **πŸ› οΈ Works out of the box** – No manual setup required for most projects.
16
- - **πŸŽ›οΈ Fully customizable** – Override, extend, or disable rules to fit your needs.
17
- - **πŸ”„ Always up to date** – Evolves with the latest ESLint, TypeScript, and framework best practices.
11
+ A strict-but-practical ESLint config that **doesn’t require much thought**. It works out of the box, adapts to your stack, and enforces good patterns without getting in the way.
18
12
 
19
- ---
20
-
21
- ## **πŸš€ Philosophy**
13
+ - **Auto-detects dependencies** – Handles React, TypeScript, Astro, Next.js, Vitest, Jest, Playwright, Storybook, and TanStack Query.
14
+ - **Prevents real issues** – Focuses on rules that actually matter.
15
+ - **Fast & lightweight** – Loads only what’s needed, so it won’t slow you down.
16
+ - **No setup needed** – Install it, import it, done.
17
+ - **Customizable** – Turn off what you don’t need.
18
+ - **Works with tests** – Supports Vitest, Jest, Playwright, and Testing Library.
19
+ - **Encourages modern JS** – Keeps things clean and readable.
22
20
 
23
- A strict yet ergonomic ESLint config that ensures **clean, maintainable, and modern** JavaScript and TypeScript codebases.
24
-
25
- - **πŸ›‘οΈ Code safety first** – Enforce patterns that prevent runtime errors and unexpected behavior.
26
- - **πŸ“œ Embrace modern JavaScript** – Prefer maintainable, expressive, and future-proof code.
27
- - **βš™οΈ Optimized for performance** – Loads only relevant configs to keep linting fast.
28
- - **πŸ“ Consistency without rigidity** – Prioritizes structure and readability over personal opinions.
29
- - **πŸ§ͺ Built for testing** – Enforces best practices for Vitest, Jest, Playwright, and Testing Library.
21
+ ---
30
22
 
31
- ## πŸ› οΈ Usage
23
+ ## Installation & Usage
32
24
 
33
25
  > [!NOTE]
34
- > For a better experience, use [@jimmy.codes/prettier-config](https://github.com/jimmy-guzman/prettier-config) as well.
26
+ > Works best with [@jimmy.codes/prettier-config](https://github.com/jimmy-guzman/prettier-config).
35
27
 
36
- ### πŸ”¨ Getting Started
37
-
38
- Install the package:
28
+ ### Install
39
29
 
40
30
  ```sh
41
31
  pnpm add -D @jimmy.codes/eslint-config
42
32
  ```
43
33
 
44
- Then, in your `eslint.config.ts`, simply add:
34
+ ### Basic Setup
35
+
36
+ Add this to `eslint.config.ts`:
45
37
 
46
38
  ```mjs
47
39
  import { defineConfig } from "@jimmy.codes/eslint-config";
@@ -49,12 +41,13 @@ import { defineConfig } from "@jimmy.codes/eslint-config";
49
41
  export default defineConfig();
50
42
  ```
51
43
 
52
- This automatically applies rules **based on your installed dependencies**.
44
+ It’ll auto-configure based on your installed dependencies.
45
+
46
+ ---
53
47
 
54
- ### πŸ”§ Configuration
48
+ ## Customization
55
49
 
56
- By default, this config **auto-detects** relevant rules based on your dependencies (`react`, `vitest`, etc.).
57
- To disable this behavior:
50
+ ### Disable Auto-Detection
58
51
 
59
52
  ```ts
60
53
  import { defineConfig } from "@jimmy.codes/eslint-config";
@@ -62,9 +55,7 @@ import { defineConfig } from "@jimmy.codes/eslint-config";
62
55
  export default defineConfig({ autoDetect: false });
63
56
  ```
64
57
 
65
- #### **Manually Enable/Disable Rule Sets**
66
-
67
- You can explicitly enable or disable rule sets:
58
+ ### Enable/Disable Rule Sets
68
59
 
69
60
  ```ts
70
61
  import { defineConfig } from "@jimmy.codes/eslint-config";
@@ -83,9 +74,7 @@ export default defineConfig({
83
74
  });
84
75
  ```
85
76
 
86
- #### **Extending/Overriding the Configuration**
87
-
88
- Use the `overrides` option:
77
+ ### Override Specific Rules
89
78
 
90
79
  ```ts
91
80
  import { defineConfig } from "@jimmy.codes/eslint-config";
@@ -108,51 +97,17 @@ export default defineConfig({
108
97
  });
109
98
  ```
110
99
 
111
- Alternatively, pass multiple configurations as separate arguments:
112
-
113
- ```ts
114
- import { defineConfig } from "@jimmy.codes/eslint-config";
115
-
116
- export default defineConfig(
117
- {},
118
- {
119
- files: ["**/*.js"],
120
- rules: {
121
- "prefer-spread": "error",
122
- },
123
- },
124
- {
125
- files: ["**/*.ts"],
126
- rules: {
127
- "prefer-const": "error",
128
- },
129
- },
130
- );
131
- ```
132
-
133
- #### **Ignoring Files**
134
-
135
- Extend ignored files:
136
-
137
- ```ts
138
- import { defineConfig } from "@jimmy.codes/eslint-config";
139
-
140
- export default defineConfig({
141
- ignores: ["**/*.mjs"],
142
- });
143
- ```
144
-
145
100
  ---
146
101
 
147
- ## πŸ’¬ Want to Contribute or Suggest Changes?
102
+ ## Contributing
148
103
 
149
- PRs and discussions are welcome! Open an issue if you have suggestions.
104
+ PRs and issues welcome.
150
105
 
151
106
  ---
152
107
 
153
- ## ❀️ Credits
108
+ ## Credits
154
109
 
155
- This config is inspired by:
110
+ Inspired by:
156
111
 
157
112
  - [@antfu/eslint-config](https://github.com/antfu/eslint-config) by [Anthony Fu](https://antfu.me)
158
113
  - [@pvtnbr/eslint-config](https://github.com/privatenumber/eslint-config) by [Hiroki Osame](https://hirok.io)