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

valid-title is not triggered for disallowedWord with special character #341

Closed
aaron-goff opened this issue Dec 31, 2024 · 1 comment
Closed

Comments

@aaron-goff
Copy link

When trying to modify our usage of valid-title, I wanted to add a disallowedWord for '@new', as we somewhat frequently use this for ease of use in finding just the new tests we're working on writing. With the following setup in our .eslintrc.cjs file:

...
'playwright/valid-title': [
          'error',
          {
            disallowedWords: ['@new']
          }
        ]
...

The following is still considered valid:

test('@new', async () => {
    expect(true).toBe(true);
  });

I've tested this with !, @, #, and $, and none are picked up by the linter. I also validated the rest of my setup was fine, by changing '@new' to 'new', which does trigger the linting error.

@mskelton
Copy link
Member

Going to close in favor of #342, not sure I want to mess with this in valid-title since using tags in titles isn't really the recommended approach anymore with the tags option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants