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

Add linting workflow to CI #13

Merged
merged 4 commits into from
Feb 20, 2024
Merged

Add linting workflow to CI #13

merged 4 commits into from
Feb 20, 2024

Conversation

OliverStolzBO
Copy link
Collaborator

Run ESLint check when relevant files are changed.

.github/workflows/lint.yml Outdated Show resolved Hide resolved
.github/workflows/lint.yml Show resolved Hide resolved
@marbre
Copy link
Contributor

marbre commented Feb 20, 2024

How does this action work? Does it just run the linter (I am not familiar with typescript at all)? If yes, the linter will probably always pass if it isn't segfaulting. This means you need to check if there are changes to a prior / the checkin revision.

@OliverStolzBO
Copy link
Collaborator Author

The command eslint ./ (triggered by npm run lint) should check the code for linting errors according to the rules defined in the .eslintrc.js and return an error code if errors are found. Therefore the job should fail when linting errors exist.

@OliverStolzBO OliverStolzBO requested a review from marbre February 20, 2024 10:35
@marbre
Copy link
Contributor

marbre commented Feb 20, 2024

The command eslint ./ (triggered by npm run lint) should check the code for linting errors according to the rules defined in the .eslintrc.js and return an error code if errors are found. Therefore the job should fail when linting errors exist.

As you say should, you don't seem to be 100% confident. What about introducing a formatting error in an additional commit to test the pipeline? This commit can be dropped before merging.

@OliverStolzBO
Copy link
Collaborator Author

The workflow acts as expected (See the workflow for the code containing a formatting error)

@OliverStolzBO OliverStolzBO merged commit dd72006 into main Feb 20, 2024
2 checks passed
@OliverStolzBO OliverStolzBO deleted the ci/linting-workflow branch February 20, 2024 12:34
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.

2 participants