Skip to content

Commit d8a7448

Browse files
authored
chore: update eslint to 9.23.0 (#40)
1 parent 59e154b commit d8a7448

File tree

20 files changed

+1953
-840
lines changed

20 files changed

+1953
-840
lines changed

.eslintignore

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

.eslintrc.json

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

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@ git checkout -b my-new-branch
2727
## Testing changes
2828

2929
From the terminal, change to one of the examples folder and run `pnpm run build && pnpm run preview`.
30-

README.md

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

30-
3130
## 🚀 Features
3231

3332
- 📖 [**Documentation & guides**](https://vite-pwa-org.netlify.app/)
@@ -51,12 +50,12 @@ Zero-config PWA Plugin for VitePress
5150
> Using any version older than v0.3 requires Vite 3.1.0+.
5251
5352
```bash
54-
npm i @vite-pwa/vitepress -D
53+
npm i @vite-pwa/vitepress -D
5554

56-
# yarn
55+
# yarn
5756
yarn add @vite-pwa/vitepress -D
5857

59-
# pnpm
58+
# pnpm
6059
pnpm add @vite-pwa/vitepress -D
6160
```
6261

@@ -66,8 +65,8 @@ You will need to wrap your VitePress config with `withPwa`:
6665

6766
```ts
6867
// .vitepress/config.ts
69-
import { defineConfig } from 'vitepress'
7068
import { withPwa } from '@vite-pwa/vitepress'
69+
import { defineConfig } from 'vitepress'
7170

7271
export default withPwa(defineConfig({
7372
/* your VitePress options */
@@ -86,7 +85,6 @@ Check out the type declaration [src/types.ts](./src/types.ts) and the following
8685
- [Web app manifests](https://developer.mozilla.org/en-US/docs/Web/Manifest)
8786
- [Workbox](https://developers.google.com/web/tools/workbox)
8887

89-
9088
## 📄 License
9189

9290
[MIT](./LICENSE) License &copy; 2022-PRESENT [Anthony Fu](https://github.com/antfu)

eslint.config.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import antfu from '@antfu/eslint-config'
2+
3+
export default await antfu(
4+
{
5+
ignores: [
6+
'**/build/**',
7+
'**/dist/**',
8+
'**/dev-dist/**',
9+
'**/node_modules/**',
10+
'*.d.ts',
11+
'!.vitepress',
12+
'!.vitepress/*',
13+
'!.vitepress/dist/',
14+
// TODO: check why README.md:L53 and CONTRIBUTING:L20 are failing
15+
'README.md',
16+
'CONTRIBUTING.md',
17+
],
18+
},
19+
{
20+
files: ['**/*.md/*.*'],
21+
rules: {
22+
'ts/no-this-alias': 'off',
23+
'ts/no-unused-vars': 'off',
24+
'n/handle-callback-err': 'off',
25+
'no-restricted-syntax': 'off',
26+
'no-labels': 'off',
27+
},
28+
},
29+
{
30+
files: [
31+
'**/*.ts',
32+
],
33+
rules: {
34+
'ts/no-unused-vars': 'off',
35+
},
36+
},
37+
)

examples/pwa-prompt/.vitepress/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { defineConfig } from 'vitepress'
21
import { withPwa } from '@vite-pwa/vitepress'
2+
import { defineConfig } from 'vitepress'
33

44
export default withPwa(defineConfig({
55
vite: {
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
import type { Theme } from 'vitepress'
2+
import DefaultTheme from 'vitepress/theme'
13
import { h } from 'vue'
2-
import Theme from 'vitepress/theme'
34

45
import ReloadPrompt from './components/ReloadPrompt.vue'
56

67
export default {
7-
...Theme,
8+
extends: DefaultTheme,
89
Layout() {
9-
return h(Theme.Layout, null, {
10+
return h(DefaultTheme.Layout, null, {
1011
'layout-bottom': () => h(ReloadPrompt),
1112
})
1213
},
13-
}
14+
} satisfies Theme

examples/pwa-prompt/tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
"incremental": false,
44
"target": "ESNext",
55
"lib": ["DOM", "ESNext"],
6+
"baseUrl": ".",
67
"module": "esnext",
78
"moduleResolution": "node",
8-
"baseUrl": ".",
99
"types": [
1010
"vite/client",
1111
"vitepress",
1212
"vite-plugin-pwa/client"
1313
],
14-
"esModuleInterop": true,
15-
"forceConsistentCasingInFileNames": true,
1614
"strict": true,
1715
"strictNullChecks": true,
1816
"noUnusedLocals": true,
17+
"esModuleInterop": true,
18+
"forceConsistentCasingInFileNames": true,
1919
"skipLibCheck": true
2020
},
2121
"include": [

examples/pwa-simple-assets-generator/.vitepress/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { defineConfig } from 'vitepress'
21
import { withPwa } from '@vite-pwa/vitepress'
2+
import { defineConfig } from 'vitepress'
33

44
const base = '/' // '/vite-plugin-pwa/'
55

examples/pwa-simple-assets-generator/tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
"incremental": false,
44
"target": "ESNext",
55
"lib": ["DOM", "ESNext"],
6+
"baseUrl": ".",
67
"module": "esnext",
78
"moduleResolution": "node",
8-
"baseUrl": ".",
99
"types": [
1010
"vite/client",
1111
"vitepress",
1212
"@vite-pwa/vitepress"
1313
],
14-
"esModuleInterop": true,
15-
"forceConsistentCasingInFileNames": true,
1614
"strict": true,
1715
"strictNullChecks": true,
1816
"noUnusedLocals": true,
17+
"esModuleInterop": true,
18+
"forceConsistentCasingInFileNames": true,
1919
"skipLibCheck": true
2020
},
2121
"include": [

examples/pwa-simple-sw/.vitepress/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { defineConfig } from 'vitepress'
21
import { withPwa } from '@vite-pwa/vitepress'
2+
import { defineConfig } from 'vitepress'
33

44
const base = '/' // '/vite-plugin-pwa/'
55

examples/pwa-simple-sw/.vitepress/sw.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/// <reference types="vite/client" />
22
/// <reference lib="webworker" />
33

4-
import { cleanupOutdatedCaches, createHandlerBoundToURL, precacheAndRoute } from 'workbox-precaching'
54
import { clientsClaim } from 'workbox-core'
5+
import { cleanupOutdatedCaches, createHandlerBoundToURL, precacheAndRoute } from 'workbox-precaching'
66
import { NavigationRoute, registerRoute } from 'workbox-routing'
77
import { NetworkOnly } from 'workbox-strategies'
88

examples/pwa-simple-sw/tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
"incremental": false,
44
"target": "ESNext",
55
"lib": ["DOM", "ESNext"],
6+
"baseUrl": ".",
67
"module": "esnext",
78
"moduleResolution": "node",
8-
"baseUrl": ".",
99
"types": [
1010
"vite/client",
1111
"vitepress",
1212
"@vite-pwa/vitepress"
1313
],
14-
"esModuleInterop": true,
15-
"forceConsistentCasingInFileNames": true,
1614
"strict": true,
1715
"strictNullChecks": true,
1816
"noUnusedLocals": true,
17+
"esModuleInterop": true,
18+
"forceConsistentCasingInFileNames": true,
1919
"skipLibCheck": true
2020
},
2121
"include": [

examples/pwa-simple/.vitepress/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { defineConfig } from 'vitepress'
21
import { withPwa } from '@vite-pwa/vitepress'
2+
import { defineConfig } from 'vitepress'
33

44
const base = '/' // '/vite-plugin-pwa/'
55

examples/pwa-simple/tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
"incremental": false,
44
"target": "ESNext",
55
"lib": ["DOM", "ESNext"],
6+
"baseUrl": ".",
67
"module": "esnext",
78
"moduleResolution": "node",
8-
"baseUrl": ".",
99
"types": [
1010
"vite/client",
1111
"vitepress",
1212
"@vite-pwa/vitepress"
1313
],
14-
"esModuleInterop": true,
15-
"forceConsistentCasingInFileNames": true,
1614
"strict": true,
1715
"strictNullChecks": true,
1816
"noUnusedLocals": true,
17+
"esModuleInterop": true,
18+
"forceConsistentCasingInFileNames": true,
1919
"skipLibCheck": true
2020
},
2121
"include": [

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
"module": "dist/index.mjs",
3333
"types": "dist/index.d.ts",
3434
"files": [
35-
"dist",
36-
"*.d.ts"
35+
"*.d.ts",
36+
"dist"
3737
],
3838
"scripts": {
3939
"build": "unbuild",
4040
"lint": "eslint .",
41-
"lint-fix": "nr lint --fix",
41+
"lint:fix": "nr lint --fix",
4242
"prepublishOnly": "npm run build",
4343
"release": "bumpp && npm publish"
4444
},
@@ -52,12 +52,12 @@
5252
}
5353
},
5454
"devDependencies": {
55-
"@antfu/eslint-config": "^0.43.1",
55+
"@antfu/eslint-config": "^4.11.0",
5656
"@antfu/ni": "^0.21.9",
5757
"@types/debug": "^4.1.12",
5858
"@typescript-eslint/eslint-plugin": "^6.11.0",
5959
"bumpp": "^9.2.0",
60-
"eslint": "^8.54.0",
60+
"eslint": "^9.23.0",
6161
"https-localhost": "^4.7.1",
6262
"typescript": "^5.4.5",
6363
"unbuild": "^2.0.0",

0 commit comments

Comments
 (0)