@acfatah/eslint-preset 1.3.2 → 1.3.4

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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +29 -7
  3. package/package.json +7 -5
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Achmad F. Ibrahim
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -5,11 +5,13 @@
5
5
  <img
6
6
  alt="Code Style"
7
7
  src="https://antfu.me/badge-code-style.svg"></a>
8
+ <a href="./LICENSE">
9
+ <img alt="GitHub" src="https://img.shields.io/github/license/acfatah/eslint-preset?style=flat-square"></a>
8
10
  <a href="https://www.npmjs.com/package/@acfatah/eslint-preset">
9
11
  <img
10
12
  alt="NPM Version"
11
13
  src="https://img.shields.io/npm/v/%40acfatah%2Feslint-preset"></a>
12
- <a href="https://github.com/antfu/eslint-config">
14
+ <a href="https://github.com/acfatah/eslint-preset/commits/main">
13
15
  <img
14
16
  alt="GitHub last commit (by committer)"
15
17
  src="https://img.shields.io/github/last-commit/acfatah/eslint-preset?display_timestamp=committer&style=flat-square"></a>
@@ -44,8 +46,7 @@ to the `antfu` factory function. See [antfu Customization][antfu-factory-fuction
44
46
  section for more details.
45
47
 
46
48
  ```typescript
47
- import { config } from '@acfatah/eslint-preset'
48
- import { markdown, preset, vue } from '@acfatah/eslint-preset/rules'
49
+ import { config, markdown, preset, vue } from '@acfatah/eslint-preset'
49
50
 
50
51
  export default config(
51
52
  {
@@ -62,8 +63,8 @@ export default config(
62
63
  '**/coverage/**',
63
64
  '**/dist/**',
64
65
  '**/logs/**',
66
+ '**/tsconfig.*',
65
67
  'bun.lock',
66
- 'tsconfig.*',
67
68
  ],
68
69
  },
69
70
 
@@ -76,6 +77,9 @@ export default config(
76
77
  rules: {
77
78
  ...preset,
78
79
 
80
+ // Optional markdown rules
81
+ ...markdown,
82
+
79
83
  // Specifically for Vue projects
80
84
  ...vue,
81
85
  },
@@ -88,10 +92,9 @@ export default config(
88
92
  Add the following configurations respectively.
89
93
 
90
94
  ```typescript
91
- import { betterTailwindcssPlugin, tailwind } from '@acfatah/eslint-preset'
92
- import antfu from '@antfu/eslint-config'
95
+ import { betterTailwindcssPlugin, config, tailwind } from '@acfatah/eslint-preset'
93
96
 
94
- export default antfu(
97
+ export default config(
95
98
  {
96
99
  // other configs...
97
100
  },
@@ -122,6 +125,24 @@ export default antfu(
122
125
  )
123
126
  ```
124
127
 
128
+ ## Inspect Example Configs
129
+
130
+ You can inspect the fully resolved configs shipped in this repo. These commands
131
+ run from the project root and run the [ESLint config inspector][4] against the
132
+ templates used.
133
+
134
+ ### Default TypeScript preset
135
+
136
+ ```bash
137
+ bun inspect:default
138
+ ```
139
+
140
+ ### Vue + Tailwind preset
141
+
142
+ ```bash
143
+ bun inspect:vue-tailwind
144
+ ```
145
+
125
146
  ## VS Code Support
126
147
 
127
148
  Install the [VS Code ESLint extension][2].
@@ -228,4 +249,5 @@ curl -s https://raw.githubusercontent.com/acfatah/eslint-preset/refs/heads/main/
228
249
  [1]: https://github.com/antfu/eslint-config
229
250
  [2]: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
230
251
  [3]: https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss
252
+ [4]: https://github.com/eslint/config-inspector
231
253
  [antfu-factory-fuction]: https://github.com/antfu/eslint-config?tab=readme-ov-file#customization
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@acfatah/eslint-preset",
3
3
  "type": "module",
4
- "version": "1.3.2",
4
+ "version": "1.3.4",
5
5
  "description": "Eslint config preset.",
6
6
  "author": "Achmad F. Ibrahim <acfatah@gmail.com>",
7
7
  "license": "MIT",
@@ -34,6 +34,8 @@
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
+ "inspect:default": "cd templates/default && bunx --bun eslint --inspect-config",
38
+ "inspect:vue-tailwind": "cd templates/vue-tailwind && bunx --bun eslint --inspect-config",
37
39
  "format": "bunx --bun eslint --fix",
38
40
  "typecheck": "tsc --noEmit",
39
41
  "release": "bun run build && bunx --bun bumpp"
@@ -47,16 +49,16 @@
47
49
  "eslint-plugin-vue": "^10.6.2"
48
50
  },
49
51
  "devDependencies": {
50
- "@antfu/eslint-config": "^6.7.1",
51
- "@commitlint/cli": "^20.2.0",
52
- "@commitlint/config-conventional": "^20.2.0",
52
+ "@antfu/eslint-config": "^6.7.3",
53
+ "@commitlint/cli": "^20.3.0",
54
+ "@commitlint/config-conventional": "^20.3.0",
53
55
  "@eslint/markdown": "^7.5.1",
54
56
  "@types/bun": "^1.3.5",
55
57
  "bumpp": "^10.3.2",
56
58
  "bun-plugin-dts": "^0.3.0",
57
59
  "eslint": "^9.39.2",
58
60
  "eslint-plugin-better-tailwindcss": "^3.8.0",
59
- "eslint-plugin-format": "^1.1.0",
61
+ "eslint-plugin-format": "^1.2.0",
60
62
  "eslint-plugin-vue": "^10.6.2",
61
63
  "simple-git-hooks": "^2.13.1"
62
64
  },