@meteorlxy/prettier-config 2.11.0 → 3.2.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 CHANGED
@@ -15,3 +15,19 @@ In `package.json`:
15
15
  "prettier": "@meteorlxy/prettier-config"
16
16
  }
17
17
  ```
18
+
19
+ In `prettier.config.js`:
20
+
21
+ ```js
22
+ import meteorlxy from '@meteorlxy/prettier-config';
23
+
24
+ export default {
25
+ ...meteorlxy,
26
+ // options
27
+
28
+ overrides: [
29
+ ...meteorlxy.overrides,
30
+ // overrides
31
+ ],
32
+ };
33
+ ```
package/dist/index.cjs ADDED
@@ -0,0 +1,63 @@
1
+ 'use strict';
2
+
3
+ const index = {
4
+ // Maximum line length
5
+ printWidth: 80,
6
+ // Specify the number of spaces per indentation-level
7
+ tabWidth: 2,
8
+ // Indent lines with tabs instead of spaces
9
+ useTabs: false,
10
+ // Use semicolons or not
11
+ semi: true,
12
+ // Use single quotes instead of double quotes
13
+ singleQuote: true,
14
+ // Change when properties in objects are quoted
15
+ quoteProps: "consistent",
16
+ // Use single quotes instead of double quotes in JSX
17
+ jsxSingleQuote: false,
18
+ // Print trailing commas wherever possible when multi-line
19
+ trailingComma: "all",
20
+ // Print spaces between brackets in object literals.
21
+ bracketSpacing: true,
22
+ // Put the `>` of a multi-line HTML element at the end of the last line instead of being alone on the next line (does not apply to self closing elements)
23
+ bracketSameLine: false,
24
+ // Include parentheses around a sole arrow function parameter
25
+ arrowParens: "always",
26
+ // Format only a segment of a file.
27
+ rangeStart: 0,
28
+ rangeEnd: Infinity,
29
+ // Specify which parser to use.
30
+ // parser: undefined,
31
+ // Specify the file name to use to infer which parser to use.
32
+ // filepath: undefined,
33
+ // Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
34
+ requirePragma: false,
35
+ // Prettier can insert a special @format marker at the top of files specifying that the file has been formatted with prettier.
36
+ insertPragma: false,
37
+ // By default, Prettier will wrap markdown text as-is since some services use a line-break-sensitive renderer, e.g. GitHub comment and BitBucket.
38
+ proseWrap: "preserve",
39
+ // Specify the global whitespace sensitivity for HTML files
40
+ htmlWhitespaceSensitivity: "css",
41
+ // Whether or not to indent the code inside <script> and <style> tags in Vue files
42
+ vueIndentScriptAndStyle: false,
43
+ // End of line
44
+ endOfLine: "lf",
45
+ // Control whether Prettier formats quoted code embedded in the file
46
+ embeddedLanguageFormatting: "auto",
47
+ // Enforce single attribute per line in HTML, Vue and JSX
48
+ singleAttributePerLine: false,
49
+ overrides: [
50
+ {
51
+ files: [
52
+ ".vscode/extensions.json",
53
+ ".vscode/launch.json",
54
+ ".vscode/settings.json"
55
+ ],
56
+ options: {
57
+ parser: "jsonc"
58
+ }
59
+ }
60
+ ]
61
+ };
62
+
63
+ module.exports = index;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Prettier Config
3
+ *
4
+ * @see https://prettier.io/docs/en/options
5
+ * @see https://prettier.io/docs/en/configuration
6
+ */
7
+ declare const _default: {
8
+ printWidth: number;
9
+ tabWidth: number;
10
+ useTabs: false;
11
+ semi: true;
12
+ singleQuote: true;
13
+ quoteProps: "consistent";
14
+ jsxSingleQuote: false;
15
+ trailingComma: "all";
16
+ bracketSpacing: true;
17
+ bracketSameLine: false;
18
+ arrowParens: "always";
19
+ rangeStart: number;
20
+ rangeEnd: number;
21
+ requirePragma: false;
22
+ insertPragma: false;
23
+ proseWrap: "preserve";
24
+ htmlWhitespaceSensitivity: "css";
25
+ vueIndentScriptAndStyle: false;
26
+ endOfLine: "lf";
27
+ embeddedLanguageFormatting: "auto";
28
+ singleAttributePerLine: false;
29
+ overrides: {
30
+ files: string[];
31
+ options: {
32
+ parser: "jsonc";
33
+ };
34
+ }[];
35
+ };
36
+
37
+ export { _default as default };
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Prettier Config
3
+ *
4
+ * @see https://prettier.io/docs/en/options
5
+ * @see https://prettier.io/docs/en/configuration
6
+ */
7
+ declare const _default: {
8
+ printWidth: number;
9
+ tabWidth: number;
10
+ useTabs: false;
11
+ semi: true;
12
+ singleQuote: true;
13
+ quoteProps: "consistent";
14
+ jsxSingleQuote: false;
15
+ trailingComma: "all";
16
+ bracketSpacing: true;
17
+ bracketSameLine: false;
18
+ arrowParens: "always";
19
+ rangeStart: number;
20
+ rangeEnd: number;
21
+ requirePragma: false;
22
+ insertPragma: false;
23
+ proseWrap: "preserve";
24
+ htmlWhitespaceSensitivity: "css";
25
+ vueIndentScriptAndStyle: false;
26
+ endOfLine: "lf";
27
+ embeddedLanguageFormatting: "auto";
28
+ singleAttributePerLine: false;
29
+ overrides: {
30
+ files: string[];
31
+ options: {
32
+ parser: "jsonc";
33
+ };
34
+ }[];
35
+ };
36
+
37
+ export { _default as default };
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Prettier Config
3
+ *
4
+ * @see https://prettier.io/docs/en/options
5
+ * @see https://prettier.io/docs/en/configuration
6
+ */
7
+ declare const _default: {
8
+ printWidth: number;
9
+ tabWidth: number;
10
+ useTabs: false;
11
+ semi: true;
12
+ singleQuote: true;
13
+ quoteProps: "consistent";
14
+ jsxSingleQuote: false;
15
+ trailingComma: "all";
16
+ bracketSpacing: true;
17
+ bracketSameLine: false;
18
+ arrowParens: "always";
19
+ rangeStart: number;
20
+ rangeEnd: number;
21
+ requirePragma: false;
22
+ insertPragma: false;
23
+ proseWrap: "preserve";
24
+ htmlWhitespaceSensitivity: "css";
25
+ vueIndentScriptAndStyle: false;
26
+ endOfLine: "lf";
27
+ embeddedLanguageFormatting: "auto";
28
+ singleAttributePerLine: false;
29
+ overrides: {
30
+ files: string[];
31
+ options: {
32
+ parser: "jsonc";
33
+ };
34
+ }[];
35
+ };
36
+
37
+ export { _default as default };
@@ -1,73 +1,61 @@
1
- /**
2
- * Prettier Config
3
- *
4
- * @see https://prettier.io/docs/en/configuration.html
5
- */
6
- module.exports = {
1
+ const index = {
7
2
  // Maximum line length
8
3
  printWidth: 80,
9
-
10
4
  // Specify the number of spaces per indentation-level
11
5
  tabWidth: 2,
12
-
13
6
  // Indent lines with tabs instead of spaces
14
7
  useTabs: false,
15
-
16
8
  // Use semicolons or not
17
9
  semi: true,
18
-
19
10
  // Use single quotes instead of double quotes
20
11
  singleQuote: true,
21
-
22
12
  // Change when properties in objects are quoted
23
- quoteProps: 'consistent',
24
-
13
+ quoteProps: "consistent",
25
14
  // Use single quotes instead of double quotes in JSX
26
15
  jsxSingleQuote: false,
27
-
28
16
  // Print trailing commas wherever possible when multi-line
29
- trailingComma: 'all',
30
-
17
+ trailingComma: "all",
31
18
  // Print spaces between brackets in object literals.
32
19
  bracketSpacing: true,
33
-
34
20
  // Put the `>` of a multi-line HTML element at the end of the last line instead of being alone on the next line (does not apply to self closing elements)
35
21
  bracketSameLine: false,
36
-
37
22
  // Include parentheses around a sole arrow function parameter
38
- arrowParens: 'always',
39
-
23
+ arrowParens: "always",
40
24
  // Format only a segment of a file.
41
25
  rangeStart: 0,
42
26
  rangeEnd: Infinity,
43
-
44
27
  // Specify which parser to use.
45
28
  // parser: undefined,
46
-
47
29
  // Specify the file name to use to infer which parser to use.
48
30
  // filepath: undefined,
49
-
50
31
  // Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
51
32
  requirePragma: false,
52
-
53
33
  // Prettier can insert a special @format marker at the top of files specifying that the file has been formatted with prettier.
54
34
  insertPragma: false,
55
-
56
35
  // By default, Prettier will wrap markdown text as-is since some services use a line-break-sensitive renderer, e.g. GitHub comment and BitBucket.
57
- proseWrap: 'preserve',
58
-
36
+ proseWrap: "preserve",
59
37
  // Specify the global whitespace sensitivity for HTML files
60
- htmlWhitespaceSensitivity: 'css',
61
-
38
+ htmlWhitespaceSensitivity: "css",
62
39
  // Whether or not to indent the code inside <script> and <style> tags in Vue files
63
40
  vueIndentScriptAndStyle: false,
64
-
65
41
  // End of line
66
- endOfLine: 'lf',
67
-
42
+ endOfLine: "lf",
68
43
  // Control whether Prettier formats quoted code embedded in the file
69
- embeddedLanguageFormatting: 'auto',
70
-
44
+ embeddedLanguageFormatting: "auto",
71
45
  // Enforce single attribute per line in HTML, Vue and JSX
72
46
  singleAttributePerLine: false,
47
+ overrides: [
48
+ {
49
+ files: [
50
+ ".vscode/extensions.json",
51
+ ".vscode/launch.json",
52
+ ".vscode/settings.json"
53
+ ],
54
+ options: {
55
+ parser: "jsonc"
56
+ }
57
+ }
58
+ ]
73
59
  };
60
+
61
+ export { index as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meteorlxy/prettier-config",
3
- "version": "2.11.0",
3
+ "version": "3.2.0",
4
4
  "description": "meteorlxy prettier config",
5
5
  "keywords": [
6
6
  "config",
@@ -14,12 +14,27 @@
14
14
  },
15
15
  "license": "MIT",
16
16
  "author": "meteorlxy <meteor.lxy@foxmail.com>",
17
- "main": "lib/index.js",
17
+ "type": "module",
18
+ "exports": {
19
+ ".": {
20
+ "import": "./dist/index.mjs",
21
+ "require": "./dist/index.cjs"
22
+ }
23
+ },
24
+ "main": "./dist/index.cjs",
25
+ "types": "./dist/index.d.ts",
18
26
  "files": [
19
- "lib"
27
+ "./dist"
20
28
  ],
29
+ "scripts": {
30
+ "build": "unbuild",
31
+ "clean": "rimraf ./dist"
32
+ },
33
+ "devDependencies": {
34
+ "prettier": "^3.2.5"
35
+ },
21
36
  "publishConfig": {
22
37
  "access": "public"
23
38
  },
24
- "gitHead": "f5cb476a66acf2856eb5c303bd6c7dacd71c60f1"
39
+ "gitHead": "c5ab071431e753e9619c801c4a557e3486dc4cdc"
25
40
  }