Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: always run build || exit 0 before lint in CI #936

Merged
merged 1 commit into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ For example, ESLint can be run with `--fix` to auto-fix some lint rule complaint
pnpm run lint --fix
```

Note that you'll likely need to run `pnpm build` before `pnpm lint` so that lint rules which check the file system can pick up on any built files.

## Testing

[Vitest](https://vitest.dev) is used for tests.
Expand Down
1 change: 0 additions & 1 deletion script/migrate-test-e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const filesExpectedToBeChanged = new Set([
".eslintignore",
".eslintrc.cjs",
".github/DEVELOPMENT.md",
".github/workflows/lint.yml",
".github/workflows/lint-knip.yml",
".github/workflows/test.yml",
".gitignore",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ describe("createDevelopment", () => {
pnpm run lint --fix
\`\`\`

Note that you'll likely need to run \`pnpm build\` before \`pnpm lint\` so that lint rules which check the file system can pick up on any built files.

## Testing

[Vitest](https://vitest.dev) is used for tests.
Expand Down Expand Up @@ -215,6 +217,8 @@ describe("createDevelopment", () => {
pnpm run lint --fix
\`\`\`

Note that you'll likely need to run \`pnpm build\` before \`pnpm lint\` so that lint rules which check the file system can pick up on any built files.

## Testing

[Vitest](https://vitest.dev) is used for tests.
Expand Down
2 changes: 2 additions & 0 deletions src/steps/writing/creation/dotGitHub/createDevelopment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ ESLint can be run with \`--fix\` to auto-fix some lint rule complaints:`
pnpm run lint --fix
\`\`\`

Note that you'll likely need to run \`pnpm build\` before \`pnpm lint\` so that lint rules which check the file system can pick up on any built files.

${
!options.excludeTests &&
`## Testing
Expand Down
2 changes: 2 additions & 0 deletions src/steps/writing/creation/dotGitHub/createWorkflows.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ describe("createWorkflows", () => {
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm build || true
- run: pnpm lint

name: Lint
Expand Down Expand Up @@ -363,6 +364,7 @@ describe("createWorkflows", () => {
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- run: pnpm build || true
- run: pnpm lint

name: Lint
Expand Down
2 changes: 1 addition & 1 deletion src/steps/writing/creation/dotGitHub/createWorkflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function createWorkflows(options: Options) {
}),
"lint.yml": createWorkflowFile({
name: "Lint",
runs: ["pnpm lint"],
runs: ["pnpm build || true", "pnpm lint"],
}),
...(!options.excludeLintKnip && {
"lint-knip.yml": createWorkflowFile({
Expand Down