-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
@wordpress/comment-case
ESlint errors but without adding the di…
…sable-rule pragma (#37006) * Add comment case/punctuation rule * Add tests for comment-case rule * Add comment case rule * Change rule type to problem instead of layout * Update createFixerFunction to take an error type and handle other rules * Add messages for missing space and capital letter rule * Add function to check if comment is on the same line as code * Check if comment is followed/preceded directly by another comment This is to determine if it's part of a "multi line" comment. * Add check to ensure comment token is followed by a space * Add rule to check for capital letter at the start of comments * Refactor missingPunctuation rule * Add test cases for rule * Modify fixer function to work with block comments * Handle same-line Block comments and skip translator comments * Update test cases for new rules * Remove fixer function * Update regex to handle translator comments in the same match * Update tests following removal of fixer function Since it's been removed, the tests don't need to check the fixer works. * Add checks for pragmas, URLs, common words, and variable uses * Ensure standalone comments on consecutive lines are handled * Add tests for further cases * Match non-words on trimmed value only * Add rule to regex to cater for prettier pragma * Add tests for ignoring prettier pragma in eslint rule * Allow iPad, iMac, iOS, iPhone to be ignored by eslint rule * Add comment about what is ignored in commonWordsRegex * Update pragrma regex and tests to cater for ts-nocheck and globals * Add noinspection exception to pragma regex * Add istanbul to pragma exceptions * Add flow pragmas to exception * Change comment-case severity from error to warning * Apply automatic lint fixes for comment-case rule * Fix falsely flagged lint errors * Remove period from line where it shouldn't appear * Suppress lint rule for variable name testID is referring to a variable, stop it being considered by this rule * Ignore comment-case rule when referring to a variable * Ignore comment-case rule when referring to a variable * Ignore comment-case rule when referring to a variable * Ignore comment-case rule when referring to a variable * Ignore comment-case rule when referring to a variable * Undo changes introduced when prettier-ignore was capitalised * Ignore comment-case rule when referring to a variable * Ignore comment-case rule when referring to a variable * Remove commented out code * Ignore comment-case rule when referring to a variable * Remove commented out code * Reset browserslist-config to lowercase * Reset ts-expect-error directive * Reset globals to lowercase * Remove commented out code and fix incorrectly formatted file * Reset noinspection to lowercase * Ignore comment-case rule when referring to a variable * Reset globals to no period * Remove falsely fixed lint errors and remove commented out code * Remove falsely fixed lint errors * Remove falsely fixed lint errors * Remove falsely fixed lint errors and remove commented out code * Remove falsely fixed lint errors * Undo changes to .eslintrc.js * Undo changes included in 34964 * Remove references to @wordpress/comment-case rule * Update missing capitals that the linter skipped * Remove period from eslint rule disables * Remove period from @ts-nocheck * Update snapshot * Remove periods from end of eslint rule names * Apply suggestions from code review Co-authored-by: Greg Ziółkowski <[email protected]>
- Loading branch information
Showing
532 changed files
with
2,098 additions
and
2,119 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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.