You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plugin enforces its own set of opinionated rules:
50
50
51
+
### Scripts
52
+
53
+
Keys in `scripts` are ordered alphabetically. Use prefixes wisely to properly order child scripts. e.g. `lint`, `lint:ts`.
54
+
51
55
### Sorting
52
56
53
57
Top-level keys are sorted according to a style commonly seen in the packages of [@sindresorhus](https://github.com/sindresorhus). Known keys, and their order are:
54
58
55
59
```js
56
60
[
61
+
// meta
57
62
'name',
58
63
'version',
64
+
'flat',
65
+
'private',
59
66
'publishConfig',
60
67
'description',
61
68
'license',
62
69
'repository',
63
70
'author',
64
71
'homepage',
65
72
'bugs',
73
+
74
+
// entry
66
75
'main',
76
+
'bin',
77
+
78
+
// constraints
67
79
'engines',
80
+
'cpu',
81
+
'os',
82
+
83
+
// content and util
68
84
'scripts',
69
85
'files',
70
86
'keywords',
71
-
'peerDependencies',
87
+
88
+
// dependencies
89
+
'bundledDependencies',
72
90
'optionalDependencies',
91
+
'peerDependencies',
73
92
'dependencies',
74
-
'devDependencies'
93
+
'devDependencies',
94
+
'resolutions'
75
95
]
76
96
```
77
97
78
-
Unknown keys, or keys not part of the list above, will be alphabetically sorted and added to the end of the file.
98
+
Unknown keys, or keys not part of the list above, will be alphabetically sorted and added to the end of the file. Note that this list takes into account both `npm` and `yarn` keys.
0 commit comments