Commit 740b208
authored
* fix: ignore messages without a `ruleId` in `getRulesMetaForResults`
* `FlatESLint.prototype.getRulesMetaForResults` will now ignore messages without a `ruleId` instead of crashing with a `TypeError`.
* Unit tests for `getRulesMetaForResults` added for both `FlatESLint` and `ESLint`.
* The unit test "should return one rule meta when there is a suppressed linting error" was ported to `FlatESLint`. This was originally introduced for `ESLint` in #15459.
Fixes #16402
* Update unit tests as suggested
* Explicitly ignore a file path in a unit test for `getRulesMetaForResults`
1 parent 8f9759e commit 740b208
3 files changed
Lines changed: 114 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
688 | 688 | | |
689 | 689 | | |
690 | 690 | | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
691 | 695 | | |
692 | 696 | | |
693 | 697 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4987 | 4987 | | |
4988 | 4988 | | |
4989 | 4989 | | |
| 4990 | + | |
4990 | 4991 | | |
4991 | 4992 | | |
4992 | 4993 | | |
| |||
5003 | 5004 | | |
5004 | 5005 | | |
5005 | 5006 | | |
| 5007 | + | |
5006 | 5008 | | |
5007 | 5009 | | |
5008 | 5010 | | |
| |||
5051 | 5053 | | |
5052 | 5054 | | |
5053 | 5055 | | |
| 5056 | + | |
| 5057 | + | |
| 5058 | + | |
| 5059 | + | |
| 5060 | + | |
| 5061 | + | |
| 5062 | + | |
| 5063 | + | |
| 5064 | + | |
| 5065 | + | |
| 5066 | + | |
| 5067 | + | |
| 5068 | + | |
| 5069 | + | |
| 5070 | + | |
| 5071 | + | |
| 5072 | + | |
| 5073 | + | |
| 5074 | + | |
| 5075 | + | |
| 5076 | + | |
| 5077 | + | |
| 5078 | + | |
| 5079 | + | |
| 5080 | + | |
| 5081 | + | |
| 5082 | + | |
| 5083 | + | |
| 5084 | + | |
| 5085 | + | |
| 5086 | + | |
| 5087 | + | |
| 5088 | + | |
| 5089 | + | |
| 5090 | + | |
| 5091 | + | |
| 5092 | + | |
| 5093 | + | |
| 5094 | + | |
| 5095 | + | |
| 5096 | + | |
| 5097 | + | |
| 5098 | + | |
| 5099 | + | |
| 5100 | + | |
5054 | 5101 | | |
5055 | 5102 | | |
5056 | 5103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3770 | 3770 | | |
3771 | 3771 | | |
3772 | 3772 | | |
| 3773 | + | |
| 3774 | + | |
| 3775 | + | |
| 3776 | + | |
| 3777 | + | |
| 3778 | + | |
| 3779 | + | |
| 3780 | + | |
| 3781 | + | |
| 3782 | + | |
| 3783 | + | |
| 3784 | + | |
| 3785 | + | |
| 3786 | + | |
| 3787 | + | |
| 3788 | + | |
| 3789 | + | |
| 3790 | + | |
3773 | 3791 | | |
3774 | 3792 | | |
3775 | 3793 | | |
| |||
3817 | 3835 | | |
3818 | 3836 | | |
3819 | 3837 | | |
| 3838 | + | |
| 3839 | + | |
| 3840 | + | |
| 3841 | + | |
| 3842 | + | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
| 3846 | + | |
| 3847 | + | |
| 3848 | + | |
| 3849 | + | |
| 3850 | + | |
| 3851 | + | |
| 3852 | + | |
| 3853 | + | |
| 3854 | + | |
| 3855 | + | |
| 3856 | + | |
| 3857 | + | |
| 3858 | + | |
| 3859 | + | |
| 3860 | + | |
| 3861 | + | |
| 3862 | + | |
| 3863 | + | |
| 3864 | + | |
| 3865 | + | |
| 3866 | + | |
| 3867 | + | |
| 3868 | + | |
| 3869 | + | |
| 3870 | + | |
| 3871 | + | |
| 3872 | + | |
| 3873 | + | |
| 3874 | + | |
| 3875 | + | |
| 3876 | + | |
| 3877 | + | |
| 3878 | + | |
| 3879 | + | |
| 3880 | + | |
| 3881 | + | |
| 3882 | + | |
3820 | 3883 | | |
3821 | 3884 | | |
3822 | 3885 | | |
| |||
0 commit comments