Skip to content

New Rule: no-invalid-names #203

Open
@bmish

Description

@bmish
Member

Disallow unwanted module/test string names.

  • No leading/trailing spaces (autofixable)
  • No empty strings
  • No missing name (ava/test-title)
  • No non-string values (numbers, objects, etc)
  • No strings starting/ending in qunit delimiters (> or :)
  • We could also allow a regexp pattern option to be passed to this rule defining the required format (ava/test-title-format)

A few disallowed examples:

module(' Foo Bar @unit  ', function () {});
test(' it does foo ', function () {});

Related: qunit/no-identical-names

Activity

platinumazure

platinumazure commented on Jan 3, 2023

@platinumazure
Collaborator

Working on this.

linked a pull request that will close this issue on Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @platinumazure@bmish

      Issue actions

        New Rule: `no-invalid-names` · Issue #203 · qunitjs/eslint-plugin-qunit