Skip to content

[Feature]: Preparation for future lint Rstest support #935

@elecmonkey

Description

@elecmonkey

What problem does this feature solve?

Related discussion: web-infra-dev/rstest#85 (comment)

Most of the rules for jest may also be applicable to Rstest. In a typical repo which using Rstest - web-infra-dev/rsbuild - around 2/3 of the eslint-plugin-jest rules can pass directly.

So I have a proposal: we could share an abstraction layer under both Jest and Rstest lint rules in our repo. Consider Rslint is now porting rules from eslint-plugin-jest actively, we can extract some utils outside first. once the jest rules become stable, we can start building Rstest rules on top of the existing things.

@fansenze @eryue0220

What does the proposed API of configuration look like?

some idea: maybe we could go on use in jest's rules in internal/plugins/jest/rules/*/*.go:

utils.ParseJestFnCall(node, ctx)

internally, that can become a wrapper for the new layer:

testfw.ParseFnCall(node, ctx, testfw.JestProfile)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions