Skip to content

Commit 23dea10

Browse files
authored
chore: format & update .prettierignore (#187)
1 parent 68c2167 commit 23dea10

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ pnpm-lock.yaml
55
**/*.spec.js
66
**/*.spec.ts
77
**/dist
8+
# https://github.com/prettier/prettier/issues/5246
9+
**/*.html

scripts/snapshot.mjs

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import 'zx/globals'
44
$.verbose = false
55

66
if (!/pnpm/.test(process.env.npm_config_user_agent ?? ''))
7-
throw new Error('Please use pnpm (\'pnpm run snapshot\') to generate snapshots!')
7+
throw new Error("Please use pnpm ('pnpm run snapshot') to generate snapshots!")
88

99
const featureFlags = ['typescript', 'jsx', 'router', 'pinia', 'vitest', 'cypress', 'playwright']
1010
const featureFlagsDenylist = [['cypress', 'playwright']]
@@ -42,7 +42,10 @@ let flagCombinations = fullCombination(featureFlags)
4242
flagCombinations.push(['default'])
4343

4444
// Filter out combinations that are not allowed
45-
flagCombinations = flagCombinations.filter(combination => !featureFlagsDenylist.some(denylist => denylist.every(flag => combination.includes(flag))))
45+
flagCombinations = flagCombinations.filter(
46+
(combination) =>
47+
!featureFlagsDenylist.some((denylist) => denylist.every((flag) => combination.includes(flag)))
48+
)
4649

4750
// `--with-tests` are equivalent of `--vitest --cypress`
4851
// Previously it means `--cypress` without `--vitest`.

scripts/test.mjs

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@
22
import 'zx/globals'
33

44
// Vitest would otherwise enable watch mode by default.
5-
process.env.CI = '1';
5+
process.env.CI = '1'
66

77
const playgroundDir = path.resolve(__dirname, '../playground/')
8-
let projects = fs.readdirSync(playgroundDir, { withFileTypes: true })
9-
.filter(dirent => dirent.isDirectory())
10-
.map(dirent => dirent.name)
11-
.filter(name => !name.startsWith('.') && name !== 'node_modules')
8+
let projects = fs
9+
.readdirSync(playgroundDir, { withFileTypes: true })
10+
.filter((dirent) => dirent.isDirectory())
11+
.map((dirent) => dirent.name)
12+
.filter((name) => !name.startsWith('.') && name !== 'node_modules')
1213

13-
if (process.argv[3])
14-
projects = projects.filter(project => project.includes(process.argv[3]))
14+
if (process.argv[3]) projects = projects.filter((project) => project.includes(process.argv[3]))
1515

1616
cd(playgroundDir)
1717
console.log('Installing playground dependencies')
1818
await $`pnpm install`
1919

2020
for (const projectName of projects) {
2121
cd(path.resolve(playgroundDir, projectName))
22-
const packageJSON = require(path.resolve(playgroundDir, projectName, 'package.json'));
22+
const packageJSON = require(path.resolve(playgroundDir, projectName, 'package.json'))
2323

2424
console.log(`Building ${projectName}`)
2525
await $`pnpm build`

0 commit comments

Comments
 (0)