-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Add ignore
option to the filename-case
rule
#431
Add ignore
option to the filename-case
rule
#431
Conversation
I think you we need regexp support, for examples |
a172098
to
2c2889a
Compare
@fisker done |
strange problem with integration tests, what tips will be? |
something in |
ignore
option for the filename-case
ruleignore
option for the filename-case
rule
@sindresorhus I'm updating dependencies |
testCase('src/foo/{foo_bar}.js', 'snakeCase') | ||
testCase('src/foo/{foo_bar}.js', 'snakeCase'), | ||
testCaseWithOptions(undefined, undefined, [ | ||
{case: 'kebabCase', ignore: ['FOOBAR\\.js']} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should allow specifying regex literals. Most people use JS configs, so it's nicer to also be able to specify literals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sindresorhus just allow use /foobar\.js/
as regexp, right? When i use string notation foobar\\.js
it is also regexp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow both both regex literal and regex in a string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is regex in a string
a good idea? maybe confusing people
4e61bba
to
55c617c
Compare
@sindresorhus @fisker done |
@@ -68,11 +68,19 @@ You can set the `cases` option to allow multiple cases: | |||
|
|||
### ignore | |||
|
|||
Type: `RegExp[]`\ | |||
Type: `Array<string | RegExp>`\ | |||
Default: `[]` | |||
|
|||
Filenames to ignore. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explicitly say that if a string is given, it's interpreted as a regex inside a string.
so, to ignore |
Correct. It might be worth adding a tip about that to the docs, as a lot of user miss how to correctly escape regexes. |
@sindresorhus done, English is not my native so I can make a mistake somewhere 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feels hard to use, but LGTM
ignore
option for the filename-case
ruleignore
option to the filename-case
rule
fixes #395