8000 Fix eslint error in pre-commit ci by JeffersGlass · Pull Request #871 · pyscript/pyscript · GitHub
[go: up one dir, main page]

Skip to content

Fix eslint error in pre-commit ci #871

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

Merged
merged 1 commit into from
Oct 20, 2022

Conversation

JeffersGlass
Copy link
Contributor
@JeffersGlass JeffersGlass commented Oct 19, 2022

Fixes an error that causes eslint to fail in specific environments. Let's see if this allows pre-commit CI to pass for a change...

Edit: it passes! Fixes #834

@JeffersGlass JeffersGlass changed the title Test: Fix 'no unnecessary type assertion' Test: Fix eslint error in pre-commit ci? Oct 19, 2022
@JeffersGlass JeffersGlass changed the title Test: Fix eslint error in pre-commit ci? Fix eslint error in pre-commit ci Oct 19, 2022
@JeffersGlass JeffersGlass requested a review from antocuni October 19, 2022 21:11
@JeffersGlass
Copy link
Contributor Author
JeffersGlass commented Oct 19, 2022

For what it's worth, the eslint that this change fixed was; "This assertion is unnecessary since it does not change the type of the expression. @typescript-eslint/no-unnucessary-type-assertion"

-  const _global = (window || global) as any;
+  const _global = (window || global);

ESlint wasn't throwing this issue in a generic Ubutnu 22.04 environment nor in Windows 10, but in a docker image of 22:04 (like what Github actions runners use with ubuntu-latest) it error'd. No idea why it's different.

Copy link
Contributor
@antocuni antocuni left a comment

Choose a reason for hiding this comment

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

brilliant finding!
The ESLint behavior is very weird, but it's good that we finally found it :).

@antocuni antocuni merged commit 29ba943 into pyscript:main Oct 20, 2022
@JeffersGlass JeffersGlass deleted the eslint-precommit-fix branch October 20, 2022 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

pre-commit CI is failing
2 participants
0