@meteorlxy/prettier-config 2.7.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.
package/README.md CHANGED
@@ -1,14 +1,12 @@
1
1
  # Prettier Config
2
2
 
3
- ## Usage
4
-
5
- ### Install
3
+ ## Install
6
4
 
7
5
  ```sh
8
6
  npm i -D @meteorlxy/prettier-config
9
7
  ```
10
8
 
11
- ### Extend this config
9
+ ## Usage
12
10
 
13
11
  In `package.json`:
14
12
 
@@ -17,3 +15,14 @@ In `package.json`:
17
15
  "prettier": "@meteorlxy/prettier-config"
18
16
  }
19
17
  ```
18
+
19
+ In `prettier.config.js`:
20
+
21
+ ```js
22
+ import meteorlxy from '@meteorlxy/prettier-config';
23
+
24
+ export default {
25
+ ...meteorlxy,
26
+ // overrides
27
+ };
28
+ ```
@@ -1,73 +1,51 @@
1
- /**
2
- * Prettier Config
3
- *
4
- * @see https://prettier.io/docs/en/configuration.html
5
- */
6
- module.exports = {
1
+ 'use strict';
2
+
3
+ const index = {
7
4
  // Maximum line length
8
5
  printWidth: 80,
9
-
10
6
  // Specify the number of spaces per indentation-level
11
7
  tabWidth: 2,
12
-
13
8
  // Indent lines with tabs instead of spaces
14
9
  useTabs: false,
15
-
16
10
  // Use semicolons or not
17
11
  semi: true,
18
-
19
12
  // Use single quotes instead of double quotes
20
13
  singleQuote: true,
21
-
22
14
  // Change when properties in objects are quoted
23
- quoteProps: 'consistent',
24
-
15
+ quoteProps: "consistent",
25
16
  // Use single quotes instead of double quotes in JSX
26
17
  jsxSingleQuote: false,
27
-
28
18
  // Print trailing commas wherever possible when multi-line
29
- trailingComma: 'all',
30
-
19
+ trailingComma: "all",
31
20
  // Print spaces between brackets in object literals.
32
21
  bracketSpacing: true,
33
-
34
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)
35
23
  bracketSameLine: false,
36
-
37
24
  // Include parentheses around a sole arrow function parameter
38
- arrowParens: 'always',
39
-
25
+ arrowParens: "always",
40
26
  // Format only a segment of a file.
41
27
  rangeStart: 0,
42
28
  rangeEnd: Infinity,
43
-
44
29
  // Specify which parser to use.
45
30
  // parser: undefined,
46
-
47
31
  // Specify the file name to use to infer which parser to use.
48
32
  // filepath: undefined,
49
-
50
33
  // Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
51
34
  requirePragma: false,
52
-
53
35
  // Prettier can insert a special @format marker at the top of files specifying that the file has been formatted with prettier.
54
36
  insertPragma: false,
55
-
56
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.
57
- proseWrap: 'preserve',
58
-
38
+ proseWrap: "preserve",
59
39
  // Specify the global whitespace sensitivity for HTML files
60
- htmlWhitespaceSensitivity: 'css',
61
-
40
+ htmlWhitespaceSensitivity: "css",
62
41
  // Whether or not to indent the code inside <script> and <style> tags in Vue files
63
42
  vueIndentScriptAndStyle: false,
64
-
65
43
  // End of line
66
- endOfLine: 'lf',
67
-
44
+ endOfLine: "lf",
68
45
  // Control whether Prettier formats quoted code embedded in the file
69
- embeddedLanguageFormatting: 'auto',
70
-
46
+ embeddedLanguageFormatting: "auto",
71
47
  // Enforce single attribute per line in HTML, Vue and JSX
72
- singleAttributePerLine: false,
48
+ singleAttributePerLine: false
73
49
  };
50
+
51
+ module.exports = index;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Prettier Config
3
+ *
4
+ * @see https://prettier.io/docs/en/configuration.html
5
+ */
6
+ declare const _default: {
7
+ printWidth: number;
8
+ tabWidth: number;
9
+ useTabs: boolean;
10
+ semi: boolean;
11
+ singleQuote: boolean;
12
+ quoteProps: string;
13
+ jsxSingleQuote: boolean;
14
+ trailingComma: string;
15
+ bracketSpacing: boolean;
16
+ bracketSameLine: boolean;
17
+ arrowParens: string;
18
+ rangeStart: number;
19
+ rangeEnd: number;
20
+ requirePragma: boolean;
21
+ insertPragma: boolean;
22
+ proseWrap: string;
23
+ htmlWhitespaceSensitivity: string;
24
+ vueIndentScriptAndStyle: boolean;
25
+ endOfLine: string;
26
+ embeddedLanguageFormatting: string;
27
+ singleAttributePerLine: boolean;
28
+ };
29
+
30
+ export { _default as default };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Prettier Config
3
+ *
4
+ * @see https://prettier.io/docs/en/configuration.html
5
+ */
6
+ declare const _default: {
7
+ printWidth: number;
8
+ tabWidth: number;
9
+ useTabs: boolean;
10
+ semi: boolean;
11
+ singleQuote: boolean;
12
+ quoteProps: string;
13
+ jsxSingleQuote: boolean;
14
+ trailingComma: string;
15
+ bracketSpacing: boolean;
16
+ bracketSameLine: boolean;
17
+ arrowParens: string;
18
+ rangeStart: number;
19
+ rangeEnd: number;
20
+ requirePragma: boolean;
21
+ insertPragma: boolean;
22
+ proseWrap: string;
23
+ htmlWhitespaceSensitivity: string;
24
+ vueIndentScriptAndStyle: boolean;
25
+ endOfLine: string;
26
+ embeddedLanguageFormatting: string;
27
+ singleAttributePerLine: boolean;
28
+ };
29
+
30
+ export { _default as default };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Prettier Config
3
+ *
4
+ * @see https://prettier.io/docs/en/configuration.html
5
+ */
6
+ declare const _default: {
7
+ printWidth: number;
8
+ tabWidth: number;
9
+ useTabs: boolean;
10
+ semi: boolean;
11
+ singleQuote: boolean;
12
+ quoteProps: string;
13
+ jsxSingleQuote: boolean;
14
+ trailingComma: string;
15
+ bracketSpacing: boolean;
16
+ bracketSameLine: boolean;
17
+ arrowParens: string;
18
+ rangeStart: number;
19
+ rangeEnd: number;
20
+ requirePragma: boolean;
21
+ insertPragma: boolean;
22
+ proseWrap: string;
23
+ htmlWhitespaceSensitivity: string;
24
+ vueIndentScriptAndStyle: boolean;
25
+ endOfLine: string;
26
+ embeddedLanguageFormatting: string;
27
+ singleAttributePerLine: boolean;
28
+ };
29
+
30
+ export { _default as default };
package/dist/index.mjs ADDED
@@ -0,0 +1,49 @@
1
+ const index = {
2
+ // Maximum line length
3
+ printWidth: 80,
4
+ // Specify the number of spaces per indentation-level
5
+ tabWidth: 2,
6
+ // Indent lines with tabs instead of spaces
7
+ useTabs: false,
8
+ // Use semicolons or not
9
+ semi: true,
10
+ // Use single quotes instead of double quotes
11
+ singleQuote: true,
12
+ // Change when properties in objects are quoted
13
+ quoteProps: "consistent",
14
+ // Use single quotes instead of double quotes in JSX
15
+ jsxSingleQuote: false,
16
+ // Print trailing commas wherever possible when multi-line
17
+ trailingComma: "all",
18
+ // Print spaces between brackets in object literals.
19
+ bracketSpacing: true,
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)
21
+ bracketSameLine: false,
22
+ // Include parentheses around a sole arrow function parameter
23
+ arrowParens: "always",
24
+ // Format only a segment of a file.
25
+ rangeStart: 0,
26
+ rangeEnd: Infinity,
27
+ // Specify which parser to use.
28
+ // parser: undefined,
29
+ // Specify the file name to use to infer which parser to use.
30
+ // filepath: undefined,
31
+ // Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
32
+ requirePragma: false,
33
+ // Prettier can insert a special @format marker at the top of files specifying that the file has been formatted with prettier.
34
+ insertPragma: false,
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.
36
+ proseWrap: "preserve",
37
+ // Specify the global whitespace sensitivity for HTML files
38
+ htmlWhitespaceSensitivity: "css",
39
+ // Whether or not to indent the code inside <script> and <style> tags in Vue files
40
+ vueIndentScriptAndStyle: false,
41
+ // End of line
42
+ endOfLine: "lf",
43
+ // Control whether Prettier formats quoted code embedded in the file
44
+ embeddedLanguageFormatting: "auto",
45
+ // Enforce single attribute per line in HTML, Vue and JSX
46
+ singleAttributePerLine: false
47
+ };
48
+
49
+ export { index as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meteorlxy/prettier-config",
3
- "version": "2.7.0",
3
+ "version": "3.0.0",
4
4
  "description": "meteorlxy prettier config",
5
5
  "keywords": [
6
6
  "config",
@@ -14,12 +14,24 @@
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
+ },
21
33
  "publishConfig": {
22
34
  "access": "public"
23
35
  },
24
- "gitHead": "52ce6274f0b80167459f618878c4c9b88665c9d1"
36
+ "gitHead": "54a346b3a0a68a36d401a4bfab8158041f0f47d0"
25
37
  }