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

Enable strict type checked rules #392

Merged
merged 47 commits into from May 7, 2024
Merged

Enable strict type checked rules #392

merged 47 commits into from May 7, 2024

Conversation

wjhsf
Copy link
Contributor

@wjhsf wjhsf commented Mar 21, 2024

When doing #383, I noticed that we extend @typescript-eslint/recommended-type-checked and @typescript-eslint/strict. There's also @typescript-eslint/strict-type-checked which is includes those two configs, plus a few additional type checked rules.

I also moved us from .eslintrc to the new flat config, just because we can!

wjhsf and others added 30 commits March 13, 2024 13:31
Primarily allowing either value for user input.
Co-authored-by: Colin Casey <casey.colin@gmail.com>
package.json Show resolved Hide resolved
Copy link
Contributor

@colincasey colincasey left a comment

Choose a reason for hiding this comment

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

@wjhsf not sure what's going on with this PR but I tried to work around the bad resolutions in package-lock.json by just deleting and regenerating it locally with a fresh npm install. But, after doing that, I get errors when I execute npm run lint that eslint-config-prettier cannot be found.

package-lock.json Outdated Show resolved Hide resolved
@wjhsf wjhsf requested a review from colincasey March 22, 2024 15:20
@colincasey
Copy link
Contributor

@wjhsf I'm not so sure about these changes. If you check the test output of https://github.com/salesforce/tough-cookie/actions/runs/8392570051/job/22985505761?pr=392 it looks like there are regressions introduced with the vows test suite which we're using as a sanity check for these types of refactorings.

Maybe a better approach is to disable all the new rules introduced with @typescript-eslint/strict-type-checked and have incremental PRs with each rule enabled + it's required changes?

@wjhsf
Copy link
Contributor Author

wjhsf commented Apr 22, 2024

Since we don't super care about how clean the vows tests are, I've just disabled the violated rules instead of fixing them, except one violation that's trivial.

eslint.config.mjs Outdated Show resolved Hide resolved
@wjhsf wjhsf requested a review from colincasey May 3, 2024 14:59
@wjhsf wjhsf merged commit 460bbe1 into master May 7, 2024
8 checks passed
@wjhsf wjhsf deleted the strict-type-checked branch May 7, 2024 14:31
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

2 participants