@wildpastry/eslint-config 1.8.1 → 1.8.3
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 +15 -15
- package/package.json +9 -1
- package/types.d.ts +6 -0
package/README.md
CHANGED
|
@@ -65,31 +65,31 @@ Create an `eslint.config.js` file in your project root:
|
|
|
65
65
|
import { defineConfig, globalIgnores } from 'eslint/config';
|
|
66
66
|
import wildpastryConfig from '@wildpastry/eslint-config';
|
|
67
67
|
|
|
68
|
+
export default defineConfig([globalIgnores(['dist']), ...wildpastryConfig]);
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**For TypeScript projects with type-aware rules:**
|
|
72
|
+
|
|
73
|
+
If you want to use TypeScript type-aware rules, add parser configuration:
|
|
74
|
+
|
|
75
|
+
```javascript
|
|
76
|
+
import { defineConfig, globalIgnores } from 'eslint/config';
|
|
77
|
+
import wildpastryConfig from '@wildpastry/eslint-config';
|
|
78
|
+
|
|
68
79
|
export default defineConfig([
|
|
69
80
|
globalIgnores(['dist']),
|
|
70
81
|
...wildpastryConfig,
|
|
71
82
|
{
|
|
72
|
-
files: ['**/*.{ts,tsx}'],
|
|
73
|
-
extends: [
|
|
74
|
-
// All other recommended here
|
|
75
|
-
],
|
|
76
83
|
languageOptions: {
|
|
77
|
-
|
|
78
|
-
|
|
84
|
+
parserOptions: {
|
|
85
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json']
|
|
86
|
+
}
|
|
79
87
|
}
|
|
80
88
|
}
|
|
81
89
|
]);
|
|
82
90
|
```
|
|
83
91
|
|
|
84
|
-
### 6. Add
|
|
85
|
-
|
|
86
|
-
If using TypeScript, create a `types/wildpastry-eslint-config.d.ts` file:
|
|
87
|
-
|
|
88
|
-
```typescript
|
|
89
|
-
declare module '@wildpastry/eslint-config';
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
### 7. Add optional scripts to package.json
|
|
92
|
+
### 6. Add optional scripts to package.json
|
|
93
93
|
|
|
94
94
|
Add these scripts inside `"scripts": { ... }` in your package.json:
|
|
95
95
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildpastry/eslint-config",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.3",
|
|
4
4
|
"description": "ESLint configuration file",
|
|
5
5
|
"main": "index.js",
|
|
6
|
+
"types": "types.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"index.js",
|
|
9
|
+
".eslintrc",
|
|
10
|
+
".prettierrc",
|
|
11
|
+
"types.d.ts",
|
|
12
|
+
"README.md"
|
|
13
|
+
],
|
|
6
14
|
"scripts": {
|
|
7
15
|
"deploy": "npm publish --access public"
|
|
8
16
|
},
|