Skip to content

Make 'await-async-queries' rule auto-fixable #914

Open
@neriyarden

Description

@neriyarden

What rule do you want to change?

await-async-queries

Does this change cause the rule to produce more or fewer warnings?

Fewer warnings

How will the change be implemented?

When the eslint is run with the --fix flag, an await will be inserted before the async query

For example:

findByText('text') 
=> await findByText('text')

Example code

findByText('text') 
after fix => await findByText('text')


const promise = () => findByText('text')
promise()
after fix => await promise()

How does the current rule affect the code?

The error has to be manually fixed

How will the new rule affect the code?

Auto-fix will enhance dev experience and productivity

Anything else?

I would like to develop this myself :)

I will need some help on how to test my fixer. Is there a kind of test that tests the auto-fix of rules? If not, is it possible to install and run the plugin in this repo itself? Any other suggestions?

Do you want to submit a pull request to change the rule?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions