Commit 47e60f8
authored
feat!: Stricter rule test validations (#17654)
* feat!: rule tester require suggestion matchers
* feat!: rule tester require message or messageId
* feat!: rule tester require output for suggestions
* feat!: rule tester only allow desc or messageId in suggestion matchers
* feat!: rule tester require suggestion output differs from original source code
* feat!: rule tester typecheck only and filename test case properties
* feat!: rule tester check whether code and output is equal
* docs: update rule tester documentation to reflect additional assertions
* fix: fix invalid test cases of builtin rules
* fix: remove unnecessary space for the suggestion prefix
* chore: fixing merge diversions
* fix: remove incorrect claim that data is required if messageId with placeholders is used
* chore: remove potentially confusing differentation between missing and failing fixer
* fix: better explanation for missing suggestions
* feat: support specifying an suggestion amount
* fix: ecmaVersion should be a languageOptions property (not parserOptions)
* chore: tweak message for omitting output if there is no autofix
* chore: fixup using old error message for the output property and update its docs
* fix: fixup reported error messages
* fix: refine more assertion messages
* docs: document suggestion can also be a number
* chore: simplify suggestion existence checks
* feat: check string and regexp error matchers for missing suggestion matchers
* chore: cleanup message for missing suggestions when testing only the message1 parent 1a94589 commit 47e60f8
10 files changed
Lines changed: 404 additions & 181 deletions
File tree
- docs/src/integrate
- lib/rule-tester
- tests
- fixtures/testers/rule-tester
- lib
- rule-tester
- rules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
735 | 735 | | |
736 | 736 | | |
737 | 737 | | |
738 | | - | |
739 | | - | |
740 | | - | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
741 | 741 | | |
742 | 742 | | |
743 | 743 | | |
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
747 | | - | |
| 747 | + | |
748 | 748 | | |
749 | 749 | | |
750 | | - | |
| 750 | + | |
751 | 751 | | |
752 | 752 | | |
753 | 753 | | |
| |||
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
787 | | - | |
| 787 | + | |
788 | 788 | | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
793 | 793 | | |
794 | 794 | | |
795 | 795 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
0 commit comments