Skip to content

Post-merge-review: template-no-implicit-this support regex patterns in allow option#2707

Merged
NullVoxPopuli merged 1 commit intoember-cli:masterfrom
johanrd:fix/template-no-implicit-this-regex-allow
Apr 15, 2026
Merged

Post-merge-review: template-no-implicit-this support regex patterns in allow option#2707
NullVoxPopuli merged 1 commit intoember-cli:masterfrom
johanrd:fix/template-no-implicit-this-regex-allow

Conversation

@johanrd
Copy link
Copy Markdown
Contributor

@johanrd johanrd commented Apr 14, 2026

Summary

  • Extends the allow option to accept RegExp instances in addition to exact strings
  • Teams can now allowlist entire naming conventions with one entry, e.g. allow: [/^data-test-.+/]
  • Works in eslint.config.js (flat config) and .eslintrc.cjs; not in .eslintrc.json (which doesn't support non-JSON values)

Schema change

items changed from { type: 'string' } to { anyOf: [{ type: 'string' }, { instanceof: 'RegExp' }] }. The instanceof keyword is non-standard JSON Schema but is handled by Ajv (which ESLint uses internally).

Reference

Rule ember-template-lint test
template-no-implicit-this no-implicit-this-test.js line 28

Allows users to pass RegExp instances in the `allow` array, e.g.
`[/^data-test-.+/]`, in addition to exact string matches.
@johanrd johanrd changed the title feat(template-no-implicit-this): support regex patterns in allow option Post-merge-review: template-no-implicit-this support regex patterns in allow option Apr 14, 2026
@NullVoxPopuli NullVoxPopuli merged commit 041bcfc into ember-cli:master Apr 15, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants