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

fix: website check targets #2996

Merged
merged 3 commits into from Jun 27, 2023
Merged

Conversation

afbjorklund
Copy link
Contributor

What does this PR do?

It was only possible to check the much bigger top-level targets...

But it should be possible to format and lint also the website dir.

Screenshot/screencast of this PR

$ cd website
$ yarn lint:check && yarn format:check
yarn run v1.22.19
$ eslint . --ext js,ts,tsx
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <5.1.0

YOUR TYPESCRIPT VERSION: 5.1.3

Please only submit bug reports when using the officially supported version.

=============
Done in 4.71s.
yarn run v1.22.19
$ prettier --check '**/*.{md,js}' 'src/**/*.{css,ts,tsx}'
Checking formatting...
All matched files use Prettier code style!
Done in 2.67s.

What issues does this PR fix or reference?

How to test this PR?

cd website
yarn run

@afbjorklund afbjorklund requested review from a team, slemeur, themr0c and benoitf as code owners June 25, 2023 08:04
@afbjorklund afbjorklund requested review from jeffmaury and lstocchi and removed request for a team June 25, 2023 08:04
website/.prettierrc Outdated Show resolved Hide resolved
website/.eslintrc.json Outdated Show resolved Hide resolved
@afbjorklund afbjorklund changed the title chore: fix website check targets fix: website check targets Jun 25, 2023
@afbjorklund afbjorklund requested a review from benoitf June 25, 2023 19:56
website/package.json Outdated Show resolved Hide resolved
website/package.json Outdated Show resolved Hide resolved
website/package.json Outdated Show resolved Hide resolved
Copy link
Collaborator

@benoitf benoitf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just missing the cache option and we're good to merge after that

It was only possible to check the much bigger top-level targets...

But it should be possible to format and lint also the website dir.

Note: eslint resolve project includes from the current directory.
So it'll look for website/website, workaround by running from root.

Ideally it would be possible to use the current project directory,
but that is only avaiable from eslintrc.js and not eslintrc.json

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
It was missing from the website package.json, even though
it was checking the website directory. So should be there.

The markdownlint-cli2 tool does **not** check in the parent
directory, unlike the other tools, so add explicit config.

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
prettier: node_modules/.cache/prettier

eslint: .eslintcache

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
@afbjorklund
Copy link
Contributor Author

$ yarn format:check && yarn lint:check
yarn run v1.22.19
$ prettier --cache --check '**/*.{md,js}' 'src/**/*.{css,ts,tsx}'
Checking formatting...
All matched files use Prettier code style!
Done in 2.84s.
yarn run v1.22.19
$ cd .. && eslint --cache --cache-location website/.eslintcache website --ext js,ts,tsx
Done in 5.16s.
$ yarn format:check && yarn lint:check
yarn run v1.22.19
$ prettier --cache --check '**/*.{md,js}' 'src/**/*.{css,ts,tsx}'
Checking formatting...
All matched files use Prettier code style!
Done in 0.60s.
yarn run v1.22.19
$ cd .. && eslint --cache --cache-location website/.eslintcache website --ext js,ts,tsx
Done in 1.42s.

Copy link
Collaborator

@benoitf benoitf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, thanks @afbjorklund

@benoitf
Copy link
Collaborator

benoitf commented Jun 27, 2023

tested and worked as expected, merging

@benoitf benoitf merged commit d7de133 into containers:main Jun 27, 2023
11 checks passed
@podman-desktop-bot podman-desktop-bot added this to the 1.2.0 milestone Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants