You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When multiple files with the same suffix matching another language file are included in the filePaths there is an issue matching the correct file to check.
When multiple files with the same suffix matching another language file are included in the filePaths there is an issue matching the correct file to check.
I updated the example/multiple-files-per-locale on my fork to demonstrate this with a simple example using
search-results.json
and another filez-search-results.json
.When running
npm run lint
in that example it outputs the following errors, despite all keys matching in each file:I tracked this down to be an issue with the code here https://github.com/godaddy/eslint-plugin-i18n-json/blob/master/src/identical-keys.js#L10-L13 and was able to solve this use case by replacing that with
const match = sourceFilePath.substr(sourceFilePath.lastIndexOf('/') + 1);
The text was updated successfully, but these errors were encountered: