prettier-config-nick2bad4u 1.0.6 → 1.0.7
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 +4 -4
- package/index.d.ts +11 -2
- package/package.json +1 -1
- package/preset.mjs +8 -1
package/README.md
CHANGED
|
@@ -25,9 +25,9 @@ The package is ESM-first and exports the config from `preset.mjs`.
|
|
|
25
25
|
### Option 2: prettier.config.mjs
|
|
26
26
|
|
|
27
27
|
```js
|
|
28
|
-
import
|
|
28
|
+
import prettierConfig from "prettier-config-nick2bad4u";
|
|
29
29
|
|
|
30
|
-
export default
|
|
30
|
+
export default prettierConfig;
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
### Option 2a: named import
|
|
@@ -41,10 +41,10 @@ export default config;
|
|
|
41
41
|
### Option 3: extend with local overrides
|
|
42
42
|
|
|
43
43
|
```js
|
|
44
|
-
import
|
|
44
|
+
import prettierConfig from "prettier-config-nick2bad4u";
|
|
45
45
|
|
|
46
46
|
export default {
|
|
47
|
-
...
|
|
47
|
+
...prettierConfig,
|
|
48
48
|
printWidth: 100,
|
|
49
49
|
};
|
|
50
50
|
```
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import type { Config } from "prettier";
|
|
2
2
|
|
|
3
|
-
/**
|
|
3
|
+
/** Named export — use when you want to spread or inspect individual options. */
|
|
4
4
|
export declare const config: Readonly<Config>;
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Default export (bound as `prettierConfig`) — use this form to avoid
|
|
8
|
+
* triggering `import-x/no-named-as-default` in consuming projects:
|
|
9
|
+
*
|
|
10
|
+
* ```js
|
|
11
|
+
* import prettierConfig from "prettier-config-nick2bad4u";
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
declare const prettierConfig: Readonly<Config>;
|
|
15
|
+
export default prettierConfig;
|
package/package.json
CHANGED
package/preset.mjs
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import sharedPrettierConfig from "./.prettierrc.json" with { type: "json" };
|
|
2
2
|
|
|
3
|
+
/** Named export — use when you want to spread or inspect individual options. */
|
|
3
4
|
export const config = Object.freeze(sharedPrettierConfig);
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Default export — distinct binding so consuming projects don't trigger
|
|
8
|
+
* `import-x/no-named-as-default` when they write `import prettierConfig from
|
|
9
|
+
* "prettier-config-nick2bad4u"`.
|
|
10
|
+
*/
|
|
11
|
+
const prettierConfig = config;
|
|
12
|
+
export default prettierConfig;
|