@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.
- package/README.md +28 -73
- package/dist/index.d.ts +5779 -3910
- package/dist/index.js +66 -1
- package/package.json +11 -10
package/README.md
CHANGED
|
@@ -3,45 +3,37 @@
|
|
|
3
3
|

|
|
4
4
|
[](https://www.npmjs.com/package/@jimmy.codes/eslint-config)
|
|
5
5
|
[](http://www.npmtrends.com/@jimmy.codes/eslint-config)
|
|
6
|
-
[](https://semantic-release.gitbook.io/semantic-release)
|
|
7
|
-
[](https://github.com/prettier/prettier)
|
|
8
6
|
|
|
9
|
-
>
|
|
7
|
+
> A simple, modern ESLint config that covers most use cases.
|
|
10
8
|
|
|
11
|
-
##
|
|
9
|
+
## **Why Use This?**
|
|
12
10
|
|
|
13
|
-
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
23
|
+
## Installation & Usage
|
|
32
24
|
|
|
33
25
|
> [!NOTE]
|
|
34
|
-
>
|
|
26
|
+
> Works best with [@jimmy.codes/prettier-config](https://github.com/jimmy-guzman/prettier-config).
|
|
35
27
|
|
|
36
|
-
###
|
|
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
|
-
|
|
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
|
-
|
|
44
|
+
Itβll auto-configure based on your installed dependencies.
|
|
45
|
+
|
|
46
|
+
---
|
|
53
47
|
|
|
54
|
-
|
|
48
|
+
## Customization
|
|
55
49
|
|
|
56
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
102
|
+
## Contributing
|
|
148
103
|
|
|
149
|
-
PRs and
|
|
104
|
+
PRs and issues welcome.
|
|
150
105
|
|
|
151
106
|
---
|
|
152
107
|
|
|
153
|
-
##
|
|
108
|
+
## Credits
|
|
154
109
|
|
|
155
|
-
|
|
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)
|