Skip to content

New: rule tests-ordering #53

Open
Open
@aladdin-add

Description

@aladdin-add

if a rule has a very large number of test cases, it would be fine to reorder them based on options.

this rule can enforce code like this to improve readability:

      new RuleTester().run('foo', bar, {
        valid: [

          // valid tests for options: ['foo']
          { code: 'codeA', options: ['foo'] },
          { code: 'codeB', options: ['foo'] },
          // and more...

          // valid tests for options: ['bar']
          { code: 'codeA', options: ['bar'] },
          { code: 'codeB', options: ['bar'] },
          // and more...
        ],
      });

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions