@rhapsodic/eslint-config 1.0.1 → 1.0.3
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 +13 -24
- package/dist/index.d.mts +797 -1279
- package/dist/index.mjs +7 -7
- package/package.json +30 -29
package/README.md
CHANGED
|
@@ -11,29 +11,17 @@
|
|
|
11
11
|
- Using [ESLint Stylistic](https://github.com/eslint-stylistic/eslint-stylistic)
|
|
12
12
|
- Requires ESLint v9.5.0+
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
### Starter Wizard
|
|
17
|
-
|
|
18
|
-
We provided a CLI tool to help you set up your project, or migrate from the legacy config to the new flat config with one command.
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
pnpm dlx @rhapsodic/eslint-config@latest
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
### Manual Install
|
|
25
|
-
|
|
26
|
-
If you prefer to set up manually:
|
|
14
|
+
### Install
|
|
27
15
|
|
|
28
16
|
```bash
|
|
29
17
|
pnpm i -D eslint @rhapsodic/eslint-config
|
|
30
18
|
```
|
|
31
19
|
|
|
32
|
-
And create `eslint.config.mjs` in your project root:
|
|
20
|
+
And create `eslint.config.mjs` or `eslint.config.ts` in your project root:
|
|
33
21
|
|
|
34
22
|
```js
|
|
35
23
|
// eslint.config.mjs
|
|
36
|
-
import rhapsodic from '@rhapsodic/eslint-config'
|
|
24
|
+
import { rhapsodic } from '@rhapsodic/eslint-config'
|
|
37
25
|
|
|
38
26
|
export default rhapsodic()
|
|
39
27
|
```
|
|
@@ -47,7 +35,7 @@ If you still use some configs from the legacy eslintrc format, you can use the [
|
|
|
47
35
|
|
|
48
36
|
```js
|
|
49
37
|
// eslint.config.mjs
|
|
50
|
-
import rhapsodic from '@rhapsodic/eslint-config'
|
|
38
|
+
import { rhapsodic } from '@rhapsodic/eslint-config'
|
|
51
39
|
import { FlatCompat } from '@eslint/eslintrc'
|
|
52
40
|
|
|
53
41
|
const compat = new FlatCompat()
|
|
@@ -125,7 +113,7 @@ Normally you only need to import the `rhapsodic` preset:
|
|
|
125
113
|
|
|
126
114
|
```js
|
|
127
115
|
// eslint.config.js
|
|
128
|
-
import rhapsodic from '@rhapsodic/eslint-config'
|
|
116
|
+
import { rhapsodic } from '@rhapsodic/eslint-config'
|
|
129
117
|
|
|
130
118
|
export default rhapsodic()
|
|
131
119
|
```
|
|
@@ -134,7 +122,7 @@ And that's it! Or you can configure each integration individually, for example:
|
|
|
134
122
|
|
|
135
123
|
```js
|
|
136
124
|
// eslint.config.js
|
|
137
|
-
import rhapsodic from '@rhapsodic/eslint-config'
|
|
125
|
+
import { rhapsodic } from '@rhapsodic/eslint-config'
|
|
138
126
|
|
|
139
127
|
export default rhapsodic({
|
|
140
128
|
// `.eslintignore` is no longer supported in Flat config, use `ignores` instead
|
|
@@ -165,7 +153,7 @@ The `rhapsodic` factory function also accepts any number of arbitrary custom con
|
|
|
165
153
|
|
|
166
154
|
```js
|
|
167
155
|
// eslint.config.js
|
|
168
|
-
import rhapsodic from '@rhapsodic/eslint-config'
|
|
156
|
+
import { rhapsodic } from '@rhapsodic/eslint-config'
|
|
169
157
|
|
|
170
158
|
export default rhapsodic(
|
|
171
159
|
{
|
|
@@ -227,7 +215,7 @@ Certain rules would only be enabled in specific files, for example, `ts/*` rules
|
|
|
227
215
|
|
|
228
216
|
```js
|
|
229
217
|
// eslint.config.js
|
|
230
|
-
import rhapsodic from '@rhapsodic/eslint-config'
|
|
218
|
+
import { rhapsodic } from '@rhapsodic/eslint-config'
|
|
231
219
|
|
|
232
220
|
export default rhapsodic(
|
|
233
221
|
{
|
|
@@ -254,7 +242,7 @@ We also provided the `overrides` options in each integration to make it easier:
|
|
|
254
242
|
|
|
255
243
|
```js
|
|
256
244
|
// eslint.config.js
|
|
257
|
-
import rhapsodic from '@rhapsodic/eslint-config'
|
|
245
|
+
import { rhapsodic } from '@rhapsodic/eslint-config'
|
|
258
246
|
|
|
259
247
|
export default rhapsodic({
|
|
260
248
|
vue: {
|
|
@@ -281,7 +269,7 @@ Since v2.10.0, the factory function `rhapsodic()` returns a [`FlatConfigComposer
|
|
|
281
269
|
|
|
282
270
|
```js
|
|
283
271
|
// eslint.config.js
|
|
284
|
-
import rhapsodic from '@rhapsodic/eslint-config'
|
|
272
|
+
import { rhapsodic } from '@rhapsodic/eslint-config'
|
|
285
273
|
|
|
286
274
|
export default rhapsodic()
|
|
287
275
|
.prepend(
|
|
@@ -310,7 +298,7 @@ Vue support is detected automatically by checking if `vue` is installed in your
|
|
|
310
298
|
|
|
311
299
|
```js
|
|
312
300
|
// eslint.config.js
|
|
313
|
-
import rhapsodic from '@rhapsodic/eslint-config'
|
|
301
|
+
import { rhapsodic } from '@rhapsodic/eslint-config'
|
|
314
302
|
|
|
315
303
|
export default rhapsodic({
|
|
316
304
|
vue: true
|
|
@@ -323,7 +311,7 @@ To enable Vue accessibility support, you need to explicitly turn it on:
|
|
|
323
311
|
|
|
324
312
|
```js
|
|
325
313
|
// eslint.config.js
|
|
326
|
-
import rhapsodic from '@rhapsodic/eslint-config'
|
|
314
|
+
import { rhapsodic } from '@rhapsodic/eslint-config'
|
|
327
315
|
|
|
328
316
|
export default rhapsodic({
|
|
329
317
|
vue: {
|
|
@@ -391,4 +379,5 @@ This project follows [Semantic Versioning](https://semver.org/) for releases. Ho
|
|
|
391
379
|
|
|
392
380
|
## License
|
|
393
381
|
|
|
382
|
+
[MIT](./LICENSE) License © 2019-PRESENT [Anthony Fu](https://github.com/antfu)
|
|
394
383
|
[MIT](./LICENSE) License © 2025-PRESENT [Svyatoslav Fyodorov](https://github.com/intelrug)
|