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

chore(suite): add @typescript-eslint/strict-boolean-expressions rule as warning #10757

Closed
wants to merge 2 commits into from

Conversation

peter-sanderson
Copy link
Contributor

@peter-sanderson peter-sanderson commented Jan 23, 2024

image

yarn nx:lint:js

.eslintrc.js Outdated
@@ -11,6 +11,8 @@ module.exports = {
ecmaFeatures: {
jsx: true,
},
project: ["./tsconfig.json"],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is required to have for @typescript-eslint/strict-boolean-expressions rule to work

@@ -0,0 +1,5 @@
module.exports = {
parserOptions: {
tsconfigRootDir: __dirname,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Every package needs to have this ti make sure the eslint uses the local tsconfig and not the global one as most of packages has some custom configurations.

@@ -1,3 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-shadow
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think those errors poped up when ESLint got the type-information from typescript. But not sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems to be somehow globally imported from typescript/lib/lib.dom.d.ts

@peter-sanderson peter-sanderson force-pushed the add-strict-boolean-expressions branch 2 times, most recently from 4c888a6 to d5c2f3c Compare January 23, 2024 11:03
@peter-sanderson
Copy link
Contributor Author

  • Todo: revert the shadow-ignore commint and figure out how to not import global types

@peter-sanderson peter-sanderson force-pushed the add-strict-boolean-expressions branch 2 times, most recently from 5fd4d23 to c93d308 Compare February 9, 2024 12:34
@peter-sanderson peter-sanderson force-pushed the add-strict-boolean-expressions branch 5 times, most recently from b13e2d3 to 0735de8 Compare February 19, 2024 12:06
Copy link
Contributor

@jvaclavik jvaclavik left a comment

Choose a reason for hiding this comment

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

let's be brave

🚢 🇮🇹

@tomasklim tomasklim removed their request for review August 4, 2024 09:13
@komret komret removed their request for review August 6, 2024 10:50
@peter-sanderson peter-sanderson deleted the add-strict-boolean-expressions branch October 8, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: 🏁 Finalizing
Development

Successfully merging this pull request may close these issues.

2 participants