@switz/eslint-config 13.0.1 → 13.1.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 CHANGED
@@ -58,6 +58,12 @@ Install oxlint and oxfmt, then reference the configs:
58
58
  pnpm install -D oxlint oxfmt
59
59
  ```
60
60
 
61
+ For Tailwind support, also install the native oxlint plugin:
62
+
63
+ ```bash
64
+ pnpm install -D oxlint-tailwindcss
65
+ ```
66
+
61
67
  Create an `oxlint.json` in your project root that extends the base config:
62
68
 
63
69
  ```json
@@ -116,9 +122,24 @@ Add scripts to your `package.json`:
116
122
  }
117
123
  ```
118
124
 
125
+ ### Tailwind
126
+
127
+ The Tailwind oxlint config uses [oxlint-tailwindcss](https://github.com/sergioazoc/oxlint-tailwindcss), a native oxlint plugin. It requires oxlint >= 1.43.0 and Tailwind CSS v4. The plugin auto-detects your Tailwind entry point, but you can override it in your `oxlint.json`:
128
+
129
+ ```json
130
+ {
131
+ "settings": {
132
+ "tailwindcss": {
133
+ "entryPoint": "src/styles/globals.css"
134
+ }
135
+ }
136
+ }
137
+ ```
138
+
119
139
  ### Gaps vs ESLint configs
120
140
 
121
141
  - **React**: oxlint covers ~20 of 80+ `eslint-plugin-react` rules. Core rules like `jsx-key`, `no-direct-mutation-state`, hooks rules, and `jsx-no-duplicate-props` are covered. Rules like `no-unstable-nested-components`, `no-array-index-key`, `jsx-handler-names` are not.
142
+ - **Tailwind**: The oxlint config uses `oxlint-tailwindcss` (native plugin) while the ESLint config uses `eslint-plugin-better-tailwindcss`. Both provide equivalent coverage for class sorting, duplicates, conflicts, and whitespace.
122
143
  - **MDX**: oxfmt formats `.mdx` files, but does not lint embedded code blocks like `eslint-plugin-mdx` does.
123
144
  - **TypeScript type-aware rules**: oxlint's type-aware checking is in alpha (~73% coverage of `typescript-eslint` recommended rules).
124
145
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
3
- "plugins": ["better-tailwindcss"],
3
+ "jsPlugins": ["oxlint-tailwindcss"],
4
4
  "rules": {
5
- "better-tailwindcss/no-conflicting-classes": "error",
6
- "better-tailwindcss/no-duplicate-classes": "error",
7
- "better-tailwindcss/sort-classes": "warn",
8
- "better-tailwindcss/no-unnecessary-whitespace": "warn",
9
- "better-tailwindcss/enforce-consistent-line-wrapping": [
5
+ "tailwindcss/no-conflicting-classes": "error",
6
+ "tailwindcss/no-duplicate-classes": "error",
7
+ "tailwindcss/enforce-sort-order": "warn",
8
+ "tailwindcss/no-unnecessary-whitespace": "warn",
9
+ "tailwindcss/enforce-consistent-line-wrapping": [
10
10
  "warn",
11
11
  {
12
12
  "printWidth": 100
@@ -14,7 +14,7 @@
14
14
  ]
15
15
  },
16
16
  "settings": {
17
- "better-tailwindcss": {
17
+ "tailwindcss": {
18
18
  "entryPoint": "src/styles/globals.css"
19
19
  }
20
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@switz/eslint-config",
3
- "version": "13.0.1",
3
+ "version": "13.1.0",
4
4
  "description": "",
5
5
  "main": "eslint.config.mjs",
6
6
  "type": "module",
@@ -29,17 +29,17 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@eslint/js": "^10.0.1",
32
- "@typescript-eslint/parser": "^8.56.0",
32
+ "@typescript-eslint/parser": "^8.60.0",
33
33
  "eslint-config-prettier": "^10.1.8",
34
- "eslint-plugin-better-tailwindcss": "^4.3.0",
35
- "eslint-plugin-mdx": "^3.6.2",
36
- "eslint-plugin-prettier": "^5.5.5",
34
+ "eslint-plugin-better-tailwindcss": "^4.5.0",
35
+ "eslint-plugin-mdx": "^3.8.1",
36
+ "eslint-plugin-prettier": "^5.5.6",
37
37
  "eslint-plugin-react": "^7.34.2",
38
- "globals": "^17.3.0",
39
- "prettier": "3.8.1",
40
- "typescript-eslint": "^8.56.0"
38
+ "globals": "^17.6.0",
39
+ "prettier": "3.8.3",
40
+ "typescript-eslint": "^8.60.0"
41
41
  },
42
42
  "devDependencies": {
43
- "eslint": "^10.0.1"
43
+ "eslint": "^10.4.1"
44
44
  }
45
45
  }