Commit fb5f10a
fix(repository-shorthand): support repo provider prefix (#1472)
<!-- π Hi, thanks for sending a PR to eslint-plugin-package-json! π
Please fill out all fields below and make sure each item is true and [x]
checked.
Otherwise we may not be able to review your PR. -->
## PR Checklist
- [x] Addresses an existing open issue: fixes #1431
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/blob/main/.github/CONTRIBUTING.md)
were taken
## Overview
This change updates all fixers to support different repo providers, and
the providers prefix in general. Now if you have repo defined in object
syntax with either bitbucket, gitlab, github, or gist urls, the fixer
will construct a shorthand string using the corresponding provider
prefix. On the other side, if you have repo defined as a shorthand and
have configured to prefer object, it'll use the correct url based on the
provider prefix, if specified (assume github if not).
---------
Co-authored-by: Josh Goldberg β¨ <git@joshuakgoldberg.com>1 parent eeff2b8 commit fb5f10a
File tree
2 files changed
+218
-45
lines changed- src
- rules
- tests/rules
2 files changed
+218
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
11 | 48 | | |
12 | | - | |
13 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
14 | 52 | | |
15 | 53 | | |
16 | 54 | | |
| |||
33 | 71 | | |
34 | 72 | | |
35 | 73 | | |
36 | | - | |
| 74 | + | |
37 | 75 | | |
38 | 76 | | |
39 | 77 | | |
| |||
49 | 87 | | |
50 | 88 | | |
51 | 89 | | |
52 | | - | |
| 90 | + | |
| 91 | + | |
53 | 92 | | |
54 | 93 | | |
55 | 94 | | |
56 | 95 | | |
57 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
58 | 99 | | |
59 | 100 | | |
60 | 101 | | |
| |||
84 | 125 | | |
85 | 126 | | |
86 | 127 | | |
| 128 | + | |
87 | 129 | | |
88 | 130 | | |
89 | | - | |
90 | | - | |
| 131 | + | |
91 | 132 | | |
92 | 133 | | |
93 | 134 | | |
94 | 135 | | |
95 | 136 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
107 | 150 | | |
108 | 151 | | |
109 | 152 | | |
| |||
136 | 179 | | |
137 | 180 | | |
138 | 181 | | |
139 | | - | |
| 182 | + | |
140 | 183 | | |
141 | 184 | | |
142 | 185 | | |
| |||
0 commit comments