Skip to content
New issue

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

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

Already on GitHub? # to your account

chore: Lint only after building #56

Merged
merged 1 commit into from
Aug 17, 2023
Merged

chore: Lint only after building #56

merged 1 commit into from
Aug 17, 2023

Conversation

connorlanigan
Copy link
Member

@connorlanigan connorlanigan commented Aug 17, 2023

Issue #, if available:

Description of changes:

This PR moves the linting step until after the build has run. When a linting rule depends on type information, it needs to have access to all source code files, including those that are generated during the build, such as src/internal/generated/custom-css-properties in the components package. To get these files, the project has to be built first.

You can see an example failure in this build of a PR that adds linting rules which depend on type information: https://github.com/cloudscape-design/components/actions/runs/5877911019/job/15938954873?pr=1450

/home/runner/work/components/components/src/flashbar/collapsible-flashbar.tsx
Error:   223:16  error    Unsafe member access .flashbarStackDepth on an `any` value                      @typescript-eslint/no-unsafe-member-access

The any value mentioned there comes from this import (which points to a file that does not yet exist at that stage):

import customCssProps from '../internal/generated/custom-css-properties';

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@connorlanigan connorlanigan requested a review from a team as a code owner August 17, 2023 13:42
@connorlanigan connorlanigan requested review from abdhalees and removed request for a team August 17, 2023 13:42
@connorlanigan connorlanigan merged commit d818775 into main Aug 17, 2023
14 checks passed
@connorlanigan connorlanigan deleted the lint-after-build branch August 17, 2023 14:28
just-boris pushed a commit that referenced this pull request Dec 12, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants