@standard-config/prettier 1.0.2 → 1.1.0
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.
- package/README.md +6 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.mjs +105 -63
- package/dist/index.mjs.map +1 -0
- package/package.json +20 -17
package/README.md
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
[](https://www.npmjs.com/package/@standard-config/prettier)
|
|
2
|
+
[](https://github.com/standard-config/prettier/actions/workflows/test.yaml)
|
|
3
|
+
[](https://codecov.io/github/standard-config/prettier)
|
|
4
|
+
|
|
1
5
|
# @standard-config/prettier
|
|
2
6
|
|
|
3
7
|
Curated Prettier config for modern TypeScript projects.
|
|
4
8
|
|
|
5
9
|
- Enables the [`oxc` parser](https://oxc.rs/docs/guide/usage/parser.html) for lightning-fast TypeScript formatting.
|
|
10
|
+
- Formats shell scripts out of the box, including `git` hooks.
|
|
6
11
|
- Sorts all JSON files, with curated order patterns for common config files: `package.json`, `tsconfig.json`, `.oxlintrc.json`, and more.
|
|
7
12
|
|
|
8
13
|
## Install
|
|
@@ -25,7 +30,7 @@ import { defineConfig } from '@standard-config/prettier';
|
|
|
25
30
|
export default defineConfig();
|
|
26
31
|
```
|
|
27
32
|
|
|
28
|
-
|
|
33
|
+
You can override the defaults by passing your own [config options](https://prettier.io/docs/options).
|
|
29
34
|
|
|
30
35
|
```ts
|
|
31
36
|
import { defineConfig } from '@standard-config/prettier';
|
package/dist/index.d.mts
CHANGED
|
@@ -15,4 +15,5 @@ declare function defineConfig(config?: Config): Config;
|
|
|
15
15
|
//#region src/prioritize-keys/index.d.ts
|
|
16
16
|
declare function prioritizeKeys(...keys: ReadonlyArray<string>): string;
|
|
17
17
|
//#endregion
|
|
18
|
-
export { defineConfig, prioritizeKeys };
|
|
18
|
+
export { defineConfig, prioritizeKeys };
|
|
19
|
+
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as pluginOxidation from "@prettier/plugin-oxc";
|
|
2
2
|
import * as pluginPackageJSON from "prettier-plugin-packagejson";
|
|
3
3
|
import * as pluginSortJSON from "prettier-plugin-sort-json";
|
|
4
|
+
import * as pluginShell from "prettier-plugin-sh";
|
|
4
5
|
import { klona } from "klona/lite";
|
|
5
6
|
|
|
6
7
|
//#region src/prioritize-keys/index.ts
|
|
@@ -15,27 +16,63 @@ function prioritizeKeys(...keys) {
|
|
|
15
16
|
|
|
16
17
|
//#endregion
|
|
17
18
|
//#region src/config.ts
|
|
18
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Shell files can’t be reliably identified by name alone—they’re recognized by
|
|
21
|
+
* the shebang, not the extension. As a result, shell formatting options
|
|
22
|
+
* (two-space indentation) must be defined as the global defaults.
|
|
23
|
+
*
|
|
24
|
+
* This requires overriding those options for other file types individually
|
|
25
|
+
* with what we consider the actual defaults. This object defines them.
|
|
26
|
+
*/
|
|
27
|
+
const DEFAULT_OPTIONS = {
|
|
28
|
+
tabWidth: 4,
|
|
29
|
+
useTabs: true
|
|
30
|
+
};
|
|
31
|
+
const DEFAULT_CONFIG = {
|
|
32
|
+
plugins: [
|
|
33
|
+
pluginOxidation,
|
|
34
|
+
pluginPackageJSON,
|
|
35
|
+
pluginShell,
|
|
36
|
+
pluginSortJSON
|
|
37
|
+
],
|
|
19
38
|
bracketSpacing: true,
|
|
20
39
|
printWidth: 80,
|
|
21
40
|
quoteProps: "consistent",
|
|
22
41
|
singleQuote: true,
|
|
23
|
-
tabWidth:
|
|
42
|
+
tabWidth: 2,
|
|
24
43
|
trailingComma: "es5",
|
|
25
|
-
useTabs:
|
|
44
|
+
useTabs: false,
|
|
26
45
|
overrides: [
|
|
27
46
|
{
|
|
28
47
|
files: ["*.css", "*.scss"],
|
|
29
48
|
options: {
|
|
49
|
+
...DEFAULT_OPTIONS,
|
|
30
50
|
printWidth: 100,
|
|
31
51
|
singleQuote: false
|
|
32
52
|
}
|
|
33
53
|
},
|
|
54
|
+
(
|
|
55
|
+
/**
|
|
56
|
+
* Fish file formatting follows the output of `fish_indent`, which
|
|
57
|
+
* defaults to four-space indentation.
|
|
58
|
+
*/
|
|
34
59
|
{
|
|
35
|
-
files: ["*.
|
|
60
|
+
files: ["*.fish"],
|
|
61
|
+
options: { tabWidth: 4 }
|
|
62
|
+
}),
|
|
63
|
+
{
|
|
64
|
+
files: [
|
|
65
|
+
"*.graphql",
|
|
66
|
+
"*.graphqls",
|
|
67
|
+
"*.gql"
|
|
68
|
+
],
|
|
69
|
+
options: { ...DEFAULT_OPTIONS }
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
files: ["*.html", "*.htm"],
|
|
36
73
|
options: {
|
|
37
|
-
|
|
38
|
-
|
|
74
|
+
...DEFAULT_OPTIONS,
|
|
75
|
+
printWidth: 100
|
|
39
76
|
}
|
|
40
77
|
},
|
|
41
78
|
{
|
|
@@ -46,18 +83,26 @@ const config = {
|
|
|
46
83
|
"*.mjs"
|
|
47
84
|
],
|
|
48
85
|
options: {
|
|
49
|
-
|
|
86
|
+
...DEFAULT_OPTIONS,
|
|
50
87
|
parser: "oxc"
|
|
51
88
|
}
|
|
52
89
|
},
|
|
53
90
|
{
|
|
54
|
-
files: [
|
|
91
|
+
files: [
|
|
92
|
+
"*.json",
|
|
93
|
+
"*.jsonc",
|
|
94
|
+
"*.json5"
|
|
95
|
+
],
|
|
55
96
|
options: {
|
|
56
|
-
|
|
97
|
+
...DEFAULT_OPTIONS,
|
|
57
98
|
jsonRecursiveSort: true,
|
|
58
99
|
jsonSortOrder: prioritizeKeys("$schema")
|
|
59
100
|
}
|
|
60
101
|
},
|
|
102
|
+
{
|
|
103
|
+
files: ["*.md", "*.mdx"],
|
|
104
|
+
options: { ...DEFAULT_OPTIONS }
|
|
105
|
+
},
|
|
61
106
|
{
|
|
62
107
|
files: [
|
|
63
108
|
"*.ts",
|
|
@@ -66,59 +111,21 @@ const config = {
|
|
|
66
111
|
"*.mts"
|
|
67
112
|
],
|
|
68
113
|
options: {
|
|
69
|
-
|
|
114
|
+
...DEFAULT_OPTIONS,
|
|
70
115
|
parser: "oxc-ts"
|
|
71
116
|
}
|
|
72
117
|
},
|
|
73
|
-
{
|
|
74
|
-
files: ["*.yaml", "*.yml"],
|
|
75
|
-
options: {
|
|
76
|
-
tabWidth: 2,
|
|
77
|
-
useTabs: false
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
118
|
{
|
|
81
119
|
files: [
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"tsconfig.*.json"
|
|
120
|
+
"*.xml",
|
|
121
|
+
"*.plist",
|
|
122
|
+
"*.svg"
|
|
86
123
|
],
|
|
87
124
|
options: {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
{
|
|
93
|
-
files: ["package.json"],
|
|
94
|
-
options: {
|
|
95
|
-
plugins: [pluginSortJSON, pluginPackageJSON],
|
|
96
|
-
packageSortOrder: [
|
|
97
|
-
"name",
|
|
98
|
-
"private",
|
|
99
|
-
"version",
|
|
100
|
-
"description",
|
|
101
|
-
"license",
|
|
102
|
-
"author",
|
|
103
|
-
"repository",
|
|
104
|
-
"keywords",
|
|
105
|
-
"directories",
|
|
106
|
-
"files",
|
|
107
|
-
"type",
|
|
108
|
-
"sideEffects",
|
|
109
|
-
"main",
|
|
110
|
-
"exports",
|
|
111
|
-
"types",
|
|
112
|
-
"bin",
|
|
113
|
-
"imports",
|
|
114
|
-
"engines",
|
|
115
|
-
"packageManager",
|
|
116
|
-
"dependencies",
|
|
117
|
-
"peerDependencies",
|
|
118
|
-
"peerDependenciesMeta",
|
|
119
|
-
"devDependencies",
|
|
120
|
-
"scripts"
|
|
121
|
-
]
|
|
125
|
+
...DEFAULT_OPTIONS,
|
|
126
|
+
parser: "html",
|
|
127
|
+
printWidth: 80,
|
|
128
|
+
singleAttributePerLine: true
|
|
122
129
|
}
|
|
123
130
|
},
|
|
124
131
|
{
|
|
@@ -132,14 +139,48 @@ const config = {
|
|
|
132
139
|
".oxlintrc.*.json",
|
|
133
140
|
".oxlintrc.*.jsonc"
|
|
134
141
|
],
|
|
135
|
-
options: {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
142
|
+
options: { jsonSortOrder: prioritizeKeys("$schema", "files", "extends", "plugins", "categories", "env", "settings", "rules", "overrides") }
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
files: ["package.json"],
|
|
146
|
+
options: { packageSortOrder: [
|
|
147
|
+
"name",
|
|
148
|
+
"private",
|
|
149
|
+
"version",
|
|
150
|
+
"description",
|
|
151
|
+
"license",
|
|
152
|
+
"author",
|
|
153
|
+
"repository",
|
|
154
|
+
"keywords",
|
|
155
|
+
"directories",
|
|
156
|
+
"files",
|
|
157
|
+
"type",
|
|
158
|
+
"sideEffects",
|
|
159
|
+
"main",
|
|
160
|
+
"exports",
|
|
161
|
+
"types",
|
|
162
|
+
"bin",
|
|
163
|
+
"imports",
|
|
164
|
+
"engines",
|
|
165
|
+
"packageManager",
|
|
166
|
+
"dependencies",
|
|
167
|
+
"peerDependencies",
|
|
168
|
+
"peerDependenciesMeta",
|
|
169
|
+
"devDependencies",
|
|
170
|
+
"scripts"
|
|
171
|
+
] }
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
files: [
|
|
175
|
+
"tsconfig.json",
|
|
176
|
+
"tsconfig.*.json",
|
|
177
|
+
"jsconfig.json",
|
|
178
|
+
"jsconfig.*.json"
|
|
179
|
+
],
|
|
180
|
+
options: { jsonSortOrder: prioritizeKeys("extends", "compilerOptions", "files", "include", "exclude") }
|
|
139
181
|
}
|
|
140
182
|
]
|
|
141
183
|
};
|
|
142
|
-
var config_default = config;
|
|
143
184
|
|
|
144
185
|
//#endregion
|
|
145
186
|
//#region src/merge-config/index.ts
|
|
@@ -165,9 +206,10 @@ function isArray(value) {
|
|
|
165
206
|
|
|
166
207
|
//#endregion
|
|
167
208
|
//#region src/define-config/index.ts
|
|
168
|
-
function defineConfig(config
|
|
169
|
-
return mergeConfig(
|
|
209
|
+
function defineConfig(config = {}) {
|
|
210
|
+
return mergeConfig(DEFAULT_CONFIG, config);
|
|
170
211
|
}
|
|
171
212
|
|
|
172
213
|
//#endregion
|
|
173
|
-
export { defineConfig, prioritizeKeys };
|
|
214
|
+
export { defineConfig, prioritizeKeys };
|
|
215
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["clone"],"sources":["../src/prioritize-keys/index.ts","../src/config.ts","../src/merge-config/index.ts","../src/define-config/index.ts"],"sourcesContent":["export default function prioritizeKeys(...keys: ReadonlyArray<string>): string {\n\t/* oxlint-disable-next-line typescript/no-restricted-types */\n\tconst order: Record<string, null> = {};\n\n\tfor (const key of keys) {\n\t\torder[String(key)] = null;\n\t}\n\n\treturn JSON.stringify({\n\t\t...order,\n\t\t/* oxlint-disable-next-line typescript/no-explicit-any */\n\t\t[/.*/ as any]: 'lexical',\n\t});\n}\n","import type { Config, Options } from 'prettier';\nimport * as pluginOxidation from '@prettier/plugin-oxc';\nimport * as pluginPackageJSON from 'prettier-plugin-packagejson';\nimport * as pluginSortJSON from 'prettier-plugin-sort-json';\nimport * as pluginShell from 'prettier-plugin-sh';\nimport prioritizeKeys from './prioritize-keys/index.ts';\n\n/**\n * Shell files can’t be reliably identified by name alone—they’re recognized by\n * the shebang, not the extension. As a result, shell formatting options\n * (two-space indentation) must be defined as the global defaults.\n *\n * This requires overriding those options for other file types individually\n * with what we consider the actual defaults. This object defines them.\n */\nexport const DEFAULT_OPTIONS = {\n\ttabWidth: 4,\n\tuseTabs: true,\n} as const satisfies Options;\n\nexport const DEFAULT_CONFIG = {\n\tplugins: [pluginOxidation, pluginPackageJSON, pluginShell, pluginSortJSON],\n\tbracketSpacing: true,\n\tprintWidth: 80,\n\tquoteProps: 'consistent',\n\tsingleQuote: true,\n\ttabWidth: 2,\n\ttrailingComma: 'es5',\n\tuseTabs: false,\n\toverrides: [\n\t\t{\n\t\t\tfiles: ['*.css', '*.scss'],\n\t\t\toptions: {\n\t\t\t\t...DEFAULT_OPTIONS,\n\t\t\t\tprintWidth: 100,\n\t\t\t\tsingleQuote: false,\n\t\t\t},\n\t\t},\n\t\t/**\n\t\t * Fish file formatting follows the output of `fish_indent`, which\n\t\t * defaults to four-space indentation.\n\t\t */\n\t\t{\n\t\t\tfiles: ['*.fish'],\n\t\t\toptions: {\n\t\t\t\ttabWidth: 4,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tfiles: ['*.graphql', '*.graphqls', '*.gql'],\n\t\t\toptions: {\n\t\t\t\t...DEFAULT_OPTIONS,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tfiles: ['*.html', '*.htm'],\n\t\t\toptions: {\n\t\t\t\t...DEFAULT_OPTIONS,\n\t\t\t\tprintWidth: 100,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tfiles: ['*.js', '*.jsx', '*.cjs', '*.mjs'],\n\t\t\toptions: {\n\t\t\t\t...DEFAULT_OPTIONS,\n\t\t\t\tparser: 'oxc',\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tfiles: ['*.json', '*.jsonc', '*.json5'],\n\t\t\toptions: {\n\t\t\t\t...DEFAULT_OPTIONS,\n\t\t\t\tjsonRecursiveSort: true,\n\t\t\t\tjsonSortOrder: prioritizeKeys('$schema'),\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tfiles: ['*.md', '*.mdx'],\n\t\t\toptions: {\n\t\t\t\t...DEFAULT_OPTIONS,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tfiles: ['*.ts', '*.tsx', '*.cts', '*.mts'],\n\t\t\toptions: {\n\t\t\t\t...DEFAULT_OPTIONS,\n\t\t\t\tparser: 'oxc-ts',\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tfiles: ['*.xml', '*.plist', '*.svg'],\n\t\t\toptions: {\n\t\t\t\t...DEFAULT_OPTIONS,\n\t\t\t\tparser: 'html',\n\t\t\t\tprintWidth: 80,\n\t\t\t\tsingleAttributePerLine: true,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tfiles: [\n\t\t\t\t'oxlintrc.json',\n\t\t\t\t'oxlintrc.jsonc',\n\t\t\t\t'oxlintrc.*.json',\n\t\t\t\t'oxlintrc.*.jsonc',\n\t\t\t\t'.oxlintrc.json',\n\t\t\t\t'.oxlintrc.jsonc',\n\t\t\t\t'.oxlintrc.*.json',\n\t\t\t\t'.oxlintrc.*.jsonc',\n\t\t\t],\n\t\t\toptions: {\n\t\t\t\tjsonSortOrder: prioritizeKeys(\n\t\t\t\t\t'$schema',\n\t\t\t\t\t'files',\n\t\t\t\t\t'extends',\n\t\t\t\t\t'plugins',\n\t\t\t\t\t'categories',\n\t\t\t\t\t'env',\n\t\t\t\t\t'settings',\n\t\t\t\t\t'rules',\n\t\t\t\t\t'overrides'\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tfiles: ['package.json'],\n\t\t\toptions: {\n\t\t\t\tpackageSortOrder: [\n\t\t\t\t\t'name',\n\t\t\t\t\t'private',\n\t\t\t\t\t'version',\n\t\t\t\t\t'description',\n\t\t\t\t\t'license',\n\t\t\t\t\t'author',\n\t\t\t\t\t'repository',\n\t\t\t\t\t'keywords',\n\t\t\t\t\t'directories',\n\t\t\t\t\t'files',\n\t\t\t\t\t'type',\n\t\t\t\t\t'sideEffects',\n\t\t\t\t\t'main',\n\t\t\t\t\t'exports',\n\t\t\t\t\t'types',\n\t\t\t\t\t'bin',\n\t\t\t\t\t'imports',\n\t\t\t\t\t'engines',\n\t\t\t\t\t'packageManager',\n\t\t\t\t\t'dependencies',\n\t\t\t\t\t'peerDependencies',\n\t\t\t\t\t'peerDependenciesMeta',\n\t\t\t\t\t'devDependencies',\n\t\t\t\t\t'scripts',\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tfiles: [\n\t\t\t\t'tsconfig.json',\n\t\t\t\t'tsconfig.*.json',\n\t\t\t\t'jsconfig.json',\n\t\t\t\t'jsconfig.*.json',\n\t\t\t],\n\t\t\toptions: {\n\t\t\t\tjsonSortOrder: prioritizeKeys(\n\t\t\t\t\t'extends',\n\t\t\t\t\t'compilerOptions',\n\t\t\t\t\t'files',\n\t\t\t\t\t'include',\n\t\t\t\t\t'exclude'\n\t\t\t\t),\n\t\t\t},\n\t\t},\n\t],\n} as const satisfies Config;\n","import type { Config } from 'prettier';\nimport { klona as clone } from 'klona/lite';\n\nexport default function mergeConfig(\n\tbaseConfig: Config,\n\textensionConfig: Config\n): Config {\n\tif (\n\t\t!(typeof baseConfig === 'object' && typeof extensionConfig === 'object')\n\t) {\n\t\tthrow new TypeError(\n\t\t\t'Prettier config error: expected config to be an object'\n\t\t);\n\t}\n\n\tconst result = clone(baseConfig);\n\n\tfor (const [key, value] of Object.entries(clone(extensionConfig))) {\n\t\tif (value === undefined) {\n\t\t\t/* oxlint-disable-next-line typescript/no-dynamic-delete */\n\t\t\tdelete result[key];\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (isArray(value) && isArray(result[key])) {\n\t\t\tresult[key] = [...result[key], ...value];\n\t\t\tcontinue;\n\t\t}\n\n\t\tresult[key] = value;\n\t}\n\n\treturn result;\n}\n\nfunction isArray(value: unknown): value is unknown[] {\n\treturn Array.isArray(value);\n}\n","import type { Config } from 'prettier';\nimport { DEFAULT_CONFIG } from '../config.ts';\nimport mergeConfig from '../merge-config/index.ts';\n\nexport default function defineConfig(config: Config = {}): Config {\n\treturn mergeConfig(DEFAULT_CONFIG, config);\n}\n"],"mappings":";;;;;;;AAAA,SAAwB,eAAe,GAAG,MAAqC;CAE9E,MAAM,QAA8B,EAAE;AAEtC,MAAK,MAAM,OAAO,KACjB,OAAM,OAAO,IAAI,IAAI;AAGtB,QAAO,KAAK,UAAU;EACrB,GAAG;GAEF,OAAc;EACf,CAAC;;;;;;;;;;;;;ACGH,MAAa,kBAAkB;CAC9B,UAAU;CACV,SAAS;CACT;AAED,MAAa,iBAAiB;CAC7B,SAAS;EAAC;EAAiB;EAAmB;EAAa;EAAe;CAC1E,gBAAgB;CAChB,YAAY;CACZ,YAAY;CACZ,aAAa;CACb,UAAU;CACV,eAAe;CACf,SAAS;CACT,WAAW;EACV;GACC,OAAO,CAAC,SAAS,SAAS;GAC1B,SAAS;IACR,GAAG;IACH,YAAY;IACZ,aAAa;IACb;GACD;;;;;;EAKD;GACC,OAAO,CAAC,SAAS;GACjB,SAAS,EACR,UAAU,GACV;GACD;EACD;GACC,OAAO;IAAC;IAAa;IAAc;IAAQ;GAC3C,SAAS,EACR,GAAG,iBACH;GACD;EACD;GACC,OAAO,CAAC,UAAU,QAAQ;GAC1B,SAAS;IACR,GAAG;IACH,YAAY;IACZ;GACD;EACD;GACC,OAAO;IAAC;IAAQ;IAAS;IAAS;IAAQ;GAC1C,SAAS;IACR,GAAG;IACH,QAAQ;IACR;GACD;EACD;GACC,OAAO;IAAC;IAAU;IAAW;IAAU;GACvC,SAAS;IACR,GAAG;IACH,mBAAmB;IACnB,eAAe,eAAe,UAAU;IACxC;GACD;EACD;GACC,OAAO,CAAC,QAAQ,QAAQ;GACxB,SAAS,EACR,GAAG,iBACH;GACD;EACD;GACC,OAAO;IAAC;IAAQ;IAAS;IAAS;IAAQ;GAC1C,SAAS;IACR,GAAG;IACH,QAAQ;IACR;GACD;EACD;GACC,OAAO;IAAC;IAAS;IAAW;IAAQ;GACpC,SAAS;IACR,GAAG;IACH,QAAQ;IACR,YAAY;IACZ,wBAAwB;IACxB;GACD;EACD;GACC,OAAO;IACN;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD,SAAS,EACR,eAAe,eACd,WACA,SACA,WACA,WACA,cACA,OACA,YACA,SACA,YACA,EACD;GACD;EACD;GACC,OAAO,CAAC,eAAe;GACvB,SAAS,EACR,kBAAkB;IACjB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,EACD;GACD;EACD;GACC,OAAO;IACN;IACA;IACA;IACA;IACA;GACD,SAAS,EACR,eAAe,eACd,WACA,mBACA,SACA,WACA,UACA,EACD;GACD;EACD;CACD;;;;ACzKD,SAAwB,YACvB,YACA,iBACS;AACT,KACC,EAAE,OAAO,eAAe,YAAY,OAAO,oBAAoB,UAE/D,OAAM,IAAI,UACT,yDACA;CAGF,MAAM,SAASA,MAAM,WAAW;AAEhC,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQA,MAAM,gBAAgB,CAAC,EAAE;AAClE,MAAI,UAAU,QAAW;AAExB,UAAO,OAAO;AACd;;AAGD,MAAI,QAAQ,MAAM,IAAI,QAAQ,OAAO,KAAK,EAAE;AAC3C,UAAO,OAAO,CAAC,GAAG,OAAO,MAAM,GAAG,MAAM;AACxC;;AAGD,SAAO,OAAO;;AAGf,QAAO;;AAGR,SAAS,QAAQ,OAAoC;AACpD,QAAO,MAAM,QAAQ,MAAM;;;;;AChC5B,SAAwB,aAAa,SAAiB,EAAE,EAAU;AACjE,QAAO,YAAY,gBAAgB,OAAO"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@standard-config/prettier",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Curated Prettier config for modern TypeScript projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
"keywords": [
|
|
16
16
|
"json-sorting",
|
|
17
17
|
"oxc",
|
|
18
|
-
"oxc-parser",
|
|
19
18
|
"prettier-config",
|
|
20
19
|
"standard-config",
|
|
21
20
|
"typescript"
|
|
@@ -28,36 +27,40 @@
|
|
|
28
27
|
"exports": "./dist/index.mjs",
|
|
29
28
|
"types": "./dist/index.d.mts",
|
|
30
29
|
"engines": {
|
|
31
|
-
"node": ">=
|
|
30
|
+
"node": ">=22"
|
|
32
31
|
},
|
|
33
|
-
"packageManager": "pnpm@10.
|
|
32
|
+
"packageManager": "pnpm@10.28.0",
|
|
34
33
|
"dependencies": {
|
|
35
34
|
"@prettier/plugin-oxc": "^0.1.3",
|
|
36
35
|
"klona": "^2.0.6",
|
|
37
36
|
"prettier-plugin-packagejson": "2.5.20",
|
|
37
|
+
"prettier-plugin-sh": "^0.18.0",
|
|
38
38
|
"prettier-plugin-sort-json": "4.1.1"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"prettier": ">=3.7"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@standard-config/tsconfig": "
|
|
45
|
-
"@vitest/coverage-v8": "
|
|
46
|
-
"
|
|
47
|
-
"oxlint
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
44
|
+
"@standard-config/tsconfig": "2.0.0",
|
|
45
|
+
"@vitest/coverage-v8": "4.0.16",
|
|
46
|
+
"husky": "9.1.7",
|
|
47
|
+
"oxlint": "1.38.0",
|
|
48
|
+
"oxlint-tsgolint": "0.11.0",
|
|
49
|
+
"prettier": "3.7.4",
|
|
50
|
+
"publint": "0.3.16",
|
|
51
|
+
"tsdown": "0.19.0",
|
|
52
|
+
"typescript": "5.9.3",
|
|
53
|
+
"vitest": "4.0.16"
|
|
53
54
|
},
|
|
54
55
|
"scripts": {
|
|
55
|
-
"build": "tsdown
|
|
56
|
+
"build": "tsdown",
|
|
57
|
+
"fix": "pnpm format && pnpm lint",
|
|
56
58
|
"format": "prettier --write --ignore-unknown .",
|
|
57
|
-
"format:
|
|
59
|
+
"format:check": "prettier --check --ignore-unknown .",
|
|
58
60
|
"lint": "oxlint --fix --type-aware --type-check --deny-warnings --report-unused-disable-directives",
|
|
59
|
-
"lint:
|
|
60
|
-
"prepack": "pnpm run '/^(format:
|
|
61
|
+
"lint:check": "oxlint --type-aware --type-check --deny-warnings --report-unused-disable-directives",
|
|
62
|
+
"prepack": "pnpm run '/^(format:check|lint:check|test|typecheck)$/' && pnpm build",
|
|
63
|
+
"prepare": "husky",
|
|
61
64
|
"test": "vitest run",
|
|
62
65
|
"typecheck": "tsc --noEmit"
|
|
63
66
|
}
|