-
-
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
prevent-abbreviations
- non-ASCII characters ignored in filenames
#2292
Labels
Comments
It looks like the bug is that it's not counting non-ASCII characters, so it sees "mi" instead of the full filename. This is a bug and can be fixed. If you want to disable specific rules on specific files, you can already do so via eslint overrides. |
fregante
changed the title
bug/feature request(prevent-abbreviations): ignoring name checking for HTML files/files containing non-ASCII characters in names
Feb 29, 2024
prevent-abbreviations
- non-ASCII characters ignored in filenames
MichaelBlm
added a commit
to MichaelBlm/eslint-plugin-unicorn
that referenced
this issue
Apr 4, 2024
MichaelBlm
added a commit
to MichaelBlm/eslint-plugin-unicorn
that referenced
this issue
Apr 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1. Summary
If I use eslint-plugin-html and check JavaScript inside HTML by using Unicorn, I get errors like this:
2. MCVE
2.1. Files
.eslintrc.yml
:Мiръ.html
(“мiръ” meaning “world”):2.2. Steps to reproduce
2.3. Behavior
2.3.1. Desired
No errors.
2.3.2. Current
3. Possible implementations of the desired behavior
Make it possible to ignore HTML files via the
ignore
option or by introducing a new option such ascheckFilenamesExtensions
. For example:In this case, Unicorn will solely check names of files with the
.js
extension, but not with other extensions like.html
or.md
(if the user is using eslint-plugin-markdown).Make it possible to skip filenames like
Мiръ
containing non-ASCII symbols. For example, via the optioncheckNonASCIIFilenames: false
.4. Not helped
I couldn’t find on Google and in this repository how I can solve the problem.
I can’t ignore all
.html
files with theignore
option. prevent-abbreviations documentation:5. Don’t offer
5.1. “Just use checkFilenames: false”
I need to ignore solely HTML files, I want to use
checkFilenames
for JavaScript files.checkFilenames: false
also ignores checking of.js
files.5.2. “Just ignore specific filenames”
Like this:
It would be nice if it were possible to ignore all
.html
files instead of ignoring files individually. I solely use ASCII symbols for my JavaScript filenames, but I don’t think HTML filenames should have the same restrictions. I haven’t found reasons why I shouldn’t use filenames likeМiръ
for HTML files.6. Environment
Thanks.
The text was updated successfully, but these errors were encountered: