@so1ve/prettier-config 2.0.0 → 3.0.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.
@@ -0,0 +1,31 @@
1
+ declare const _default: {
2
+ useTabs: true;
3
+ endOfLine: "lf";
4
+ quoteProps: "preserve";
5
+ trailingComma: "all";
6
+ htmlWhitespaceSensitivity: "ignore";
7
+ overrides: ({
8
+ files: string[];
9
+ options: {
10
+ requirePragma: boolean;
11
+ };
12
+ } | {
13
+ files: string;
14
+ options: {
15
+ parser: "angular";
16
+ trailingComma?: undefined;
17
+ };
18
+ } | {
19
+ files: string[];
20
+ options: {
21
+ trailingComma: "none";
22
+ parser?: undefined;
23
+ };
24
+ })[];
25
+ plugins: string[];
26
+ jsdocPreferCodeFences: boolean;
27
+ jsdocCommentLineStrategy: string;
28
+ tsdoc: boolean;
29
+ };
30
+
31
+ export { _default as default };
package/dist/index.js ADDED
@@ -0,0 +1,45 @@
1
+ // src/index.ts
2
+ import { createRequire } from "node:module";
3
+ var require2 = createRequire(import.meta.url);
4
+ var plugins = [
5
+ ...["astro", "curly-and-jsdoc", "pkgsort"].map(
6
+ (p) => require2.resolve(`prettier-plugin-${p}`)
7
+ ),
8
+ require2.resolve("@so1ve/prettier-plugin-toml")
9
+ ];
10
+ var src_default = {
11
+ useTabs: true,
12
+ endOfLine: "lf",
13
+ quoteProps: "preserve",
14
+ trailingComma: "all",
15
+ htmlWhitespaceSensitivity: "ignore",
16
+ overrides: [
17
+ {
18
+ files: "*.html",
19
+ options: {
20
+ parser: "angular"
21
+ }
22
+ },
23
+ {
24
+ files: ["*.json", "*.json5", "*.jsonc", ".eslintrc"],
25
+ options: {
26
+ trailingComma: "none"
27
+ }
28
+ },
29
+ ...["package-lock.json", "pnpm-lock.yaml", ".yarn/**"].map((filename) => ({
30
+ files: [filename],
31
+ options: {
32
+ requirePragma: true
33
+ }
34
+ }))
35
+ ],
36
+ plugins,
37
+ // Plugin Options
38
+ // JSDoc
39
+ jsdocPreferCodeFences: true,
40
+ jsdocCommentLineStrategy: "multiline",
41
+ tsdoc: true
42
+ };
43
+ export {
44
+ src_default as default
45
+ };
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@so1ve/prettier-config",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "author": "Ray <i@mk1.io> (https://github.com/so1ve/)",
5
+ "type": "module",
5
6
  "description": "Ray's prettier config.",
6
7
  "keywords": [
7
8
  "eslint",
@@ -16,23 +17,25 @@
16
17
  "url": "https://github.com/so1ve/codestyle-config/issues"
17
18
  },
18
19
  "license": "MIT",
19
- "main": "index.js",
20
+ "main": "./dist/index.js",
21
+ "types": "./dist/index.d.ts",
20
22
  "files": [
21
- "index.js"
23
+ "dist"
22
24
  ],
23
25
  "publishConfig": {
24
26
  "access": "public"
25
27
  },
26
28
  "dependencies": {
27
- "prettier-plugin-astro": "^0.13.0",
29
+ "prettier-plugin-astro": "^0.14.0",
28
30
  "prettier-plugin-pkgsort": "^0.2.1",
29
- "@so1ve/prettier-plugin-toml": "2.0.0",
30
- "prettier-plugin-curly-and-jsdoc": "2.0.0"
31
+ "@so1ve/prettier-plugin-toml": "3.0.0",
32
+ "prettier-plugin-curly-and-jsdoc": "3.0.0"
31
33
  },
32
34
  "peerDependencies": {
33
35
  "prettier": "^3.0.0"
34
36
  },
35
37
  "scripts": {
36
- "lint": "eslint . --config=index.js"
38
+ "build": "tsup",
39
+ "watch": "tsup --watch"
37
40
  }
38
41
  }
package/index.js DELETED
@@ -1,43 +0,0 @@
1
- // @ts-check
2
-
3
- const plugins = [
4
- ...["astro", "curly-and-jsdoc", "pkgsort"].map((p) =>
5
- require.resolve(`prettier-plugin-${p}`),
6
- ),
7
- require.resolve("@so1ve/prettier-plugin-toml"),
8
- ];
9
-
10
- module.exports = {
11
- useTabs: true,
12
- endOfLine: "lf",
13
- quoteProps: "preserve",
14
- trailingComma: "all",
15
- htmlWhitespaceSensitivity: "ignore",
16
- overrides: [
17
- {
18
- files: "*.html",
19
- options: {
20
- parser: "angular",
21
- },
22
- },
23
- {
24
- files: ["*.json", "*.json5", "*.jsonc", ".eslintrc"],
25
- options: {
26
- trailingComma: "none",
27
- },
28
- },
29
- ...["package-lock.json", "pnpm-lock.yaml", ".yarn/**"].map((filename) => ({
30
- files: [filename],
31
- options: {
32
- requirePragma: true,
33
- },
34
- })),
35
- ],
36
- plugins,
37
-
38
- // Plugin Options
39
- // JSDoc
40
- jsdocPreferCodeFences: true,
41
- jsdocCommentLineStrategy: "multiline",
42
- tsdoc: true,
43
- };