@octohash/eslint-config 0.1.1 → 0.1.2
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 +6 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +13 -12
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# @octohash/eslint-config
|
|
2
2
|
|
|
3
3
|
[![npm version][npm-version-src]][npm-version-href]
|
|
4
|
-
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
5
|
-
[![bundle][bundle-src]][bundle-href]
|
|
6
4
|
[![JSDocs][jsdocs-src]][jsdocs-href]
|
|
7
5
|
[![License][license-src]][license-href]
|
|
8
6
|
|
|
9
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**.
|
|
10
8
|
|
|
9
|
+
Since the target is web application development, CSS and HTML formatting are enabled by default.
|
|
10
|
+
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
13
13
|
```bash
|
|
@@ -68,13 +68,15 @@ pnpm add tailwindcss@4
|
|
|
68
68
|
|
|
69
69
|
If you're currently using `@antfu/eslint-config` directly, you can easily migrate:
|
|
70
70
|
|
|
71
|
+
**Before:**
|
|
71
72
|
```javascript
|
|
72
|
-
// Before
|
|
73
73
|
import antfu from '@antfu/eslint-config'
|
|
74
74
|
|
|
75
75
|
export default antfu()
|
|
76
|
+
```
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
**After:**
|
|
79
|
+
```javascript
|
|
78
80
|
import { defineConfig } from '@octohash/eslint-config'
|
|
79
81
|
|
|
80
82
|
export default defineConfig()
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _antfu_eslint_config0 from "@antfu/eslint-config";
|
|
2
2
|
import { Awaitable, OptionsConfig, TypedFlatConfigItem } from "@antfu/eslint-config";
|
|
3
|
-
import * as
|
|
3
|
+
import * as eslint_flat_config_utils0 from "eslint-flat-config-utils";
|
|
4
4
|
import { FlatConfigComposer } from "eslint-flat-config-utils";
|
|
5
5
|
import { Linter } from "eslint";
|
|
6
6
|
|
|
@@ -10,6 +10,6 @@ type AntfuOptions = OptionsConfig & Omit<TypedFlatConfigItem, 'files'>;
|
|
|
10
10
|
type UserConfig = Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[] | FlatConfigComposer<any, any> | Linter.Config[]>[];
|
|
11
11
|
//#endregion
|
|
12
12
|
//#region src/index.d.ts
|
|
13
|
-
declare function defineConfig(options?: Options, ...userConfigs: UserConfig):
|
|
13
|
+
declare function defineConfig(options?: Options, ...userConfigs: UserConfig): eslint_flat_config_utils0.FlatConfigComposer<_antfu_eslint_config0.TypedFlatConfigItem, _antfu_eslint_config0.ConfigNames>;
|
|
14
14
|
//#endregion
|
|
15
15
|
export { defineConfig };
|
package/dist/index.js
CHANGED
|
@@ -8,9 +8,9 @@ import { join } from "pathe";
|
|
|
8
8
|
//#region src/tailwindcss.ts
|
|
9
9
|
function tailwindCSS(dir) {
|
|
10
10
|
const installed = isPackageExists("tailwindcss");
|
|
11
|
-
if (!installed) return;
|
|
11
|
+
if (!installed) return [];
|
|
12
12
|
const config = findTailwindImportCSS(dir ?? process.cwd());
|
|
13
|
-
if (!config) return;
|
|
13
|
+
if (!config) return [];
|
|
14
14
|
return {
|
|
15
15
|
...tailwindPlugin.configs["flat/recommended"],
|
|
16
16
|
settings: { tailwindcss: { config } }
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octohash/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"description": "ESLint configuration based on @antfu/eslint-config,
|
|
4
|
+
"version": "0.1.2",
|
|
5
|
+
"description": "ESLint configuration based on @antfu/eslint-config, includes built-in support for Tailwind CSS v4.",
|
|
6
6
|
"author": "jinghaihan",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"homepage": "https://github.com/jinghaihan/eslint-config#readme",
|
|
@@ -32,27 +32,28 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@antfu/eslint-config": "^
|
|
35
|
+
"@antfu/eslint-config": "^5.0.0",
|
|
36
36
|
"eslint-plugin-format": "^1.0.1",
|
|
37
|
-
"eslint-plugin-tailwindcss": "
|
|
37
|
+
"eslint-plugin-tailwindcss": "^4.0.0-beta.0",
|
|
38
38
|
"local-pkg": "^1.1.1",
|
|
39
39
|
"pathe": "^2.0.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@octohash/tsconfig": "^0.1.0",
|
|
43
|
-
"@types/
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"eslint
|
|
43
|
+
"@types/eslint-plugin-tailwindcss": "^3.17.0",
|
|
44
|
+
"@types/node": "^24.1.0",
|
|
45
|
+
"bumpp": "^10.2.1",
|
|
46
|
+
"czg": "^1.12.0",
|
|
47
|
+
"eslint": "^9.32.0",
|
|
48
|
+
"eslint-flat-config-utils": "^2.1.1",
|
|
48
49
|
"lint-staged": "^16.1.2",
|
|
49
|
-
"pncat": "^0.
|
|
50
|
+
"pncat": "^0.4.0",
|
|
50
51
|
"simple-git-hooks": "^2.13.0",
|
|
51
52
|
"taze": "^19.1.0",
|
|
52
|
-
"tsdown": "^0.
|
|
53
|
+
"tsdown": "^0.13.0",
|
|
53
54
|
"typescript": "^5.8.3",
|
|
54
55
|
"vitest": "^3.2.4",
|
|
55
|
-
"@octohash/eslint-config": "0.1.
|
|
56
|
+
"@octohash/eslint-config": "0.1.2"
|
|
56
57
|
},
|
|
57
58
|
"simple-git-hooks": {
|
|
58
59
|
"pre-commit": "pnpm lint-staged"
|