@octohash/eslint-config 0.1.3 → 0.2.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 +20 -58
- package/dist/index.d.mts +1601 -0
- package/dist/index.mjs +269 -0
- package/package.json +29 -22
- package/dist/index.d.ts +0 -15
- package/dist/index.js +0 -52
package/README.md
CHANGED
|
@@ -4,83 +4,45 @@
|
|
|
4
4
|
[![JSDocs][jsdocs-src]][jsdocs-href]
|
|
5
5
|
[![License][license-src]][license-href]
|
|
6
6
|
|
|
7
|
-
A
|
|
7
|
+
A personal ESLint config, built as an extension of
|
|
8
|
+
[`@antfu/eslint-config`](https://github.com/antfu/eslint-config).
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Installation
|
|
10
|
+
## Install
|
|
12
11
|
|
|
13
12
|
```bash
|
|
14
|
-
pnpm add -D @octohash/eslint-config
|
|
13
|
+
pnpm add -D @octohash/eslint-config eslint
|
|
15
14
|
```
|
|
16
15
|
|
|
17
16
|
## Usage
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Create an `eslint.config.js` file in your project root:
|
|
22
|
-
|
|
23
|
-
```javascript
|
|
18
|
+
```ts
|
|
24
19
|
import { defineConfig } from '@octohash/eslint-config'
|
|
25
20
|
|
|
26
21
|
export default defineConfig()
|
|
27
22
|
```
|
|
28
23
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
```javascript
|
|
32
|
-
import { defineConfig } from '@octohash/eslint-config'
|
|
33
|
-
|
|
34
|
-
export default defineConfig(
|
|
35
|
-
{
|
|
36
|
-
vue: true,
|
|
37
|
-
formatters: {
|
|
38
|
-
css: true,
|
|
39
|
-
html: true,
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
files: ['**/*.test.ts'],
|
|
44
|
-
rules: {
|
|
45
|
-
'no-unused-vars': 'off',
|
|
46
|
-
},
|
|
47
|
-
}
|
|
48
|
-
)
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Tailwind CSS v4 Setup
|
|
52
|
-
|
|
53
|
-
1. Install Tailwind CSS v4:
|
|
54
|
-
```bash
|
|
55
|
-
pnpm add tailwindcss@4
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
2. Create your CSS file with v4 syntax:
|
|
59
|
-
```css
|
|
60
|
-
@import 'tailwindcss';
|
|
24
|
+
## What This Adds
|
|
61
25
|
|
|
62
|
-
|
|
63
|
-
|
|
26
|
+
- Adds first-class `Tailwind CSS` linting/formatting rules powered by
|
|
27
|
+
[`eslint-plugin-better-tailwindcss`](https://github.com/schoero/eslint-plugin-better-tailwindcss)
|
|
28
|
+
- Includes `catalogs-sort` rules for consistent dependency catalog ordering
|
|
64
29
|
|
|
65
|
-
|
|
30
|
+
## Tailwind CSS
|
|
66
31
|
|
|
67
|
-
|
|
32
|
+
No extra setup is required in most projects:
|
|
68
33
|
|
|
69
|
-
|
|
34
|
+
- Tailwind v4: auto-detects a CSS entry that imports `tailwindcss`
|
|
35
|
+
- Tailwind v3: auto-detects `tailwind.config.*`
|
|
70
36
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
import antfu from '@antfu/eslint-config'
|
|
37
|
+
You can still override with `settings.entryPoint` or `settings.tailwindConfig`
|
|
38
|
+
when needed.
|
|
74
39
|
|
|
75
|
-
|
|
76
|
-
```
|
|
40
|
+
## Credits
|
|
77
41
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
export default defineConfig()
|
|
83
|
-
```
|
|
42
|
+
Inspired by
|
|
43
|
+
[`@antfu/eslint-config`](https://github.com/antfu/eslint-config)
|
|
44
|
+
and
|
|
45
|
+
[`eslint-config-hyoban`](https://github.com/hyoban/eslint-config-hyoban).
|
|
84
46
|
|
|
85
47
|
## License
|
|
86
48
|
|