@anolilab/prettier-config 4.0.11 → 4.1.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ ## @anolilab/prettier-config [4.1.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/prettier-config@4.1.0...@anolilab/prettier-config@4.1.1) (2023-06-28)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Update package dependencies versions ([7aec41d](https://github.com/anolilab/javascript-style-guide/commit/7aec41d753081b2cca2f1bb1f7daf1615c6568cb))
7
+
8
+
9
+ ### Miscellaneous Chores
10
+
11
+ * **prettier-config:** update readme ([b6da6a0](https://github.com/anolilab/javascript-style-guide/commit/b6da6a0a54f22b3037a866f6fa130fed47e6cf9a))
12
+ * update readme ([518bb22](https://github.com/anolilab/javascript-style-guide/commit/518bb2281ec76273348a9549c19a93b6d26ea33d))
13
+ * update readme to remove eslint ([3c714b2](https://github.com/anolilab/javascript-style-guide/commit/3c714b23770ff0dec77792d09ce5e8818a34adea))
14
+
15
+
16
+
17
+ ### Dependencies
18
+
19
+ * **@anolilab/package-json-utils:** upgraded to 1.5.1
20
+ * **@anolilab/semantic-release-preset:** upgraded to 4.0.2
21
+
22
+ ## @anolilab/prettier-config [4.1.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/prettier-config@4.0.11...@anolilab/prettier-config@4.1.0) (2023-06-25)
23
+
24
+
25
+ ### Features
26
+
27
+ * extended prettier-config, with overrides for .eslintrc, .prettierrc, .stylelintrc, package*.json, *.yml,*.yaml ([1e24536](https://github.com/anolilab/javascript-style-guide/commit/1e2453670e91bf2207d01afb704ad0deee5a5597))
28
+
1
29
  ## @anolilab/prettier-config [4.0.11](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/prettier-config@4.0.10...@anolilab/prettier-config@4.0.11) (2023-06-24)
2
30
 
3
31
 
package/README.md CHANGED
@@ -1,9 +1,8 @@
1
- # Prettier shareable configuration
2
-
3
- Anolilab Coding Standard for semantic-release.
1
+ <div align="center">
4
2
 
3
+ <h1>Prettier shareable configuration</h1>
5
4
 
6
- <div align="center">
5
+ Package that contains shareable configuration for [prettier](https://github.com/prettier/prettier) — a popular opinionated code formatter.
7
6
 
8
7
  [![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url]
9
8
 
@@ -21,7 +20,6 @@ Anolilab Coding Standard for semantic-release.
21
20
 
22
21
  ---
23
22
 
24
-
25
23
  ## Install
26
24
 
27
25
  ```bash
@@ -29,16 +27,23 @@ npm install --dev-save @anolilab/prettier-config
29
27
  ```
30
28
 
31
29
  ```sh
32
- yarn add -D eslint @anolilab/prettier-config
30
+ yarn add -D @anolilab/prettier-config
33
31
  ```
34
32
 
35
33
  ```sh
36
- pnpm add -D eslint @anolilab/prettier-config
34
+ pnpm add -D @anolilab/prettier-config
37
35
  ```
38
36
 
39
37
  ## Usage
40
38
 
41
- If you don’t have a `.prettierrc.{c|m}js` and `.prettierignore`, we will create the file for you after installing `@anolilab/prettier-config`.
39
+ If you don’t have a `.prettierrc.js` and `.prettierignore`, we will create the file for you after installing `@anolilab/prettier-config`.
40
+
41
+ > Note: If the script detects an existing `.prettierrc.js` file, it will not overwrite it.
42
+
43
+ > Note: It can happen that the postinstall script don't run, then you have to add the `.prettierrc.js` manually.
44
+
45
+ <details>
46
+ <summary>File content of the `.prettierrc.js`</summary>
42
47
 
43
48
  ```js
44
49
  {
@@ -81,6 +86,8 @@ If you don’t have a `.prettierrc.{c|m}js` and `.prettierignore`, we will creat
81
86
  embeddedLanguageFormatting: "auto",
82
87
  }
83
88
  ```
89
+ </details>
90
+
84
91
 
85
92
  ## Supported Node.js Versions
86
93
 
@@ -0,0 +1,5 @@
1
+ var e={printWidth:160,tabWidth:4,useTabs:!1,semi:!0,singleQuote:!1,quoteProps:"as-needed",jsxSingleQuote:!1,trailingComma:"all",bracketSpacing:!0,arrowParens:"always",rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,requirePragma:!1,insertPragma:!1,proseWrap:"preserve",htmlWhitespaceSensitivity:"css",vueIndentScriptAndStyle:!1,endOfLine:"lf",embeddedLanguageFormatting:"auto",overrides:[{files:".eslintrc",options:{parser:"json"}},{files:".prettierrc",options:{parser:"json"}},{files:".stylelintrc",options:{parser:"json"}},{files:"package*.json",options:{printWidth:1e3}},{files:"*.yml",options:{singleQuote:!1}},{files:"*.yaml",options:{singleQuote:!1}}]},s=e;
2
+
3
+ export { s as a };
4
+ //# sourceMappingURL=out.js.map
5
+ //# sourceMappingURL=chunk-DIYGXZU5.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"names":["config","src_default"],"mappings":"AAEA,IAAMA,EAAiB,CAEnB,WAAY,IAEZ,SAAU,EAEV,QAAS,GAET,KAAM,GAEN,YAAa,GAEb,WAAY,YAEZ,eAAgB,GAEhB,cAAe,MAEf,eAAgB,GAEhB,YAAa,SAEb,WAAY,EACZ,SAAU,OAAO,kBAEjB,cAAe,GAEf,aAAc,GAEd,UAAW,WAEX,0BAA2B,MAE3B,wBAAyB,GAEzB,UAAW,KAEX,2BAA4B,OAC5B,UAAW,CACP,CAAE,MAAO,YAAa,QAAS,CAAE,OAAQ,MAAO,CAAE,EAClD,CAAE,MAAO,cAAe,QAAS,CAAE,OAAQ,MAAO,CAAE,EACpD,CAAE,MAAO,eAAgB,QAAS,CAAE,OAAQ,MAAO,CAAE,EACrD,CAAE,MAAO,gBAAiB,QAAS,CAAE,WAAY,GAAK,CAAE,EACxD,CAAE,MAAO,QAAS,QAAS,CAAE,YAAa,EAAM,CAAE,EAClD,CAAE,MAAO,SAAU,QAAS,CAAE,YAAa,EAAM,CAAE,CACvD,CACJ,EAEOC,EAAQD","sourcesContent":["import type { Config } from \"prettier\";\n\nconst config: Config = {\n // max 160 characters per line\n printWidth: 160,\n // use 4 spaces for indentation\n tabWidth: 4,\n // use spaces instead of indentations\n useTabs: false,\n // semicolon at the end of the line\n semi: true,\n // use single quotes\n singleQuote: false,\n // object's key is quoted only when necessary\n quoteProps: \"as-needed\",\n // use double quotes instead of single quotes in jsx\n jsxSingleQuote: false,\n // all comma at the end\n trailingComma: \"all\",\n // spaces are required at the beginning and end of the braces\n bracketSpacing: true,\n // brackets are required for arrow function parameter, even when there is only one parameter\n arrowParens: \"always\",\n // format the entire contents of the file\n rangeStart: 0,\n rangeEnd: Number.POSITIVE_INFINITY,\n // no need to write the beginning @prettier of the file\n requirePragma: false,\n // No need to automatically insert @prettier at the beginning of the file\n insertPragma: false,\n // use default break criteria\n proseWrap: \"preserve\",\n // decide whether to break the html according to the display style\n htmlWhitespaceSensitivity: \"css\",\n // vue files script and style tags indentation\n vueIndentScriptAndStyle: false,\n // lf for newline\n endOfLine: \"lf\",\n // formats quoted code embedded\n embeddedLanguageFormatting: \"auto\",\n overrides: [\n { files: \".eslintrc\", options: { parser: \"json\" } },\n { files: \".prettierrc\", options: { parser: \"json\" } },\n { files: \".stylelintrc\", options: { parser: \"json\" } },\n { files: \"package*.json\", options: { printWidth: 1000 } },\n { files: \"*.yml\", options: { singleQuote: false } },\n { files: \"*.yaml\", options: { singleQuote: false } },\n ],\n};\n\nexport default config;\n"]}
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var e={printWidth:160,tabWidth:4,useTabs:!1,semi:!0,singleQuote:!1,quoteProps:"as-needed",jsxSingleQuote:!1,trailingComma:"all",bracketSpacing:!0,arrowParens:"always",rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,requirePragma:!1,insertPragma:!1,proseWrap:"preserve",htmlWhitespaceSensitivity:"css",vueIndentScriptAndStyle:!1,endOfLine:"lf",embeddedLanguageFormatting:"auto",overrides:[{files:".eslintrc",options:{parser:"json"}},{files:".prettierrc",options:{parser:"json"}},{files:".stylelintrc",options:{parser:"json"}},{files:"package*.json",options:{printWidth:1e3}},{files:"*.yml",options:{singleQuote:!1}},{files:"*.yaml",options:{singleQuote:!1}}]},s=e;
4
+
5
+ exports.a = s;
6
+ //# sourceMappingURL=out.js.map
7
+ //# sourceMappingURL=chunk-WCJNF4E4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"names":["config","src_default"],"mappings":"AAEA,IAAMA,EAAiB,CAEnB,WAAY,IAEZ,SAAU,EAEV,QAAS,GAET,KAAM,GAEN,YAAa,GAEb,WAAY,YAEZ,eAAgB,GAEhB,cAAe,MAEf,eAAgB,GAEhB,YAAa,SAEb,WAAY,EACZ,SAAU,OAAO,kBAEjB,cAAe,GAEf,aAAc,GAEd,UAAW,WAEX,0BAA2B,MAE3B,wBAAyB,GAEzB,UAAW,KAEX,2BAA4B,OAC5B,UAAW,CACP,CAAE,MAAO,YAAa,QAAS,CAAE,OAAQ,MAAO,CAAE,EAClD,CAAE,MAAO,cAAe,QAAS,CAAE,OAAQ,MAAO,CAAE,EACpD,CAAE,MAAO,eAAgB,QAAS,CAAE,OAAQ,MAAO,CAAE,EACrD,CAAE,MAAO,gBAAiB,QAAS,CAAE,WAAY,GAAK,CAAE,EACxD,CAAE,MAAO,QAAS,QAAS,CAAE,YAAa,EAAM,CAAE,EAClD,CAAE,MAAO,SAAU,QAAS,CAAE,YAAa,EAAM,CAAE,CACvD,CACJ,EAEOC,EAAQD","sourcesContent":["import type { Config } from \"prettier\";\n\nconst config: Config = {\n // max 160 characters per line\n printWidth: 160,\n // use 4 spaces for indentation\n tabWidth: 4,\n // use spaces instead of indentations\n useTabs: false,\n // semicolon at the end of the line\n semi: true,\n // use single quotes\n singleQuote: false,\n // object's key is quoted only when necessary\n quoteProps: \"as-needed\",\n // use double quotes instead of single quotes in jsx\n jsxSingleQuote: false,\n // all comma at the end\n trailingComma: \"all\",\n // spaces are required at the beginning and end of the braces\n bracketSpacing: true,\n // brackets are required for arrow function parameter, even when there is only one parameter\n arrowParens: \"always\",\n // format the entire contents of the file\n rangeStart: 0,\n rangeEnd: Number.POSITIVE_INFINITY,\n // no need to write the beginning @prettier of the file\n requirePragma: false,\n // No need to automatically insert @prettier at the beginning of the file\n insertPragma: false,\n // use default break criteria\n proseWrap: \"preserve\",\n // decide whether to break the html according to the display style\n htmlWhitespaceSensitivity: \"css\",\n // vue files script and style tags indentation\n vueIndentScriptAndStyle: false,\n // lf for newline\n endOfLine: \"lf\",\n // formats quoted code embedded\n embeddedLanguageFormatting: \"auto\",\n overrides: [\n { files: \".eslintrc\", options: { parser: \"json\" } },\n { files: \".prettierrc\", options: { parser: \"json\" } },\n { files: \".stylelintrc\", options: { parser: \"json\" } },\n { files: \"package*.json\", options: { printWidth: 1000 } },\n { files: \"*.yml\", options: { singleQuote: false } },\n { files: \"*.yaml\", options: { singleQuote: false } },\n ],\n};\n\nexport default config;\n"]}
@@ -0,0 +1,5 @@
1
+ import { Config } from 'prettier';
2
+
3
+ declare const config: Config;
4
+
5
+ export { config as default };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Options } from 'prettier';
1
+ import { Config } from 'prettier';
2
2
 
3
- declare const config: Options;
3
+ declare const config: Config;
4
4
 
5
5
  export { config as default };
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkLL7RB26L_js = require('./chunk-LL7RB26L.js');
3
+ var chunkWCJNF4E4_js = require('./chunk-WCJNF4E4.js');
4
4
 
5
5
 
6
6
 
7
- module.exports = chunkLL7RB26L_js.a;
7
+ module.exports = chunkWCJNF4E4_js.a;
8
8
  //# sourceMappingURL=out.js.map
9
9
  //# sourceMappingURL=index.js.map
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- export { a as default } from './chunk-D3AEYP6U.mjs';
1
+ export { a as default } from './chunk-DIYGXZU5.mjs';
2
2
  //# sourceMappingURL=out.js.map
3
3
  //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -1,16 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var chunkLL7RB26L_js = require('./chunk-LL7RB26L.js');
3
+ var chunkWCJNF4E4_js = require('./chunk-WCJNF4E4.js');
4
4
  var packageJsonUtils = require('@anolilab/package-json-utils');
5
5
  var fs = require('fs');
6
6
  var path = require('path');
7
7
  var util = require('util');
8
8
 
9
- process.env.CI&&process.exit(0);var s=util.promisify(fs.writeFile);console.log("Configuring @anolilab/prettier-config",packageJsonUtils.projectPath,`
10
- `);var a=()=>{let e=path.join(packageJsonUtils.projectPath,".prettierrc.js");return fs.existsSync(e)||fs.existsSync(e.replace(".js",""))||fs.existsSync(e.replace(".js",`.${packageJsonUtils.packageIsTypeModule?"m":"c"}js`))?(console.warn(`\u26A0\uFE0F .prettierrc.{m|c}js already exists;
9
+ process.env.CI&&process.exit(0);var l=util.promisify(fs.writeFile);console.log("Configuring @anolilab/prettier-config",packageJsonUtils.projectPath,`
10
+ `);var e=".prettierrc",g=()=>{for(let n of [e,`${e}.js`,`${e}.cjs`,`${e}.json`,`${e}.json5`,`${e}.yaml`,`${e}.yml`,`${e}.toml`,"prettier.config.js","prettier.config.cjs"])if(fs.existsSync(path.join(packageJsonUtils.projectPath,n)))return console.warn(`\u26A0\uFE0F ${n} already exists;
11
11
  Make sure that it includes the following for @anolilab/prettier-config to work as it should:
12
- ${JSON.stringify(chunkLL7RB26L_js.a,void 0,4)}
13
- `),Promise.resolve()):s(e,`${packageJsonUtils.packageIsTypeModule?"export default":"module.exports ="} ${JSON.stringify(chunkLL7RB26L_js.a,void 0,2).replace("rangeEnd: null,","rangeEnd: Number.POSITIVE_INFINITY,")}
14
- `,"utf-8")},p=()=>{let e=path.join(packageJsonUtils.projectPath,".prettierignore");return fs.existsSync(e)?(console.warn("\u26A0\uFE0F .prettierignore already exists"),Promise.resolve()):s(e,"","utf-8")};(async()=>{try{await Promise.all([a(),p()]),console.log("\u{1F60E} Everything went well, have fun!"),process.exit(0);}catch(e){console.log("\u{1F62C} something went wrong:"),console.error(e),process.exit(1);}})();
12
+ ${JSON.stringify(chunkWCJNF4E4_js.a,void 0,4)}
13
+ `),Promise.resolve();let r=path.join(packageJsonUtils.projectPath,".prettierrc.js");return l(r,`${packageJsonUtils.packageIsTypeModule?"export default":"module.exports ="} ${JSON.stringify(chunkWCJNF4E4_js.a,void 0,2).replace("rangeEnd: null,","rangeEnd: Number.POSITIVE_INFINITY,")}
14
+ `,"utf8")},p=()=>{let r=path.join(packageJsonUtils.projectPath,".prettierignore");return fs.existsSync(r)?(console.warn("\u26A0\uFE0F .prettierignore already exists"),Promise.resolve()):l(r,`${["*.md","*.sh","*.yml","*.svg","*.gif","*.log",".DS_Store","CNAME","AUTHORS","LICENSE","es/","lib/","dist/","coverage/"].join(`
15
+ `)}
16
+ `,"utf8")};(async()=>{try{await Promise.all([g(),p()]),console.log("\u{1F60E} Everything went well, have fun!"),process.exit(0);}catch(r){console.log("\u{1F62C} something went wrong:"),console.error(r),process.exit(1);}})();
15
17
  //# sourceMappingURL=out.js.map
16
18
  //# sourceMappingURL=postinstall.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/postinstall.ts"],"names":["packageIsTypeModule","projectPath","existsSync","writeFile","join","promisify","writeFileAsync","writePrettierRc","prettierPath","src_default","writePrettierIgnore","error"],"mappings":"wCAAA,OAAS,uBAAAA,EAAqB,eAAAC,MAAmB,+BACjD,OAAS,cAAAC,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAItB,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBD,EAAUF,CAAS,EAE1C,QAAQ,IAAI,wCAAyCF,EAAa;AAAA,CAAI,EAKtE,IAAMM,EAAkB,IAAM,CAC1B,IAAMC,EAAeJ,EAAKH,EAAa,gBAAgB,EAEvD,OACIC,EAAWM,CAAY,GACpBN,EAAWM,EAAa,QAAQ,MAAO,EAAE,CAAC,GAC1CN,EAAWM,EAAa,QAAQ,MAAO,IAAIR,EAAsB,IAAM,OAAO,CAAC,GAElF,QAAQ,KAAK;AAAA;AAAA,EAEnB,KAAK,UAAUS,EAAS,OAAW,CAAC;AAAA,CAAK,EAE5B,QAAQ,QAAQ,GAGpBH,EACHE,EACA,GAAGR,EAAsB,iBAAmB,sBAAsB,KAAK,UAAUS,EAAS,OAAW,CAAC,EAAE,QACpG,kBACA,qCACJ;AAAA,EACA,OACJ,CACJ,EAKMC,EAAsB,IAAM,CAC9B,IAAMF,EAAeJ,EAAKH,EAAa,iBAAiB,EAExD,OAAIC,EAAWM,CAAY,GACvB,QAAQ,KAAK,8CAAoC,EAE1C,QAAQ,QAAQ,GAGpBF,EAAeE,EAAc,GAAI,OAAO,CACnD,GAGC,SAAY,CACT,GAAI,CAEA,MAAM,QAAQ,IAAI,CAACD,EAAgB,EAAGG,EAAoB,CAAC,CAAC,EAE5D,QAAQ,IAAI,4CAAqC,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASC,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["import { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\nimport { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nimport content from \".\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/prettier-config\", projectPath, \"\\n\");\n\n/**\n * Writes .prettierrc.${m|c}js if it doesn't exist. Warns if it exists.\n */\nconst writePrettierRc = () => {\n const prettierPath = join(projectPath, \".prettierrc.js\");\n\n if (\n existsSync(prettierPath)\n || existsSync(prettierPath.replace(\".js\", \"\"))\n || existsSync(prettierPath.replace(\".js\", `.${packageIsTypeModule ? \"m\" : \"c\"}js`))\n ) {\n console.warn(`⚠️ .prettierrc.{m|c}js already exists;\nMake sure that it includes the following for @anolilab/prettier-config to work as it should:\n${JSON.stringify(content, undefined, 4)}\\n`);\n\n return Promise.resolve();\n }\n\n return writeFileAsync(\n prettierPath,\n `${packageIsTypeModule ? \"export default\" : \"module.exports =\"} ${JSON.stringify(content, undefined, 2).replace(\n \"rangeEnd: null,\",\n \"rangeEnd: Number.POSITIVE_INFINITY,\",\n )}\\n`,\n \"utf-8\",\n );\n};\n\n/**\n * Writes .prettierignore if it doesn't exist. Warns if it exists.\n */\nconst writePrettierIgnore = () => {\n const prettierPath = join(projectPath, \".prettierignore\");\n\n if (existsSync(prettierPath)) {\n console.warn(\"⚠️ .prettierignore already exists\");\n\n return Promise.resolve();\n }\n\n return writeFileAsync(prettierPath, \"\", \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n // eslint-disable-next-line compat/compat\n await Promise.all([writePrettierRc(), writePrettierIgnore()]);\n\n console.log(\"😎 Everything went well, have fun!\");\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1);\n }\n})();\n"]}
1
+ {"version":3,"sources":["../src/postinstall.ts"],"names":["packageIsTypeModule","projectPath","existsSync","writeFile","join","promisify","writeFileAsync","configFile","writePrettierRc","filename","src_default","prettierPath","writePrettierIgnore","error"],"mappings":"wCAAA,OAAS,uBAAAA,EAAqB,eAAAC,MAAmB,+BACjD,OAAS,cAAAC,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAItB,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBD,EAAUF,CAAS,EAE1C,QAAQ,IAAI,wCAAyCF,EAAa;AAAA,CAAI,EAEtE,IAAMM,EAAa,cAKbC,EAAkB,IAAM,CAE1B,QAAWC,IAAY,CACnBF,EACA,GAAGA,OACH,GAAGA,QACH,GAAGA,SACH,GAAGA,UACH,GAAGA,SACH,GAAGA,QACH,GAAGA,SACH,qBACA,qBACJ,EACI,GAAIL,EAAWE,EAAKH,EAAaQ,CAAQ,CAAC,EACtC,eAAQ,KAAK,iBAAOA;AAAA;AAAA,EAE9B,KAAK,UAAUC,EAAS,OAAW,CAAC;AAAA,CAAK,EAExB,QAAQ,QAAQ,EAI/B,IAAMC,EAAeP,EAAKH,EAAa,gBAAgB,EAEvD,OAAOK,EACHK,EACA,GAAGX,EAAsB,iBAAmB,sBAAsB,KAAK,UAAUU,EAAS,OAAW,CAAC,EAAE,QACpG,kBACA,qCACJ;AAAA,EACA,MACJ,CACJ,EAKME,EAAsB,IAAM,CAC9B,IAAMD,EAAeP,EAAKH,EAAa,iBAAiB,EAExD,OAAIC,EAAWS,CAAY,GACvB,QAAQ,KAAK,8CAAoC,EAE1C,QAAQ,QAAQ,GAGpBL,EACHK,EACA,GAAG,CAAC,OAAQ,OAAQ,QAAS,QAAS,QAAS,QAAS,YAAa,QAAS,UAAW,UAAW,MAAO,OAAQ,QAAS,WAAW,EAAE,KAAK;AAAA,CAAI;AAAA,EAClJ,MACJ,CACJ,GAGC,SAAY,CACT,GAAI,CAEA,MAAM,QAAQ,IAAI,CAACH,EAAgB,EAAGI,EAAoB,CAAC,CAAC,EAE5D,QAAQ,IAAI,4CAAqC,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASC,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["import { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\nimport { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nimport content from \".\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/prettier-config\", projectPath, \"\\n\");\n\nconst configFile = \".prettierrc\";\n\n/**\n * Writes .prettierrc.${m|c}js if it doesn't exist. Warns if it exists.\n */\nconst writePrettierRc = () => {\n // eslint-disable-next-line no-restricted-syntax\n for (const filename of [\n configFile,\n `${configFile}.js`,\n `${configFile}.cjs`,\n `${configFile}.json`,\n `${configFile}.json5`,\n `${configFile}.yaml`,\n `${configFile}.yml`,\n `${configFile}.toml`,\n \"prettier.config.js\",\n \"prettier.config.cjs\",\n ]) {\n if (existsSync(join(projectPath, filename))) {\n console.warn(`⚠️ ${filename} already exists;\nMake sure that it includes the following for @anolilab/prettier-config to work as it should:\n${JSON.stringify(content, undefined, 4)}\\n`);\n\n return Promise.resolve();\n }\n }\n\n const prettierPath = join(projectPath, \".prettierrc.js\");\n\n return writeFileAsync(\n prettierPath,\n `${packageIsTypeModule ? \"export default\" : \"module.exports =\"} ${JSON.stringify(content, undefined, 2).replace(\n \"rangeEnd: null,\",\n \"rangeEnd: Number.POSITIVE_INFINITY,\",\n )}\\n`,\n \"utf8\",\n );\n};\n\n/**\n * Writes .prettierignore if it doesn't exist. Warns if it exists.\n */\nconst writePrettierIgnore = () => {\n const prettierPath = join(projectPath, \".prettierignore\");\n\n if (existsSync(prettierPath)) {\n console.warn(\"⚠️ .prettierignore already exists\");\n\n return Promise.resolve();\n }\n\n return writeFileAsync(\n prettierPath,\n `${[\"*.md\", \"*.sh\", \"*.yml\", \"*.svg\", \"*.gif\", \"*.log\", \".DS_Store\", \"CNAME\", \"AUTHORS\", \"LICENSE\", \"es/\", \"lib/\", \"dist/\", \"coverage/\"].join(\"\\n\")}\\n`,\n \"utf8\",\n );\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n // eslint-disable-next-line compat/compat\n await Promise.all([writePrettierRc(), writePrettierIgnore()]);\n\n console.log(\"😎 Everything went well, have fun!\");\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1);\n }\n})();\n"]}
@@ -1,14 +1,16 @@
1
- import { a as a$1 } from './chunk-D3AEYP6U.mjs';
1
+ import { a } from './chunk-DIYGXZU5.mjs';
2
2
  import { projectPath, packageIsTypeModule } from '@anolilab/package-json-utils';
3
3
  import { writeFile, existsSync } from 'fs';
4
4
  import { join } from 'path';
5
5
  import { promisify } from 'util';
6
6
 
7
- process.env.CI&&process.exit(0);var s=promisify(writeFile);console.log("Configuring @anolilab/prettier-config",projectPath,`
8
- `);var a=()=>{let e=join(projectPath,".prettierrc.js");return existsSync(e)||existsSync(e.replace(".js",""))||existsSync(e.replace(".js",`.${packageIsTypeModule?"m":"c"}js`))?(console.warn(`\u26A0\uFE0F .prettierrc.{m|c}js already exists;
7
+ process.env.CI&&process.exit(0);var l=promisify(writeFile);console.log("Configuring @anolilab/prettier-config",projectPath,`
8
+ `);var e=".prettierrc",g=()=>{for(let n of [e,`${e}.js`,`${e}.cjs`,`${e}.json`,`${e}.json5`,`${e}.yaml`,`${e}.yml`,`${e}.toml`,"prettier.config.js","prettier.config.cjs"])if(existsSync(join(projectPath,n)))return console.warn(`\u26A0\uFE0F ${n} already exists;
9
9
  Make sure that it includes the following for @anolilab/prettier-config to work as it should:
10
- ${JSON.stringify(a$1,void 0,4)}
11
- `),Promise.resolve()):s(e,`${packageIsTypeModule?"export default":"module.exports ="} ${JSON.stringify(a$1,void 0,2).replace("rangeEnd: null,","rangeEnd: Number.POSITIVE_INFINITY,")}
12
- `,"utf-8")},p=()=>{let e=join(projectPath,".prettierignore");return existsSync(e)?(console.warn("\u26A0\uFE0F .prettierignore already exists"),Promise.resolve()):s(e,"","utf-8")};(async()=>{try{await Promise.all([a(),p()]),console.log("\u{1F60E} Everything went well, have fun!"),process.exit(0);}catch(e){console.log("\u{1F62C} something went wrong:"),console.error(e),process.exit(1);}})();
10
+ ${JSON.stringify(a,void 0,4)}
11
+ `),Promise.resolve();let r=join(projectPath,".prettierrc.js");return l(r,`${packageIsTypeModule?"export default":"module.exports ="} ${JSON.stringify(a,void 0,2).replace("rangeEnd: null,","rangeEnd: Number.POSITIVE_INFINITY,")}
12
+ `,"utf8")},p=()=>{let r=join(projectPath,".prettierignore");return existsSync(r)?(console.warn("\u26A0\uFE0F .prettierignore already exists"),Promise.resolve()):l(r,`${["*.md","*.sh","*.yml","*.svg","*.gif","*.log",".DS_Store","CNAME","AUTHORS","LICENSE","es/","lib/","dist/","coverage/"].join(`
13
+ `)}
14
+ `,"utf8")};(async()=>{try{await Promise.all([g(),p()]),console.log("\u{1F60E} Everything went well, have fun!"),process.exit(0);}catch(r){console.log("\u{1F62C} something went wrong:"),console.error(r),process.exit(1);}})();
13
15
  //# sourceMappingURL=out.js.map
14
16
  //# sourceMappingURL=postinstall.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/postinstall.ts"],"names":["packageIsTypeModule","projectPath","existsSync","writeFile","join","promisify","writeFileAsync","writePrettierRc","prettierPath","src_default","writePrettierIgnore","error"],"mappings":"yCAAA,OAAS,uBAAAA,EAAqB,eAAAC,MAAmB,+BACjD,OAAS,cAAAC,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAItB,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBD,EAAUF,CAAS,EAE1C,QAAQ,IAAI,wCAAyCF,EAAa;AAAA,CAAI,EAKtE,IAAMM,EAAkB,IAAM,CAC1B,IAAMC,EAAeJ,EAAKH,EAAa,gBAAgB,EAEvD,OACIC,EAAWM,CAAY,GACpBN,EAAWM,EAAa,QAAQ,MAAO,EAAE,CAAC,GAC1CN,EAAWM,EAAa,QAAQ,MAAO,IAAIR,EAAsB,IAAM,OAAO,CAAC,GAElF,QAAQ,KAAK;AAAA;AAAA,EAEnB,KAAK,UAAUS,EAAS,OAAW,CAAC;AAAA,CAAK,EAE5B,QAAQ,QAAQ,GAGpBH,EACHE,EACA,GAAGR,EAAsB,iBAAmB,sBAAsB,KAAK,UAAUS,EAAS,OAAW,CAAC,EAAE,QACpG,kBACA,qCACJ;AAAA,EACA,OACJ,CACJ,EAKMC,EAAsB,IAAM,CAC9B,IAAMF,EAAeJ,EAAKH,EAAa,iBAAiB,EAExD,OAAIC,EAAWM,CAAY,GACvB,QAAQ,KAAK,8CAAoC,EAE1C,QAAQ,QAAQ,GAGpBF,EAAeE,EAAc,GAAI,OAAO,CACnD,GAGC,SAAY,CACT,GAAI,CAEA,MAAM,QAAQ,IAAI,CAACD,EAAgB,EAAGG,EAAoB,CAAC,CAAC,EAE5D,QAAQ,IAAI,4CAAqC,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASC,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["import { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\nimport { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nimport content from \".\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/prettier-config\", projectPath, \"\\n\");\n\n/**\n * Writes .prettierrc.${m|c}js if it doesn't exist. Warns if it exists.\n */\nconst writePrettierRc = () => {\n const prettierPath = join(projectPath, \".prettierrc.js\");\n\n if (\n existsSync(prettierPath)\n || existsSync(prettierPath.replace(\".js\", \"\"))\n || existsSync(prettierPath.replace(\".js\", `.${packageIsTypeModule ? \"m\" : \"c\"}js`))\n ) {\n console.warn(`⚠️ .prettierrc.{m|c}js already exists;\nMake sure that it includes the following for @anolilab/prettier-config to work as it should:\n${JSON.stringify(content, undefined, 4)}\\n`);\n\n return Promise.resolve();\n }\n\n return writeFileAsync(\n prettierPath,\n `${packageIsTypeModule ? \"export default\" : \"module.exports =\"} ${JSON.stringify(content, undefined, 2).replace(\n \"rangeEnd: null,\",\n \"rangeEnd: Number.POSITIVE_INFINITY,\",\n )}\\n`,\n \"utf-8\",\n );\n};\n\n/**\n * Writes .prettierignore if it doesn't exist. Warns if it exists.\n */\nconst writePrettierIgnore = () => {\n const prettierPath = join(projectPath, \".prettierignore\");\n\n if (existsSync(prettierPath)) {\n console.warn(\"⚠️ .prettierignore already exists\");\n\n return Promise.resolve();\n }\n\n return writeFileAsync(prettierPath, \"\", \"utf-8\");\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n // eslint-disable-next-line compat/compat\n await Promise.all([writePrettierRc(), writePrettierIgnore()]);\n\n console.log(\"😎 Everything went well, have fun!\");\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1);\n }\n})();\n"]}
1
+ {"version":3,"sources":["../src/postinstall.ts"],"names":["packageIsTypeModule","projectPath","existsSync","writeFile","join","promisify","writeFileAsync","configFile","writePrettierRc","filename","src_default","prettierPath","writePrettierIgnore","error"],"mappings":"yCAAA,OAAS,uBAAAA,EAAqB,eAAAC,MAAmB,+BACjD,OAAS,cAAAC,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,MAAiB,OAItB,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBD,EAAUF,CAAS,EAE1C,QAAQ,IAAI,wCAAyCF,EAAa;AAAA,CAAI,EAEtE,IAAMM,EAAa,cAKbC,EAAkB,IAAM,CAE1B,QAAWC,IAAY,CACnBF,EACA,GAAGA,OACH,GAAGA,QACH,GAAGA,SACH,GAAGA,UACH,GAAGA,SACH,GAAGA,QACH,GAAGA,SACH,qBACA,qBACJ,EACI,GAAIL,EAAWE,EAAKH,EAAaQ,CAAQ,CAAC,EACtC,eAAQ,KAAK,iBAAOA;AAAA;AAAA,EAE9B,KAAK,UAAUC,EAAS,OAAW,CAAC;AAAA,CAAK,EAExB,QAAQ,QAAQ,EAI/B,IAAMC,EAAeP,EAAKH,EAAa,gBAAgB,EAEvD,OAAOK,EACHK,EACA,GAAGX,EAAsB,iBAAmB,sBAAsB,KAAK,UAAUU,EAAS,OAAW,CAAC,EAAE,QACpG,kBACA,qCACJ;AAAA,EACA,MACJ,CACJ,EAKME,EAAsB,IAAM,CAC9B,IAAMD,EAAeP,EAAKH,EAAa,iBAAiB,EAExD,OAAIC,EAAWS,CAAY,GACvB,QAAQ,KAAK,8CAAoC,EAE1C,QAAQ,QAAQ,GAGpBL,EACHK,EACA,GAAG,CAAC,OAAQ,OAAQ,QAAS,QAAS,QAAS,QAAS,YAAa,QAAS,UAAW,UAAW,MAAO,OAAQ,QAAS,WAAW,EAAE,KAAK;AAAA,CAAI;AAAA,EAClJ,MACJ,CACJ,GAGC,SAAY,CACT,GAAI,CAEA,MAAM,QAAQ,IAAI,CAACH,EAAgB,EAAGI,EAAoB,CAAC,CAAC,EAE5D,QAAQ,IAAI,4CAAqC,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASC,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["import { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\nimport { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nimport content from \".\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/prettier-config\", projectPath, \"\\n\");\n\nconst configFile = \".prettierrc\";\n\n/**\n * Writes .prettierrc.${m|c}js if it doesn't exist. Warns if it exists.\n */\nconst writePrettierRc = () => {\n // eslint-disable-next-line no-restricted-syntax\n for (const filename of [\n configFile,\n `${configFile}.js`,\n `${configFile}.cjs`,\n `${configFile}.json`,\n `${configFile}.json5`,\n `${configFile}.yaml`,\n `${configFile}.yml`,\n `${configFile}.toml`,\n \"prettier.config.js\",\n \"prettier.config.cjs\",\n ]) {\n if (existsSync(join(projectPath, filename))) {\n console.warn(`⚠️ ${filename} already exists;\nMake sure that it includes the following for @anolilab/prettier-config to work as it should:\n${JSON.stringify(content, undefined, 4)}\\n`);\n\n return Promise.resolve();\n }\n }\n\n const prettierPath = join(projectPath, \".prettierrc.js\");\n\n return writeFileAsync(\n prettierPath,\n `${packageIsTypeModule ? \"export default\" : \"module.exports =\"} ${JSON.stringify(content, undefined, 2).replace(\n \"rangeEnd: null,\",\n \"rangeEnd: Number.POSITIVE_INFINITY,\",\n )}\\n`,\n \"utf8\",\n );\n};\n\n/**\n * Writes .prettierignore if it doesn't exist. Warns if it exists.\n */\nconst writePrettierIgnore = () => {\n const prettierPath = join(projectPath, \".prettierignore\");\n\n if (existsSync(prettierPath)) {\n console.warn(\"⚠️ .prettierignore already exists\");\n\n return Promise.resolve();\n }\n\n return writeFileAsync(\n prettierPath,\n `${[\"*.md\", \"*.sh\", \"*.yml\", \"*.svg\", \"*.gif\", \"*.log\", \".DS_Store\", \"CNAME\", \"AUTHORS\", \"LICENSE\", \"es/\", \"lib/\", \"dist/\", \"coverage/\"].join(\"\\n\")}\\n`,\n \"utf8\",\n );\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n // eslint-disable-next-line compat/compat\n await Promise.all([writePrettierRc(), writePrettierIgnore()]);\n\n console.log(\"😎 Everything went well, have fun!\");\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1);\n }\n})();\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anolilab/prettier-config",
3
- "version": "4.0.11",
3
+ "version": "4.1.1",
4
4
  "description": "Prettier shareable config for Anolilab.",
5
5
  "keywords": [
6
6
  "css",
@@ -56,12 +56,14 @@
56
56
  "postinstall": "node ./skip.js || node ./dist/postinstall.js"
57
57
  },
58
58
  "dependencies": {
59
- "@anolilab/package-json-utils": "1.5.0"
59
+ "@anolilab/package-json-utils": "1.5.1"
60
60
  },
61
61
  "devDependencies": {
62
- "@anolilab/semantic-release-preset": "4.0.1",
62
+ "@anolilab/semantic-release-preset": "4.0.2",
63
63
  "prettier": "^2.8.8",
64
- "semantic-release": "^21.0.5"
64
+ "semantic-release": "^21.0.5",
65
+ "tsup": "^7.1.0",
66
+ "vitest": "^0.32.2"
65
67
  },
66
68
  "peerDependencies": {
67
69
  "prettier": "2.x"
@@ -1,5 +0,0 @@
1
- var e={printWidth:160,tabWidth:4,useTabs:!1,semi:!0,singleQuote:!1,quoteProps:"as-needed",jsxSingleQuote:!1,trailingComma:"all",bracketSpacing:!0,arrowParens:"always",rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,requirePragma:!1,insertPragma:!1,proseWrap:"preserve",htmlWhitespaceSensitivity:"css",vueIndentScriptAndStyle:!1,endOfLine:"lf",embeddedLanguageFormatting:"auto"},t=e;
2
-
3
- export { t as a };
4
- //# sourceMappingURL=out.js.map
5
- //# sourceMappingURL=chunk-D3AEYP6U.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["config","src_default"],"mappings":"AAEA,IAAMA,EAAkB,CAEpB,WAAY,IAEZ,SAAU,EAEV,QAAS,GAET,KAAM,GAEN,YAAa,GAEb,WAAY,YAEZ,eAAgB,GAEhB,cAAe,MAEf,eAAgB,GAEhB,YAAa,SAEb,WAAY,EACZ,SAAU,OAAO,kBAEjB,cAAe,GAEf,aAAc,GAEd,UAAW,WAEX,0BAA2B,MAE3B,wBAAyB,GAEzB,UAAW,KAEX,2BAA4B,MAChC,EAEOC,EAAQD","sourcesContent":["import type { Options } from \"prettier\";\n\nconst config: Options = {\n // max 160 characters per line\n printWidth: 160,\n // use 4 spaces for indentation\n tabWidth: 4,\n // use spaces instead of indentations\n useTabs: false,\n // semicolon at the end of the line\n semi: true,\n // use single quotes\n singleQuote: false,\n // object's key is quoted only when necessary\n quoteProps: \"as-needed\",\n // use double quotes instead of single quotes in jsx\n jsxSingleQuote: false,\n // all comma at the end\n trailingComma: \"all\",\n // spaces are required at the beginning and end of the braces\n bracketSpacing: true,\n // brackets are required for arrow function parameter, even when there is only one parameter\n arrowParens: \"always\",\n // format the entire contents of the file\n rangeStart: 0,\n rangeEnd: Number.POSITIVE_INFINITY,\n // no need to write the beginning @prettier of the file\n requirePragma: false,\n // No need to automatically insert @prettier at the beginning of the file\n insertPragma: false,\n // use default break criteria\n proseWrap: \"preserve\",\n // decide whether to break the html according to the display style\n htmlWhitespaceSensitivity: \"css\",\n // vue files script and style tags indentation\n vueIndentScriptAndStyle: false,\n // lf for newline\n endOfLine: \"lf\",\n // formats quoted code embedded\n embeddedLanguageFormatting: \"auto\",\n};\n\nexport default config;\n"]}
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- var e={printWidth:160,tabWidth:4,useTabs:!1,semi:!0,singleQuote:!1,quoteProps:"as-needed",jsxSingleQuote:!1,trailingComma:"all",bracketSpacing:!0,arrowParens:"always",rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,requirePragma:!1,insertPragma:!1,proseWrap:"preserve",htmlWhitespaceSensitivity:"css",vueIndentScriptAndStyle:!1,endOfLine:"lf",embeddedLanguageFormatting:"auto"},t=e;
4
-
5
- exports.a = t;
6
- //# sourceMappingURL=out.js.map
7
- //# sourceMappingURL=chunk-LL7RB26L.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["config","src_default"],"mappings":"AAEA,IAAMA,EAAkB,CAEpB,WAAY,IAEZ,SAAU,EAEV,QAAS,GAET,KAAM,GAEN,YAAa,GAEb,WAAY,YAEZ,eAAgB,GAEhB,cAAe,MAEf,eAAgB,GAEhB,YAAa,SAEb,WAAY,EACZ,SAAU,OAAO,kBAEjB,cAAe,GAEf,aAAc,GAEd,UAAW,WAEX,0BAA2B,MAE3B,wBAAyB,GAEzB,UAAW,KAEX,2BAA4B,MAChC,EAEOC,EAAQD","sourcesContent":["import type { Options } from \"prettier\";\n\nconst config: Options = {\n // max 160 characters per line\n printWidth: 160,\n // use 4 spaces for indentation\n tabWidth: 4,\n // use spaces instead of indentations\n useTabs: false,\n // semicolon at the end of the line\n semi: true,\n // use single quotes\n singleQuote: false,\n // object's key is quoted only when necessary\n quoteProps: \"as-needed\",\n // use double quotes instead of single quotes in jsx\n jsxSingleQuote: false,\n // all comma at the end\n trailingComma: \"all\",\n // spaces are required at the beginning and end of the braces\n bracketSpacing: true,\n // brackets are required for arrow function parameter, even when there is only one parameter\n arrowParens: \"always\",\n // format the entire contents of the file\n rangeStart: 0,\n rangeEnd: Number.POSITIVE_INFINITY,\n // no need to write the beginning @prettier of the file\n requirePragma: false,\n // No need to automatically insert @prettier at the beginning of the file\n insertPragma: false,\n // use default break criteria\n proseWrap: \"preserve\",\n // decide whether to break the html according to the display style\n htmlWhitespaceSensitivity: \"css\",\n // vue files script and style tags indentation\n vueIndentScriptAndStyle: false,\n // lf for newline\n endOfLine: \"lf\",\n // formats quoted code embedded\n embeddedLanguageFormatting: \"auto\",\n};\n\nexport default config;\n"]}