@wildpastry/eslint-config 1.8.0 → 1.8.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 +5 -26
- package/package.json +9 -1
- package/types.d.ts +6 -0
package/README.md
CHANGED
|
@@ -16,19 +16,19 @@ No errors, only warnings.
|
|
|
16
16
|
### 1. Install ESLint and Prettier core packages
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
npm i eslint prettier
|
|
19
|
+
npm i eslint prettier -D
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
### 2. Install ESLint plugins
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
npm i @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-react eslint-plugin-prettier
|
|
25
|
+
npm i @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-react eslint-plugin-prettier -D
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
### 3. Install @wildpastry custom ESLint config
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
npm i @wildpastry/eslint-config
|
|
31
|
+
npm i @wildpastry/eslint-config -D
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
### 4. Create .prettierrc file
|
|
@@ -65,31 +65,10 @@ 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([
|
|
69
|
-
globalIgnores(['dist']),
|
|
70
|
-
...wildpastryConfig,
|
|
71
|
-
{
|
|
72
|
-
files: ['**/*.{ts,tsx}'],
|
|
73
|
-
extends: [
|
|
74
|
-
// All other recommended here
|
|
75
|
-
],
|
|
76
|
-
languageOptions: {
|
|
77
|
-
ecmaVersion: 2020,
|
|
78
|
-
globals: globals.browser
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
]);
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### 6. Add TypeScript declaration (if needed)
|
|
85
|
-
|
|
86
|
-
If using TypeScript, create a `types/wildpastry-eslint-config.d.ts` file:
|
|
87
|
-
|
|
88
|
-
```typescript
|
|
89
|
-
declare module '@wildpastry/eslint-config';
|
|
68
|
+
export default defineConfig([globalIgnores(['dist']), ...wildpastryConfig]);
|
|
90
69
|
```
|
|
91
70
|
|
|
92
|
-
###
|
|
71
|
+
### 6. Add optional scripts to package.json
|
|
93
72
|
|
|
94
73
|
Add these scripts inside `"scripts": { ... }` in your package.json:
|
|
95
74
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildpastry/eslint-config",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.2",
|
|
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
|
},
|