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

Set up ESLint CI check #11

Closed
davidstraka2 opened this issue Feb 23, 2021 · 0 comments
Closed

Set up ESLint CI check #11

davidstraka2 opened this issue Feb 23, 2021 · 0 comments
Assignees
Labels
ci CI/CD changes env Development environment changes not covered by other tags

Comments

@davidstraka2
Copy link
Owner

Set up GitHub actions workflow job to check that source passes linting. This should be probably run only after build check passes.

@davidstraka2 davidstraka2 added env Development environment changes not covered by other tags ci CI/CD changes labels Feb 23, 2021
@davidstraka2 davidstraka2 added this to the Project Setup [v0.1.0] milestone Feb 23, 2021
davidstraka2 added a commit that referenced this issue Feb 28, 2021
Using the `max-warnings` CLI param set to value `0`, ESLint exits with
non-zero exit code if there are any warnings.

Additionally, any warning-level rules present in the recommended configs
have been set to error level as well (the default eslint config contains
no warnings, but the typescript-eslint plugin one does; see
https://github.com/eslint/eslint/blob/master/conf/eslint-recommended.js
for the default eslint recommended config,
https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/src/configs/recommended.ts
for the typescript-eslint plugin recommended config, and
https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/src/configs/recommended-requiring-type-checking.ts
for the typescript-eslint recommended-requiring-type-checking config).

This makes it so that these warnings don't accumulate silently while
passing CI.
davidstraka2 added a commit that referenced this issue Feb 28, 2021
Note that macOS was removed from the os matrix for this job (
same as with the style job), because the only difference an OS should
make here is the EOL used, and Linux and macOS both use LF, so having
one seems enough.
@davidstraka2 davidstraka2 self-assigned this Feb 28, 2021
davidstraka2 added a commit that referenced this issue Feb 28, 2021
Turned off the @typescript-eslint/no-unsafe-member-access ESLint rule,
because it is also set off by imported modules, which seems as a false
positive.

This fixes the errors which were missed during local check and later
revealed in CI, due to linting behaving differently when the project is
built (see issue #12).
Repository owner locked as resolved and limited conversation to collaborators Feb 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ci CI/CD changes env Development environment changes not covered by other tags
Projects
None yet
Development

No branches or pull requests

1 participant