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 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 config from "prettier-config-nick2bad4u";
28
+ import prettierConfig from "prettier-config-nick2bad4u";
29
29
 
30
- export default config;
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 config from "prettier-config-nick2bad4u";
44
+ import prettierConfig from "prettier-config-nick2bad4u";
45
45
 
46
46
  export default {
47
- ...config,
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
- /** Shared Nick2bad4u Prettier configuration object. */
3
+ /** Named export use when you want to spread or inspect individual options. */
4
4
  export declare const config: Readonly<Config>;
5
5
 
6
- export default config;
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://www.schemastore.org/package.json",
3
3
  "name": "prettier-config-nick2bad4u",
4
- "version": "1.0.6",
4
+ "version": "1.0.7",
5
5
  "private": false,
6
6
  "description": "Shared Prettier config for Nick2bad4u projects.",
7
7
  "keywords": [
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
- export default config;
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;