-
Notifications
You must be signed in to change notification settings - Fork 953
Fixes grunt check warnings in yoastseo #20952
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
Merged
mhkuu
merged 16 commits into
releasing-yoastseo
from
69-fix-grunt-check-warnings-in-packagesyoastseo
Dec 21, 2023
Merged
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
628ffa5
Update yarn.lock
FAMarfuaty 39d1aef
Fix no-useless-escape regexes
FAMarfuaty c8d25a0
remove unnecessary statements for disabling max-len
FAMarfuaty bfe9878
Remove TODO
FAMarfuaty 616ca2b
Remove comma dangling
FAMarfuaty 6e5760e
Also check spec directory for linting
FAMarfuaty 71fa95c
Use arrow functions so they won't require JSDoc
FAMarfuaty 09bc9b1
Move the variable declaration to avoid no-shadow eslint rule
FAMarfuaty cdb2b31
Disable no-loss-of-precision eslint rule
FAMarfuaty c72b907
Remove unnecessary statement to disable no-irregular-whitespace eslin…
FAMarfuaty 60bd9d7
Set maximum warnings to 12
FAMarfuaty 91f454c
Simplify function
FAMarfuaty 3cb734a
Rename function
FAMarfuaty ea669f9
Add unit tests for `getTransliterations`
FAMarfuaty 49b84c7
Split the calculateResult method to decrease complexity
FAMarfuaty 6b41a84
Lowers the number of eslint max-warnings to 10
mhkuu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import getTransliterations, { transliterations } from "../../src/config/getTransliterations"; | ||
|
|
||
| describe( "A test for retrieving transliterations for a specific locale", () => { | ||
| it( "should return the transliteration object for `nbnn` when the locale is either 'nb_NO' or 'nn_NO'", () => { | ||
| expect( getTransliterations( "nb_NO" ) ).toEqual( transliterations.nbnn ); | ||
| expect( getTransliterations( "nn_NO" ) ).toEqual( transliterations.nbnn ); | ||
| } ); | ||
| it( "should return the transliteration object for `ca` when the locale is either 'bal' or 'ca'", () => { | ||
| expect( getTransliterations( "bal" ) ).toEqual( transliterations.ca ); | ||
| expect( getTransliterations( "ca" ) ).toEqual( transliterations.ca ); | ||
| } ); | ||
| it( "should return the transliteration object from the array when the key for the specific locale is available in the array", () => { | ||
| expect( getTransliterations( "es_AR" ) ).toEqual( transliterations.es ); | ||
| expect( getTransliterations( "pt_PT" ) ).toEqual( transliterations.pt ); | ||
| } ); | ||
| it( "should return an empty array when the key for the specific locale is not available in the array", () => { | ||
| expect( getTransliterations( "jv_ID" ) ).toEqual( [] ); | ||
| } ); | ||
| it( "should return an empty array when no locale is passed", () => { | ||
| expect( getTransliterations() ).toEqual( [] ); | ||
| } ); | ||
| } ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
packages/yoastseo/spec/languageProcessing/helpers/regex/createRegexFromArraySpec.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
packages/yoastseo/spec/languageProcessing/helpers/regex/createWordRegexSpec.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...ec/languageProcessing/languages/de/helpers/internal/detectAndStemRegularParticipleSpec.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
...pec/scoring/assessments/inclusiveLanguage/helpers/isFollowedAndPrecededByExceptionSpec.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
For now I set the maximum warnings to 12. But it can also be changed later
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.
I'm going to lower it to 10, given that we currently have 10 warnings! 👍