@octohash/eslint-config 0.1.3 → 0.2.1

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 CHANGED
@@ -4,83 +4,45 @@
4
4
  [![JSDocs][jsdocs-src]][jsdocs-href]
5
5
  [![License][license-src]][license-href]
6
6
 
7
- A comprehensive ESLint configuration package optimized for **application development**, built on top of [@antfu/eslint-config](https://github.com/antfu/eslint-config). This configuration provides a robust foundation for modern web applications with built-in support for Vue, TypeScript, and **Tailwind CSS v4**.
7
+ A personal ESLint config, built as an extension of
8
+ [`@antfu/eslint-config`](https://github.com/antfu/eslint-config).
8
9
 
9
- Since the target is web application development, CSS and HTML formatting are enabled by default.
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
- ### Basic Setup
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
- ### With Custom Options
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
- /* Your custom styles */
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
- 3. The ESLint configuration will automatically detect and validate your Tailwind CSS usage.
30
+ ## Tailwind CSS
66
31
 
67
- ## Migration from @antfu/eslint-config
32
+ No extra setup is required in most projects:
68
33
 
69
- If you're currently using `@antfu/eslint-config` directly, you can easily migrate:
34
+ - Tailwind v4: auto-detects a CSS entry that imports `tailwindcss`
35
+ - Tailwind v3: auto-detects `tailwind.config.*`
70
36
 
71
- **Before:**
72
- ```javascript
73
- import antfu from '@antfu/eslint-config'
37
+ You can still override with `settings.entryPoint` or `settings.tailwindConfig`
38
+ when needed.
74
39
 
75
- export default antfu()
76
- ```
40
+ ## Credits
77
41
 
78
- **After:**
79
- ```javascript
80
- import { defineConfig } from '@octohash/eslint-config'
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