@acfatah/eslint-preset 1.3.0 → 1.3.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
@@ -62,6 +62,11 @@ export default config(
62
62
  },
63
63
 
64
64
  {
65
+ // Optionally when using some plugins
66
+ plugins: {
67
+ // ...
68
+ },
69
+
65
70
  rules: {
66
71
  ...preset,
67
72
 
@@ -77,13 +82,19 @@ export default config(
77
82
  Add the following configurations respectively.
78
83
 
79
84
  ```typescript
80
- import { tailwind } from '@acfatah/eslint-preset/rules'
85
+ import { betterTailwindcssPlugin, tailwind } from '@acfatah/eslint-preset'
81
86
  import antfu from '@antfu/eslint-config'
82
87
 
83
88
  export default antfu(
84
- // other configs...
89
+ {
90
+ // other configs...
91
+ },
85
92
 
86
93
  {
94
+ plugins: {
95
+ ...betterTailwindcssPlugin,
96
+ },
97
+
87
98
  rules: {
88
99
  // other rules...
89
100
 
@@ -101,7 +112,7 @@ export default antfu(
101
112
  }
102
113
  },
103
114
 
104
- // other configs...
115
+ // other flat configs...
105
116
  )
106
117
  ```
107
118
 
package/dist/index.d.ts CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  import { default as config } from '@antfu/eslint-config';
4
4
 
5
+ export declare const betterTailwindcssPlugin: {
6
+ "better-tailwindcss": {
7
+ configs: {
8
+ [x: string]: {
9
+ plugins: string[];
10
+ rules: {
11
+ [x: string]: "error" | "warn";
12
+ };
13
+ };
14
+ };
15
+ meta: {
16
+ name: string;
17
+ };
18
+ rules: {};
19
+ };
20
+ };
5
21
  /**
6
22
  * Eslint preset for Markdown files.
7
23
  *
package/dist/index.mjs CHANGED
@@ -1,3 +1,8 @@
1
+ // src/plugins/better-tailwindcss.ts
2
+ import eslintPluginBetterTailwindcss from "eslint-plugin-better-tailwindcss";
3
+ var betterTailwindcssPlugin = {
4
+ "better-tailwindcss": eslintPluginBetterTailwindcss
5
+ };
1
6
  // src/rules/markdown.ts
2
7
  var markdown = {};
3
8
  // src/rules/preset.ts
@@ -28,10 +33,10 @@ var preset = {
28
33
  ]
29
34
  };
30
35
  // src/rules/tailwind.ts
31
- import eslintPluginBetterTailwindcss from "eslint-plugin-better-tailwindcss";
36
+ import eslintPluginBetterTailwindcss2 from "eslint-plugin-better-tailwindcss";
32
37
  var tailwind = {
33
- ...eslintPluginBetterTailwindcss.configs["recommended-warn"]?.rules,
34
- ...eslintPluginBetterTailwindcss.configs["recommended-error"]?.rules,
38
+ ...eslintPluginBetterTailwindcss2.configs["recommended-warn"]?.rules,
39
+ ...eslintPluginBetterTailwindcss2.configs["recommended-error"]?.rules,
35
40
  "better-tailwindcss/enforce-consistent-line-wrapping": ["warn", {
36
41
  printWidth: 100
37
42
  }],
@@ -51,5 +56,6 @@ export {
51
56
  tailwind,
52
57
  preset,
53
58
  markdown,
54
- default2 as config
59
+ default2 as config,
60
+ betterTailwindcssPlugin
55
61
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@acfatah/eslint-preset",
3
3
  "type": "module",
4
- "version": "1.3.0",
4
+ "version": "1.3.1",
5
5
  "description": "Eslint config preset.",
6
6
  "author": "Achmad F. Ibrahim <acfatah@gmail.com>",
7
7
  "license": "MIT",
@@ -30,13 +30,13 @@
30
30
  "node": "^20.19.0 || >=22.12.0"
31
31
  },
32
32
  "scripts": {
33
- "build": "bun run scripts/build.ts",
33
+ "build": "bun --version > .bun-version && bun install && bun run script/build.ts",
34
34
  "lint": "bunx --bun eslint",
35
35
  "lint:staged": "bunx --bun eslint --pass-on-no-patterns --no-warn-ignored $(git diff --relative --cached --name-only --diff-filter=d)",
36
36
  "lint:commit-message": "bunx --bun commitlint --edit",
37
37
  "format": "bunx --bun eslint --fix",
38
38
  "typecheck": "tsc --noEmit",
39
- "release": "bunx --bun bumpp --execute=\"bun install\""
39
+ "release": "bun run build && bunx --bun bumpp"
40
40
  },
41
41
  "dependencies": {
42
42
  "@antfu/eslint-config": "^6.7.1",