Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Jul 11, 2024
1 parent 653416d commit 32b2c36
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

4 changes: 3 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import antfu from '@antfu/eslint-config'

export default antfu()
export default antfu().append({
ignores: ['README.md'],
})
14 changes: 10 additions & 4 deletions test/e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('fontaine', () => {
)
// @ts-expect-error there must be a file or we _want_ a test failure
const css = await readFile(join(assetsDir, cssFile), 'utf-8')
expect(css.replace(/\.[\w]+\.woff2/g, '.woff2')).toMatchInlineSnapshot(`
expect(css.replace(/\.\w+\.woff2/g, '.woff2')).toMatchInlineSnapshot(`
"@font-face{font-family:Poppins variant fallback;src:local("Segoe UI");size-adjust:112.7753%;ascent-override:93.1055%;descent-override:31.0352%;line-gap-override:8.8672%}@font-face{font-family:Poppins variant fallback;src:local("Arial");size-adjust:112.1577%;ascent-override:93.6182%;descent-override:31.2061%;line-gap-override:8.916%}@font-face{font-family:Poppins variant;font-display:swap;src:url(/assets/font-CTKNfV9P.ttf) format("truetype")}@font-face{font-family:Roboto fallback;src:local("Segoe UI");size-adjust:100.3304%;ascent-override:92.4679%;descent-override:24.3337%;line-gap-override:0%}@font-face{font-family:Roboto fallback;src:local("Arial");size-adjust:99.7809%;ascent-override:92.9771%;descent-override:24.4677%;line-gap-override:0%}@font-face{font-family:Roboto;font-display:swap;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu72xKKTU1Kvnz.woff2) format("woff2")}@font-face{font-family:Inter fallback;src:local("Segoe UI");size-adjust:107.6492%;ascent-override:89.9914%;descent-override:22.4319%;line-gap-override:0%}@font-face{font-family:Inter fallback;src:local("Arial");size-adjust:107.0596%;ascent-override:90.4869%;descent-override:22.5554%;line-gap-override:0%}@font-face{font-family:Inter;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2) format("woff2")}:root{--someFont: "Poppins variant", "Poppins variant fallback"}h1{font-family:Poppins variant,Poppins variant fallback,sans-serif}.roboto{font-family:Roboto,Roboto fallback,Arial,Helvetica,sans-serif}p{font-family:Poppins variant,Poppins variant fallback}div{font-family:var(--someFont)}.inter{font-family:Inter,Inter fallback}
"
`)
Expand All @@ -34,9 +34,15 @@ async function $(literals: TemplateStringsArray, ...values: any[]) {
const proc = execaCommand(cmd, {
stdio: 'pipe',
})
proc.stdin && process.stdin.pipe(proc.stdin)
proc.stdout && proc.stdout.pipe(process.stdout)
proc.stderr && proc.stderr.pipe(process.stderr)
if (proc.stdin) {
process.stdin.pipe(proc.stdin)
}
if (proc.stdout) {
proc.stdout.pipe(process.stdout)
}
if (proc.stderr) {
proc.stderr.pipe(process.stderr)
}
const result = await proc
return result.stdout
}

0 comments on commit 32b2c36

Please sign in to comment.