Skip to content

Commit c4946ba

Browse files
authored
chore: upgrade to latest eslint config (#52)
1 parent af88d4f commit c4946ba

29 files changed

+2035
-1085
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/cr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
node-version: 20
2828
registry-url: https://registry.npmjs.org/
29-
cache: "pnpm"
29+
cache: pnpm
3030
- run: pnpm install
3131
- run: pnpm build
3232
- run: pnpx pkg-pr-new publish --compact --no-template --pnpm

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ Zero-config PWA Assets Generator
2727
</a>
2828
</p>
2929

30-
3130
## 🚀 Features
3231

3332
- 📖 [**Documentation & guides**](https://vite-pwa-org.netlify.app/)
@@ -47,13 +46,13 @@ Zero-config PWA Assets Generator
4746
## 📦 Install
4847

4948
```bash
50-
# npm
51-
npm i @vite-pwa/assets-generator -D
49+
# npm
50+
npm i @vite-pwa/assets-generator -D
5251

53-
# yarn
52+
# yarn
5453
yarn add @vite-pwa/assets-generator -D
5554

56-
# pnpm
55+
# pnpm
5756
pnpm add @vite-pwa/assets-generator -D
5857
```
5958

eslint.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import antfu from '@antfu/eslint-config'
2+
3+
export default await antfu(
4+
{
5+
ignores: [
6+
'test/cases',
7+
],
8+
},
9+
{
10+
rules: {
11+
'node/prefer-global/process': 'off',
12+
'ts/no-this-alias': 'off',
13+
'no-restricted-globals': 'off',
14+
'node/handle-callback-err': 'off',
15+
},
16+
},
17+
)

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@vite-pwa/assets-generator",
33
"type": "module",
44
"version": "0.2.6",
5-
"packageManager": "pnpm@9.9.0",
5+
"packageManager": "pnpm@9.12.0",
66
"description": "Zero-config PWA Assets Generator",
77
"author": "antfu <[email protected]>",
88
"license": "MIT",
@@ -89,7 +89,7 @@
8989
"scripts": {
9090
"build": "unbuild && tsx scripts/postbuild.ts",
9191
"lint": "eslint .",
92-
"lint-fix": "nr lint --fix",
92+
"lint:fix": "nr lint --fix",
9393
"prepublishOnly": "npm run build",
9494
"release": "bumpp && npm publish",
9595
"run-playground": "pnpm -C playground run build",
@@ -104,15 +104,15 @@
104104
"unconfig": "^0.3.11"
105105
},
106106
"devDependencies": {
107-
"@antfu/eslint-config": "^0.43.1",
107+
"@antfu/eslint-config": "^3.7.3",
108108
"@antfu/ni": "^0.21.12",
109109
"@types/debug": "^4.1.12",
110110
"@types/node": "^18.17.15",
111111
"bumpp": "^9.2.0",
112-
"eslint": "^8.53.0",
113-
"esno": "^4.0.0",
114-
"typescript": "^5.3.3",
112+
"eslint": "^9.11.1",
113+
"esno": "^4.8.0",
114+
"typescript": "^5.6.2",
115115
"unbuild": "^2.0.0",
116-
"vitest": "^2.0.5"
116+
"vitest": "^2.1.2"
117117
}
118118
}

playground/pwa-assets.config.mts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
import { createAppleSplashScreens, defineConfig, minimal2023Preset } from '@vite-pwa/assets-generator/config'
21
import { readFile } from 'node:fs/promises'
2+
import {
3+
createAppleSplashScreens,
4+
defineConfig,
5+
minimal2023Preset,
6+
} from '@vite-pwa/assets-generator/config'
37

48
export default defineConfig({
59
headLinkOptions: {
6-
preset: '2023'
10+
preset: '2023',
711
},
812
preset: {
913
...minimal2023Preset,
1014
appleSplashScreens: createAppleSplashScreens({
1115
async darkImageResolver(imageName) {
1216
return imageName === 'pwa/public/favicon.svg'
13-
? await readFile('pwa/public/splash-dark.svg')
14-
: undefined
17+
? await readFile('pwa/public/splash-dark.svg')
18+
: undefined
1519
},
1620
padding: 0.3,
1721
resizeOptions: { fit: 'contain', background: 'white' },

0 commit comments

Comments
 (0)