-
Notifications
You must be signed in to change notification settings - Fork 258
Proposal: Changing some linting rules, making some fixes #8295
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
base: main
Are you sure you want to change the base?
Conversation
Dependency Review✅ No vulnerabilities or OpenSSF Scorecard issues found.Scanned FilesNone |
| if (connected) wsConnections.value[workspaceId] = connected; | ||
|
|
||
| await db.setConnections({ ..._wsConnections.value }); | ||
| db.setConnections({ ..._wsConnections.value }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that we don't await non-async things! Is this enforced by require-await? Seems like a hidden feature of that rule.
|
|
||
| // warning on this because we have some shenanigans where it is a promise but a literal `await` is not present | ||
| "@typescript-eslint/require-await": "warn", | ||
| "@typescript-eslint/require-await": 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is the only one I'm curious about. We don't want this to be "error" (2)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both in the pinia stores, and in the web worker ... basically, we know that with Comlink, things return a promise, so its an async function, even if there isn't an await inside of it... and the same goes to the pinia store... there isn't an await, but the funcs have to be async for the plugin that we wrote to work
93f7648 to
e564b24
Compare
Proposal for some linting rule fixes—DISCUSS.
This basically leave one rule in warning state that is giving useful feedback to us while making decisions
@typescript-eslint/restrict-template-expressions