Skip to content

Commit

Permalink
chore: linting and extra bumps
Browse files Browse the repository at this point in the history
  • Loading branch information
harlan-zw committed Nov 16, 2023
1 parent ac19b20 commit a7a86ab
Show file tree
Hide file tree
Showing 36 changed files with 21,680 additions and 21,647 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
demo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -20,7 +20,7 @@ jobs:
- name: Use Node.js v16
uses: actions/setup-node@v2
with:
node-version: v16
node-version: v18
registry-url: https://registry.npmjs.org/
cache: pnpm

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/[email protected]

- name: Use Node.js v16
- name: Use Node.js v18
uses: actions/setup-node@v2
with:
node-version: v16
node-version: v18
registry-url: https://registry.npmjs.org/
cache: pnpm

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]
# os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest]
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Need a hand? Join the [Discord](https://discord.gg/275MBUBvgP) for one-on-one he
Unlighthouse will save your reports in `outputDir`,
it's recommended you .gitignore these files.

```.gitignore
```
.unlighthouse
```

Expand Down
6 changes: 3 additions & 3 deletions examples/nextjs/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export default {
{
site: 'http://localhost:3000',
debug: true,
}
)
},
),
)
return config
}
},
}
7 changes: 6 additions & 1 deletion examples/nextjs/pages/[...slug].js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ function CatchAll() {
const router = useRouter()
const { slug } = router.query

return <p>Slug: {slug}</p>
return (
<p>
Slug:
{slug}
</p>
)
}

export default CatchAll
23 changes: 16 additions & 7 deletions examples/nextjs/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ export default function Home() {

<main>
<h1 className="title">
Welcome to <a href="https://nextjs.org">Next.js!</a>
Welcome to
{' '}
<a href="https://nextjs.org">Next.js!</a>
</h1>

<p className="description">
Get started by editing <code>pages/index.js</code>
Get started by editing
{' '}
<code>pages/index.js</code>
</p>

<div className="grid">
Expand Down Expand Up @@ -65,12 +69,14 @@ export default function Home() {
target="_blank"
rel="noopener noreferrer"
>
Powered by{' '}
Powered by
{' '}
<img src="/vercel.svg" alt="Vercel" className="logo" />
</a>
</footer>

<style jsx>{`
<style jsx>
{`
.container {
min-height: 100vh;
padding: 0 0.5rem;
Expand Down Expand Up @@ -199,9 +205,11 @@ export default function Home() {
flex-direction: column;
}
}
`}</style>
`}
</style>

<style jsx global>{`
<style jsx global>
{`
html,
body {
padding: 0;
Expand All @@ -214,7 +222,8 @@ export default function Home() {
* {
box-sizing: border-box;
}
`}</style>
`}
</style>
</div>
)
}
7 changes: 6 additions & 1 deletion examples/nextjs/pages/post/[pid].js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ function Post() {
const router = useRouter()
const { pid } = router.query

return <p>Post: {pid}</p>
return (
<p>
Post:
{pid}
</p>
)
}

export default Post
20 changes: 10 additions & 10 deletions examples/nuxt-pokemon/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
{
"compilerOptions": {
"target": "es2018",
"module": "esnext",
"moduleResolution": "node",
"lib": [
"esnext",
"esnext.asynciterable",
"dom"
],
"esModuleInterop": true,
"sourceMap": true,
"strict": true,
"resolveJsonModule": true,
"baseUrl": "..",
"module": "esnext",
"moduleResolution": "node",
"paths": {
"~/*": [
"./*"
Expand All @@ -21,19 +17,23 @@
"./*"
]
},
"resolveJsonModule": true,
"types": [
"unlighthouse",
"unlighthouse/nuxt.d.ts",
"unlighthouse/nuxt",
"@nuxt/types"
]
],
"strict": true,
"sourceMap": true,
"esModuleInterop": true
},
"include": [
"node_modules/unlighthouse/nuxt.d.ts"
],
"references": [
{
"path": "../../"
}
],
"include": [
"node_modules/unlighthouse/nuxt.d.ts"
]
}
3 changes: 2 additions & 1 deletion examples/vitesse/src/modules/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import type { UserModule } from '~/types'
// Don't need this? Try vitesse-lite: https://github.com/antfu/vitesse-lite
const messages = Object.fromEntries(
Object.entries(
import.meta.globEager('../../locales/*.y(a)?ml'))
import.meta.globEager('../../locales/*.y(a)?ml'),
)
.map(([key, value]) => {
const yaml = key.endsWith('.yaml')
return [key.slice(14, yaml ? -5 : -4), value.default]
Expand Down
3 changes: 2 additions & 1 deletion examples/vitesse/src/shims.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ declare interface Window {

// with vite-plugin-md, markdowns can be treat as Vue components
declare module '*.md' {
import { ComponentOptions } from 'vue'
import type { ComponentOptions } from 'vue'

const component: ComponentOptions
export default component
}
24 changes: 12 additions & 12 deletions examples/vitesse/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"compilerOptions": {
"baseUrl": ".",
"module": "ESNext",
"incremental": false,
"target": "es2016",
"lib": ["DOM", "ESNext"],
"strict": true,
"esModuleInterop": true,
"incremental": false,
"skipLibCheck": true,
"baseUrl": ".",
"module": "ESNext",
"moduleResolution": "node",
"paths": {
"~/*": ["src/*"]
},
"resolveJsonModule": true,
"noUnusedLocals": true,
"strictNullChecks": true,
"forceConsistentCasingInFileNames": true,
"types": [
"unlighthouse",
"cypress",
"vite/client",
"vite-plugin-pages/client",
"vite-plugin-vue-layouts/client"
],
"paths": {
"~/*": ["src/*"]
}
"strict": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"skipLibCheck": true
},
"exclude": ["dist", "node_modules"]
}
1 change: 0 additions & 1 deletion integrations/nuxt/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export default defineNuxtModule<ModuleOptions>({
dev: true,
server: true,
}
// @ts-expect-error untyped
addVitePlugin(VitePlugin(config), pluginOptions)
addWebpackPlugin(WebpackPlugin(config), pluginOptions)

Expand Down
4 changes: 1 addition & 3 deletions packages/cli/src/ci.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ async function run() {
},
},
cache: false,
},
{ name: 'ci' },
)
}, { name: 'ci' })

const { resolvedConfig, setCiContext, hooks, worker, start } = useUnlighthouse()

Expand Down
Loading

0 comments on commit a7a86ab

Please sign in to comment.