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

Add support for includeFilenameInKey to address issue #336 #353

Closed
wants to merge 1 commit into from

Conversation

its-lee
Copy link

@its-lee its-lee commented Jan 27, 2023

This PR addresses the issue raised here - #336 by adding support for the includeFilenameInKey field in .eslintrc.js settings.

This flag specifies if the filename (without the extension) should be considered as part of the message keys. This is only valid when localeKey is set to 'path'. For example, the key 'title' in the file 'common.json' would be considered to have key 'common.title' if this flag is set to true.

The only rule that this affected seemed to be no-duplicate-keys-in-locale - which I've addressed in this PR.

Documentation and tests have been added.

If we can get this into a release soon that would be amazing for us as we use your eslint plugin extensively! Thanks so much for your work on this project & it was pretty easy to work on.

@its-lee
Copy link
Author

its-lee commented Jan 27, 2023

In your CONTRIBUTING.md file (https://github.com/intlify/eslint-plugin-vue-i18n/blob/master/.github/CONTRIBUTING.md#pull-request-guidelines) you've stated to target the dev branch:

Submit a pull request to dev branch of @intlify/eslint-plugin-vue-i18n repository !

However, there is no such branch, so I've targeted master instead - please let me know if I need to do anything to help here.

@ota-meshi
Copy link
Member

Thank you for opening the PR.
However, I think many tests are missing. We need to add test cases for every rule that checks resource files. I also think the rules probably need to be modified.

Also, I'm wondering if that feature should be added to this plugin. I'm the only maintainer of this plugin, so I don't have the bandwidth to maintain that feature.
Rather than adding new options, I think you can probably do what you want by just using a .js resource as the resource file that this plugin is aware of.

@ota-meshi
Copy link
Member

It seems there are no updates so I'm closing this PR.

@ota-meshi ota-meshi closed this Jul 26, 2023
@its-lee its-lee deleted the include-filename-in-key branch January 6, 2025 14:57
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

Successfully merging this pull request may close these issues.

2 participants