@mrpalmer/eslint-plugin 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,6 +15,7 @@ export default createRule({
|
|
|
15
15
|
type: 'object',
|
|
16
16
|
properties: {
|
|
17
17
|
breakTies: {
|
|
18
|
+
description: 'When the aliased and relative paths are the same length, which should be preferred.',
|
|
18
19
|
type: 'string',
|
|
19
20
|
enum: ['alias', 'relative'],
|
|
20
21
|
},
|
|
@@ -22,6 +23,11 @@ export default createRule({
|
|
|
22
23
|
additionalProperties: false,
|
|
23
24
|
},
|
|
24
25
|
],
|
|
26
|
+
defaultOptions: [
|
|
27
|
+
{
|
|
28
|
+
breakTies: 'alias',
|
|
29
|
+
},
|
|
30
|
+
],
|
|
25
31
|
messages: {
|
|
26
32
|
shortenImport: 'Import can be shortened to "{{path}}"',
|
|
27
33
|
shortenExport: 'Export can be shortened to "{{path}}"',
|
|
@@ -478,9 +478,11 @@ export default createRule({
|
|
|
478
478
|
type: 'object',
|
|
479
479
|
properties: {
|
|
480
480
|
groups: {
|
|
481
|
+
description: 'The order of import types.',
|
|
481
482
|
type: 'array',
|
|
482
483
|
},
|
|
483
484
|
pathGroups: {
|
|
485
|
+
description: 'Custom path patterns and their import types.',
|
|
484
486
|
type: 'array',
|
|
485
487
|
items: {
|
|
486
488
|
type: 'object',
|
|
@@ -511,6 +513,12 @@ export default createRule({
|
|
|
511
513
|
additionalProperties: false,
|
|
512
514
|
},
|
|
513
515
|
],
|
|
516
|
+
defaultOptions: [
|
|
517
|
+
{
|
|
518
|
+
groups: defaultGroups,
|
|
519
|
+
pathGroups: [],
|
|
520
|
+
},
|
|
521
|
+
],
|
|
514
522
|
messages: {
|
|
515
523
|
error: '{{error}}',
|
|
516
524
|
noLineBetweenImports: 'There should be no empty line between import statements',
|
package/lib/rules/sort-named.js
CHANGED
|
@@ -279,9 +279,11 @@ export default createRule({
|
|
|
279
279
|
type: 'object',
|
|
280
280
|
properties: {
|
|
281
281
|
ignoreCase: {
|
|
282
|
+
description: 'Whether to ignore case when sorting.',
|
|
282
283
|
type: 'boolean',
|
|
283
284
|
},
|
|
284
285
|
types: {
|
|
286
|
+
description: 'Whether to group type and value imports/exports, and if so, which should come first.',
|
|
285
287
|
type: 'string',
|
|
286
288
|
enum: ['mixed', 'types-first', 'types-last'],
|
|
287
289
|
},
|
|
@@ -289,6 +291,12 @@ export default createRule({
|
|
|
289
291
|
additionalProperties: false,
|
|
290
292
|
},
|
|
291
293
|
],
|
|
294
|
+
defaultOptions: [
|
|
295
|
+
{
|
|
296
|
+
ignoreCase: false,
|
|
297
|
+
types: 'types-first',
|
|
298
|
+
},
|
|
299
|
+
],
|
|
292
300
|
messages: {
|
|
293
301
|
order: '{{secondImport}} should occur {{order}} {{firstImport}}',
|
|
294
302
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mrpalmer/eslint-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Custom ESLint rules for Mike Palmer's projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"engines": {
|
|
33
33
|
"node": ">=20",
|
|
34
|
-
"npm": ">=
|
|
34
|
+
"npm": ">=10",
|
|
35
35
|
"yarn": ">=1"
|
|
36
36
|
}
|
|
37
37
|
}
|