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

Eslint complains about no-async-promise-executor in providers\hover.ts #1628

Closed
James-Yu opened this issue Aug 22, 2019 · 6 comments
Closed
Labels
dev Development discussions

Comments

@James-Yu
Copy link
Owner

James-Yu commented Aug 22, 2019

This issue won't follow the template as it is a dev-related one. The issue is as follows on master:

$ eslint --fix --cache --ext .ts,.js .

Some\Path\LaTeX-Workshop\src\providers\hover.ts
  47:29  error  Promise executor functions should not be async  no-async-promise-executor

✖ 1 problem (1 error, 0 warnings)

while the source looks like

this.getColor()
        return new Promise( async (resolve, _reject) => {
            const configuration = vscode.workspace.getConfiguration('latex-workshop')

and there is an

await this.findNewCommand(document.getText())

in the block, which calls

await this.extension.manager.findRoot()

@tamuratak have any idea how to resolve this error?

@James-Yu James-Yu added the dev Development discussions label Aug 22, 2019
@tamuratak
Copy link
Contributor

Please do not use different versions of eslint from the one in package.json.

@James-Yu
Copy link
Owner Author

Is there a reason why eslint 6 is not preferred? no-async-promise-executor is also enabled in eslint:recommended.

@tamuratak
Copy link
Contributor

It is essential that all the devs use the same version of a linter. Otherwise, the linter cannot do its job. If you want to use eslint 6, you should update package.json. Are you saying that you want to update it?

@James-Yu
Copy link
Owner Author

I would prefer working on the recommended eslint version and config, except when we have special reasons against that. That is why I was asking.

@tamuratak
Copy link
Contributor

Until very recently, typescript-eslint did not support eslint 6. See typescript-eslint/typescript-eslint/pull/645. That's the reason. I am not sure the current maturity.

@James-Yu
Copy link
Owner Author

I see. Will keep an eye on eslint 6. My environment has global eslint 6 but local eslint 5, that's why I can commit but got errors in command line.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dev Development discussions
Projects
None yet
Development

No branches or pull requests

2 participants