@angelblanco/eslint-config 0.0.1 → 1.0.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 +12 -12
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -23,9 +23,9 @@ pnpm add -D eslint @angelblanco/eslint-config
|
|
|
23
23
|
Create `eslint.config.js` in your project root:
|
|
24
24
|
|
|
25
25
|
```js
|
|
26
|
-
import eslintConfig from '@angelblanco/eslint-config'
|
|
26
|
+
import eslintConfig from '@angelblanco/eslint-config';
|
|
27
27
|
|
|
28
|
-
export default eslintConfig()
|
|
28
|
+
export default eslintConfig();
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
### Custom Options
|
|
@@ -33,7 +33,7 @@ export default eslintConfig()
|
|
|
33
33
|
You can customize the default options by passing a function:
|
|
34
34
|
|
|
35
35
|
```js
|
|
36
|
-
import eslintConfig from '@angelblanco/eslint-config'
|
|
36
|
+
import eslintConfig from '@angelblanco/eslint-config';
|
|
37
37
|
|
|
38
38
|
export default eslintConfig((defaultOptions) => {
|
|
39
39
|
return {
|
|
@@ -42,8 +42,8 @@ export default eslintConfig((defaultOptions) => {
|
|
|
42
42
|
...defaultOptions.stylistic,
|
|
43
43
|
semi: false, // Disable semicolons
|
|
44
44
|
},
|
|
45
|
-
}
|
|
46
|
-
})
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
### Custom Rules
|
|
@@ -51,11 +51,11 @@ export default eslintConfig((defaultOptions) => {
|
|
|
51
51
|
Add your own ESLint configs as a second parameter:
|
|
52
52
|
|
|
53
53
|
```js
|
|
54
|
-
import eslintConfig from '@angelblanco/eslint-config'
|
|
54
|
+
import eslintConfig from '@angelblanco/eslint-config';
|
|
55
55
|
|
|
56
56
|
export default eslintConfig(
|
|
57
57
|
null, // Use default options
|
|
58
|
-
|
|
58
|
+
defaultConfigs => [
|
|
59
59
|
...defaultConfigs,
|
|
60
60
|
{
|
|
61
61
|
rules: {
|
|
@@ -63,7 +63,7 @@ export default eslintConfig(
|
|
|
63
63
|
},
|
|
64
64
|
},
|
|
65
65
|
]
|
|
66
|
-
)
|
|
66
|
+
);
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
## Creating Your Own Config
|
|
@@ -82,14 +82,14 @@ Update `package.json` with your information:
|
|
|
82
82
|
{
|
|
83
83
|
"name": "@yourname/eslint-config",
|
|
84
84
|
"author": "Your Name",
|
|
85
|
-
"repository": "yourname/eslint-config"
|
|
86
|
-
// ... other fields
|
|
85
|
+
"repository": "yourname/eslint-config"
|
|
87
86
|
}
|
|
88
87
|
```
|
|
89
88
|
|
|
90
89
|
### 3. Modify the Configuration
|
|
91
90
|
|
|
92
91
|
Edit `src/index.ts` to adjust:
|
|
92
|
+
|
|
93
93
|
- Default options (TypeScript, Vue, formatters, etc.)
|
|
94
94
|
- Stylistic preferences (semicolons, indentation, quotes)
|
|
95
95
|
- Custom rules and overrides
|
|
@@ -120,9 +120,9 @@ pnpm add -D eslint @yourname/eslint-config
|
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
```js
|
|
123
|
-
import eslintConfig from '@yourname/eslint-config'
|
|
123
|
+
import eslintConfig from '@yourname/eslint-config';
|
|
124
124
|
|
|
125
|
-
export default eslintConfig()
|
|
125
|
+
export default eslintConfig();
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
## License
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angelblanco/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"packageManager": "pnpm@10.20.0+sha512.cf9998222162dd85864d0a8102e7892e7ba4ceadebbf5a31f9c2fce48dfce317a9c53b9f6464d1ef9042cba2e02ae02a9f7c143a2b438cd93c91840f0192b9dd",
|
|
6
6
|
"description": "Ángel Blanco's Eslint Config - based on @antfu/eslint-config",
|
|
7
7
|
"author": "Ángel Blanco",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"build": "tsup index.ts --format cjs,esm --dts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@antfu/eslint-config": "^
|
|
41
|
+
"@antfu/eslint-config": "^7.4.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"eslint": "^
|
|
45
|
-
"eslint-plugin-format": "^1.0
|
|
44
|
+
"eslint": "^10.0.0",
|
|
45
|
+
"eslint-plugin-format": "^1.4.0",
|
|
46
46
|
"jiti": "^2.6.1",
|
|
47
|
-
"tsup": "^8.5.
|
|
47
|
+
"tsup": "^8.5.1",
|
|
48
48
|
"typescript": "^5.9.3"
|
|
49
49
|
}
|
|
50
|
-
}
|
|
50
|
+
}
|