Skip to content

Commit 6592f6f

Browse files
committed
feat!: rename options from kebab case to camel case
1 parent 76b29e8 commit 6592f6f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+738
-752
lines changed

docs/content/rules/sort-array-includes.mdx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ This rule accepts an options object with the following properties:
123123
interface Options {
124124
type?: 'alphabetical' | 'natural' | 'line-length'
125125
order?: 'asc' | 'desc'
126-
'ignore-case'?: boolean
127-
'spread-last'?: boolean
126+
ignoreCase?: boolean
127+
spreadLast?: boolean
128128
}
129129
```
130130

@@ -143,13 +143,13 @@ interface Options {
143143
- `asc` — enforce properties to be in ascending order.
144144
- `desc` — enforce properties to be in descending order.
145145

146-
### ignore-case
146+
### ignoreCase
147147

148148
<sub>(default: `false`)</sub>
149149

150150
Only affects alphabetical and natural sorting. When `true` the rule ignores the case-sensitivity of the order.
151151

152-
### spread-last
152+
### spreadLast
153153

154154
<sub>(default: `false`)</sub>
155155

@@ -175,7 +175,7 @@ When `true` enforce spread elements in array to be last.
175175
{
176176
type: 'natural',
177177
order: 'asc',
178-
'spread-last': true,
178+
spreadLast: true,
179179
},
180180
],
181181
},
@@ -198,7 +198,7 @@ When `true` enforce spread elements in array to be last.
198198
{
199199
type: 'natural',
200200
order: 'asc',
201-
'spread-last': true,
201+
spreadLast: true,
202202
},
203203
],
204204
},
@@ -207,11 +207,10 @@ When `true` enforce spread elements in array to be last.
207207
name: 'Legacy Config',
208208
value: 'legacy',
209209
},
210-
211-
]}
212-
type="config-type"
213-
client:load
214-
lang="ts"
210+
]}
211+
type="config-type"
212+
client:load
213+
lang="ts"
215214
/>
216215

217216
## Version

docs/content/rules/sort-astro-attributes.mdx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ type Group =
120120
interface Options {
121121
type?: 'alphabetical' | 'natural' | 'line-length'
122122
order?: 'asc' | 'desc'
123-
'ignore-case'?: boolean
123+
ignoreCase?: boolean
124124
groups?: (Group | Group[])[]
125-
'custom-groups': { [key: CustomGroup]: string[] | string }
125+
customGroups: { [key: CustomGroup]: string[] | string }
126126
}
127127
```
128128

@@ -141,7 +141,7 @@ interface Options {
141141
- `asc` — enforce properties to be in ascending order.
142142
- `desc` — enforce properties to be in descending order.
143143

144-
### ignore-case
144+
### ignoreCase
145145

146146
<sub>(default: `false`)</sub>
147147

@@ -153,7 +153,7 @@ Only affects alphabetical and natural sorting. When `true` the rule ignores the
153153

154154
You can set up a list of Astro attribute groups for sorting. Groups can be combined. There are predefined groups: `'multiline'`, `'shorthand'`, `'astro-shorthand'`.
155155

156-
### custom-groups
156+
### customGroups
157157

158158
<sub>(default: `{}`)</sub>
159159

@@ -163,7 +163,7 @@ Example:
163163

164164
```json
165165
{
166-
"custom-groups": {
166+
"customGroups": {
167167
"callback": "on*"
168168
}
169169
}
@@ -271,11 +271,10 @@ In order to start using this rule, you need to install additional dependency:
271271
name: 'Legacy Config',
272272
value: 'legacy',
273273
},
274-
275-
]}
276-
type="config-type"
277-
client:load
278-
lang="ts"
274+
]}
275+
type="config-type"
276+
client:load
277+
lang="ts"
279278
/>
280279

281280
## Version

docs/content/rules/sort-classes.mdx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ type Group =
178178
interface Options {
179179
type?: 'alphabetical' | 'natural' | 'line-length'
180180
order?: 'asc' | 'desc'
181-
'ignore-case'?: boolean
181+
ignoreCase?: boolean
182182
groups?: (Group | Group[])[]
183-
'custom-groups'?: { [key: string]: string[] | string }
183+
customGroups?: { [key: string]: string[] | string }
184184
}
185185
```
186186

@@ -199,7 +199,7 @@ interface Options {
199199
- `asc` — enforce properties to be in ascending order.
200200
- `desc` — enforce properties to be in descending order.
201201

202-
### ignore-case
202+
### ignoreCase
203203

204204
<sub>(default: `false`)</sub>
205205

@@ -231,7 +231,7 @@ If you use [one of the configs](/configs/) exported by this plugin, you get the
231231
}
232232
```
233233

234-
### custom-groups
234+
### customGroups
235235

236236
<sub>(default: `{}`)</sub>
237237

@@ -241,7 +241,7 @@ Example:
241241

242242
```json
243243
{
244-
"custom-groups": {
244+
"customGroups": {
245245
"top": "id"
246246
}
247247
}
@@ -317,11 +317,10 @@ Example:
317317
name: 'Legacy Config',
318318
value: 'legacy',
319319
},
320-
321-
]}
322-
type="config-type"
323-
client:load
324-
lang="ts"
320+
]}
321+
type="config-type"
322+
client:load
323+
lang="ts"
325324
/>
326325

327326
## Version

docs/content/rules/sort-enums.mdx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ This rule accepts an options object with the following properties:
8888
interface Options {
8989
type?: 'alphabetical' | 'natural' | 'line-length'
9090
order?: 'asc' | 'desc'
91-
'ignore-case'?: boolean
92-
'partition-by-comment'?: string[] | string | boolean
91+
ignoreCase?: boolean
92+
partitionByComment?: string[] | string | boolean
9393
}
9494
```
9595

@@ -108,13 +108,13 @@ interface Options {
108108
- `asc` — enforce properties to be in ascending order.
109109
- `desc` — enforce properties to be in descending order.
110110

111-
### ignore-case
111+
### ignoreCase
112112

113113
<sub>(default: `false`)</sub>
114114

115115
Only affects alphabetical and natural sorting. When `true` the rule ignores the case-sensitivity of the order.
116116

117-
### partition-by-comment
117+
### partitionByComment
118118

119119
<sub>(default: `false`)</sub>
120120

@@ -172,11 +172,10 @@ The [minimatch](https://github.com/isaacs/minimatch) library is used for pattern
172172
name: 'Legacy Config',
173173
value: 'legacy',
174174
},
175-
176-
]}
177-
type="config-type"
178-
client:load
179-
lang="ts"
175+
]}
176+
type="config-type"
177+
client:load
178+
lang="ts"
180179
/>
181180

182181
## Version

docs/content/rules/sort-exports.mdx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ This rule accepts an options object with the following properties:
8282
interface Options {
8383
type?: 'alphabetical' | 'natural' | 'line-length'
8484
order?: 'asc' | 'desc'
85-
'ignore-case'?: boolean
85+
ignoreCase?: boolean
8686
}
8787
```
8888

@@ -101,7 +101,7 @@ interface Options {
101101
- `asc` — enforce properties to be in ascending order.
102102
- `desc` — enforce properties to be in descending order.
103103

104-
### ignore-case
104+
### ignoreCase
105105

106106
<sub>(default: `false`)</sub>
107107

@@ -157,11 +157,10 @@ Only affects alphabetical and natural sorting. When `true` the rule ignores the
157157
name: 'Legacy Config',
158158
value: 'legacy',
159159
},
160-
161-
]}
162-
type="config-type"
163-
client:load
164-
lang="ts"
160+
]}
161+
type="config-type"
162+
client:load
163+
lang="ts"
165164
/>
166165

167166

docs/content/rules/sort-imports.mdx

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,19 @@ type Group =
136136
interface Options {
137137
type?: 'alphabetical' | 'natural' | 'line-length'
138138
order?: 'asc' | 'desc'
139-
'ignore-case'?: boolean
139+
ignoreCase?: boolean
140140
groups?: (Group | Group[])[]
141-
'custom-groups'?: {
141+
customGroups?: {
142142
value?: {
143143
[key: CustomGroup]: string | string[]
144144
}
145145
type?: {
146146
[key: CustomGroup]: string | string[]
147147
}
148148
}
149-
'internal-pattern'?: string[]
150-
'newlines-between'?: 'always' | 'ignore' | 'never'
151-
'max-line-length'?: number
149+
internalPattern?: string[]
150+
newlinesBetween?: 'always' | 'ignore' | 'never'
151+
maxLineLength?: number
152152
```
153153
154154
### type
@@ -166,7 +166,7 @@ interface Options {
166166
- `asc` — enforce properties to be in ascending order.
167167
- `desc` — enforce properties to be in descending order.
168168
169-
### ignore-case
169+
### ignoreCase
170170
171171
<sub>(default: `false`)</sub>
172172
@@ -230,7 +230,7 @@ If you use [one of the configs](/configs/) exported by this plugin, you get the
230230
}
231231
```
232232
233-
### custom-groups
233+
### customGroups
234234
235235
<sub>(default: `{ value: {}, type: {} }`)</sub>
236236
@@ -240,7 +240,7 @@ Example:
240240
241241
```
242242
{
243-
"custom-groups": {
243+
"customGroups": {
244244
"value": {
245245
"react": ["react", "react-*"],
246246
"lodash": "lodash"
@@ -252,23 +252,23 @@ Example:
252252
}
253253
```
254254
255-
### internal-pattern
255+
### internalPattern
256256
257257
<sub>(default: `['~/**']`)</sub>
258258
259259
You can specify a pattern for internal imports.
260260
261261
The [minimatch](https://github.com/isaacs/minimatch) library is used for pattern matching.
262262
263-
### newlines-between
263+
### newlinesBetween
264264
265265
<sub>(default: `'always'`)</sub>
266266
267267
- `ignore` - do not report errors related to new lines between import groups.
268268
- `always` - one new line between each group will be enforced, and new lines inside a group will be forbidden.
269269
- `never` - no new lines are allowed in the entire import section.
270270
271-
### max-line-length\*
271+
### maxLineLength\*
272272
273273
<sub>(default: `undefined`)</sub>
274274
@@ -310,7 +310,7 @@ You can use this to sort by the import name only, excluding the elements, when t
310310
'object',
311311
'unknown',
312312
],
313-
'custom-groups': {
313+
customGroups: {
314314
value: {
315315
react: ['react', 'react-*'],
316316
nanostores: '@nanostores/**',
@@ -319,8 +319,8 @@ You can use this to sort by the import name only, excluding the elements, when t
319319
react: 'react',
320320
},
321321
},
322-
'newlines-between': 'always',
323-
'internal-pattern': [
322+
newlinesBetween: 'always',
323+
internalPattern: [
324324
'@/components/**',
325325
'@/stores/**',
326326
'@/pages/**',
@@ -362,7 +362,7 @@ You can use this to sort by the import name only, excluding the elements, when t
362362
'object',
363363
'unknown',
364364
],
365-
'custom-groups': {
365+
customGroups: {
366366
value: {
367367
react: ['react', 'react-*'],
368368
nanostores: '@nanostores/**',
@@ -371,8 +371,8 @@ You can use this to sort by the import name only, excluding the elements, when t
371371
react: 'react',
372372
},
373373
},
374-
'newlines-between': 'always',
375-
'internal-pattern': [
374+
newlinesBetween: 'always',
375+
internalPattern: [
376376
'@/components/**',
377377
'@/stores/**',
378378
'@/pages/**',
@@ -386,11 +386,10 @@ You can use this to sort by the import name only, excluding the elements, when t
386386
name: 'Legacy Config',
387387
value: 'legacy',
388388
},
389-
390-
]}
391-
type="config-type"
392-
client:load
393-
lang="ts"
389+
]}
390+
type="config-type"
391+
client:load
392+
lang="ts"
394393
/>
395394
396395
## Version

0 commit comments

Comments
 (0)