gajus / eslint-config-canonical

The most comprehensive ES code style guide.
Other
598 stars 30 forks source link

Conflicting rule for *.test.ts files #42

Closed lew closed 2 years ago

lew commented 2 years ago

Your example config uses:

"extends": [
  "canonical/jest"
],
"files": "*.test.{ts,tsx}",

but in such a file the warning

Filename 'xyz.test.ts' does not match the naming convention.eslint(canonical/filename-match-regex)

is triggered.

Maybe set the default regex to include ".test."

gajus commented 2 years ago

I think we should ignore all files that start with . or contain multiple ..

This will cover most files that trigger false-positives for this rule, e.g.

typegen.config.js
.gitlab-ci.yml
next-env.d.ts
.roarr.js
gajus commented 2 years ago

https://regex101.com/r/JsB7cL/1 I think this covers most of these cases.

It still requires camel case, but allows names to start with . and contain multiple . in the name.

gajus commented 2 years ago

:tada: This issue has been resolved in version 33.0.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: