@2digits/prettier-config 3.1.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/dist/index.cjs +74 -2
- package/dist/index.d.cts +1 -2
- package/dist/index.d.mts +24 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.mjs +72 -0
- package/package.json +9 -9
- package/dist/index.cjs.map +0 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,74 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const constants = require('@2digits/constants');
|
|
4
|
+
const localPkg = require('local-pkg');
|
|
5
|
+
|
|
6
|
+
const devDependencies = {
|
|
7
|
+
typescript: "catalog:"};
|
|
8
|
+
|
|
9
|
+
const semverRegex = /^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/;
|
|
10
|
+
const localTypescriptVersion = devDependencies.typescript.replace(semverRegex, "");
|
|
11
|
+
function defineConfig(config) {
|
|
12
|
+
return config;
|
|
13
|
+
}
|
|
14
|
+
function getTypescriptVersion() {
|
|
15
|
+
const ts = localPkg.getPackageInfoSync("typescript");
|
|
16
|
+
return ts?.version ?? localTypescriptVersion;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const index = defineConfig({
|
|
20
|
+
printWidth: 120,
|
|
21
|
+
trailingComma: "all",
|
|
22
|
+
bracketSameLine: true,
|
|
23
|
+
singleQuote: true,
|
|
24
|
+
experimentalOperatorPosition: "start",
|
|
25
|
+
importOrder: [
|
|
26
|
+
"<BUILTIN_MODULES>",
|
|
27
|
+
"",
|
|
28
|
+
"^(react/(.*)$)|^(react$)",
|
|
29
|
+
"^(react-native/(.*)$)|^(react-native$)",
|
|
30
|
+
"",
|
|
31
|
+
"^(next/(.*)$)|^(next$)",
|
|
32
|
+
"",
|
|
33
|
+
"^(expo/(.*)$)|^(expo$)|^(expo-(.*)$)|^(@expo/(.*)$)",
|
|
34
|
+
"",
|
|
35
|
+
"<THIRD_PARTY_MODULES>",
|
|
36
|
+
"",
|
|
37
|
+
"^@2digits/",
|
|
38
|
+
"^@mod/",
|
|
39
|
+
"",
|
|
40
|
+
"^@/",
|
|
41
|
+
"^(@[A-Z](.*))",
|
|
42
|
+
"",
|
|
43
|
+
".json$",
|
|
44
|
+
"",
|
|
45
|
+
"^[./]"
|
|
46
|
+
],
|
|
47
|
+
importOrderTypeScriptVersion: getTypescriptVersion(),
|
|
48
|
+
tailwindFunctions: constants.tailwindFunctions,
|
|
49
|
+
language: "sqlite",
|
|
50
|
+
keywordCase: "upper",
|
|
51
|
+
indent: 2,
|
|
52
|
+
allowedBlankLines: 1,
|
|
53
|
+
indentEntries: true,
|
|
54
|
+
plugins: [
|
|
55
|
+
require.resolve("@prettier/plugin-xml"),
|
|
56
|
+
require.resolve("@ianvs/prettier-plugin-sort-imports"),
|
|
57
|
+
require.resolve("prettier-plugin-toml"),
|
|
58
|
+
require.resolve("prettier-plugin-jsdoc"),
|
|
59
|
+
require.resolve("prettier-plugin-sql"),
|
|
60
|
+
require.resolve("prettier-plugin-sh"),
|
|
61
|
+
require.resolve("prettier-plugin-embed"),
|
|
62
|
+
require.resolve("prettier-plugin-tailwindcss")
|
|
63
|
+
],
|
|
64
|
+
overrides: [
|
|
65
|
+
{
|
|
66
|
+
files: ["pnpm-lock.yaml"],
|
|
67
|
+
options: {
|
|
68
|
+
requirePragma: true
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
module.exports = index;
|
package/dist/index.d.cts
CHANGED
|
@@ -9,7 +9,6 @@ declare const _default: {
|
|
|
9
9
|
tailwindFunctions: string[];
|
|
10
10
|
language: "sqlite";
|
|
11
11
|
keywordCase: "upper";
|
|
12
|
-
experimentalWasm: true;
|
|
13
12
|
indent: number;
|
|
14
13
|
allowedBlankLines: number;
|
|
15
14
|
indentEntries: true;
|
|
@@ -22,4 +21,4 @@ declare const _default: {
|
|
|
22
21
|
}[];
|
|
23
22
|
};
|
|
24
23
|
|
|
25
|
-
export
|
|
24
|
+
export = _default;
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
printWidth: number;
|
|
3
|
+
trailingComma: "all";
|
|
4
|
+
bracketSameLine: true;
|
|
5
|
+
singleQuote: true;
|
|
6
|
+
experimentalOperatorPosition: "start";
|
|
7
|
+
importOrder: string[];
|
|
8
|
+
importOrderTypeScriptVersion: string;
|
|
9
|
+
tailwindFunctions: string[];
|
|
10
|
+
language: "sqlite";
|
|
11
|
+
keywordCase: "upper";
|
|
12
|
+
indent: number;
|
|
13
|
+
allowedBlankLines: number;
|
|
14
|
+
indentEntries: true;
|
|
15
|
+
plugins: string[];
|
|
16
|
+
overrides: {
|
|
17
|
+
files: string[];
|
|
18
|
+
options: {
|
|
19
|
+
requirePragma: true;
|
|
20
|
+
};
|
|
21
|
+
}[];
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { _default as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ declare const _default: {
|
|
|
9
9
|
tailwindFunctions: string[];
|
|
10
10
|
language: "sqlite";
|
|
11
11
|
keywordCase: "upper";
|
|
12
|
-
experimentalWasm: true;
|
|
13
12
|
indent: number;
|
|
14
13
|
allowedBlankLines: number;
|
|
15
14
|
indentEntries: true;
|
|
@@ -22,4 +21,4 @@ declare const _default: {
|
|
|
22
21
|
}[];
|
|
23
22
|
};
|
|
24
23
|
|
|
25
|
-
export
|
|
24
|
+
export = _default;
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { tailwindFunctions } from '@2digits/constants';
|
|
2
|
+
import { getPackageInfoSync } from 'local-pkg';
|
|
3
|
+
|
|
4
|
+
const devDependencies = {
|
|
5
|
+
typescript: "catalog:"};
|
|
6
|
+
|
|
7
|
+
const semverRegex = /^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/;
|
|
8
|
+
const localTypescriptVersion = devDependencies.typescript.replace(semverRegex, "");
|
|
9
|
+
function defineConfig(config) {
|
|
10
|
+
return config;
|
|
11
|
+
}
|
|
12
|
+
function getTypescriptVersion() {
|
|
13
|
+
const ts = getPackageInfoSync("typescript");
|
|
14
|
+
return ts?.version ?? localTypescriptVersion;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const index = defineConfig({
|
|
18
|
+
printWidth: 120,
|
|
19
|
+
trailingComma: "all",
|
|
20
|
+
bracketSameLine: true,
|
|
21
|
+
singleQuote: true,
|
|
22
|
+
experimentalOperatorPosition: "start",
|
|
23
|
+
importOrder: [
|
|
24
|
+
"<BUILTIN_MODULES>",
|
|
25
|
+
"",
|
|
26
|
+
"^(react/(.*)$)|^(react$)",
|
|
27
|
+
"^(react-native/(.*)$)|^(react-native$)",
|
|
28
|
+
"",
|
|
29
|
+
"^(next/(.*)$)|^(next$)",
|
|
30
|
+
"",
|
|
31
|
+
"^(expo/(.*)$)|^(expo$)|^(expo-(.*)$)|^(@expo/(.*)$)",
|
|
32
|
+
"",
|
|
33
|
+
"<THIRD_PARTY_MODULES>",
|
|
34
|
+
"",
|
|
35
|
+
"^@2digits/",
|
|
36
|
+
"^@mod/",
|
|
37
|
+
"",
|
|
38
|
+
"^@/",
|
|
39
|
+
"^(@[A-Z](.*))",
|
|
40
|
+
"",
|
|
41
|
+
".json$",
|
|
42
|
+
"",
|
|
43
|
+
"^[./]"
|
|
44
|
+
],
|
|
45
|
+
importOrderTypeScriptVersion: getTypescriptVersion(),
|
|
46
|
+
tailwindFunctions,
|
|
47
|
+
language: "sqlite",
|
|
48
|
+
keywordCase: "upper",
|
|
49
|
+
indent: 2,
|
|
50
|
+
allowedBlankLines: 1,
|
|
51
|
+
indentEntries: true,
|
|
52
|
+
plugins: [
|
|
53
|
+
require.resolve("@prettier/plugin-xml"),
|
|
54
|
+
require.resolve("@ianvs/prettier-plugin-sort-imports"),
|
|
55
|
+
require.resolve("prettier-plugin-toml"),
|
|
56
|
+
require.resolve("prettier-plugin-jsdoc"),
|
|
57
|
+
require.resolve("prettier-plugin-sql"),
|
|
58
|
+
require.resolve("prettier-plugin-sh"),
|
|
59
|
+
require.resolve("prettier-plugin-embed"),
|
|
60
|
+
require.resolve("prettier-plugin-tailwindcss")
|
|
61
|
+
],
|
|
62
|
+
overrides: [
|
|
63
|
+
{
|
|
64
|
+
files: ["pnpm-lock.yaml"],
|
|
65
|
+
options: {
|
|
66
|
+
requirePragma: true
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export { index as default };
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@2digits/prettier-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/2digits-agency/configs.git",
|
|
7
7
|
"directory": "packages/prettier-config"
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
|
-
"main": "./dist/index.
|
|
10
|
+
"main": "./dist/index.mjs",
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
12
|
"files": [
|
|
13
13
|
"dist"
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"./package.json": "./package.json",
|
|
17
17
|
".": {
|
|
18
18
|
"import": {
|
|
19
|
-
"types": "./dist/index.d.
|
|
20
|
-
"default": "./dist/index.
|
|
19
|
+
"types": "./dist/index.d.mts",
|
|
20
|
+
"default": "./dist/index.mjs"
|
|
21
21
|
},
|
|
22
22
|
"require": {
|
|
23
23
|
"types": "./dist/index.d.cts",
|
|
@@ -37,24 +37,24 @@
|
|
|
37
37
|
"local-pkg": "1.1.1",
|
|
38
38
|
"prettier-plugin-embed": "0.5.0",
|
|
39
39
|
"prettier-plugin-jsdoc": "1.3.2",
|
|
40
|
-
"prettier-plugin-sh": "0.
|
|
40
|
+
"prettier-plugin-sh": "0.17.0",
|
|
41
41
|
"prettier-plugin-sql": "0.19.0",
|
|
42
42
|
"prettier-plugin-tailwindcss": "0.6.11",
|
|
43
43
|
"prettier-plugin-toml": "2.0.4",
|
|
44
|
-
"@2digits/constants": "0.
|
|
44
|
+
"@2digits/constants": "1.0.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"prettier": "3.5.3",
|
|
48
|
-
"tsup": "8.4.0",
|
|
49
48
|
"typescript": "5.8.3",
|
|
49
|
+
"unbuild": "3.5.0",
|
|
50
50
|
"@2digits/tsconfig": "0.7.1"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"prettier": ">=3.0.0"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
|
-
"build": "
|
|
57
|
-
"dev": "
|
|
56
|
+
"build": "unbuild",
|
|
57
|
+
"dev": "unbuild --watch",
|
|
58
58
|
"types": "tsc --noEmit"
|
|
59
59
|
}
|
|
60
60
|
}
|
package/dist/index.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../package.json","../src/utils.ts"],"names":["devDependencies","semverRegex","localTypescriptVersion","getTypescriptVersion","getPackageInfoSync","index_default","tailwindFunctions","__require"],"mappings":"uFAAA,IAAA,CAAA,CAAA,CAAA,CAAA,EAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,CAAA,OAAA,KAAA,CAAA,GAAA,CAAA,IAAA,KAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAA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AAA,CACvCA,CAAQ,CAAA,OAAA,CAAQ,qBAAqB,CACrCA,CAAAA,CAAAA,CAAQ,OAAQ,CAAA,oBAAoB,CACpCA,CAAAA,CAAAA,CAAQ,OAAQ,CAAA,uBAAuB,EACvCA,CAAQ,CAAA,OAAA,CAAQ,6BAA6B,CAC/C,CAEA,CAAA,SAAA,CAAW,CACT,CACE,MAAO,CAAC,gBAAgB,CACxB,CAAA,OAAA,CAAS,CACP,aAAA,CAAe,IACjB,CACF,CACF,CACF","file":"index.cjs","sourcesContent":["import { tailwindFunctions } from '@2digits/constants';\n\nimport { defineConfig, getTypescriptVersion } from './utils';\n\nexport default defineConfig({\n printWidth: 120,\n trailingComma: 'all',\n bracketSameLine: true,\n singleQuote: true,\n experimentalOperatorPosition: 'start',\n\n importOrder: [\n '<BUILTIN_MODULES>',\n '',\n '^(react/(.*)$)|^(react$)',\n '^(react-native/(.*)$)|^(react-native$)',\n '',\n '^(next/(.*)$)|^(next$)',\n '',\n '^(expo/(.*)$)|^(expo$)|^(expo-(.*)$)|^(@expo/(.*)$)',\n '',\n '<THIRD_PARTY_MODULES>',\n '',\n '^@2digits/',\n '^@mod/',\n '',\n '^@/',\n '^(@[A-Z](.*))',\n '',\n '.json$',\n '',\n '^[./]',\n ],\n importOrderTypeScriptVersion: getTypescriptVersion(),\n\n tailwindFunctions,\n\n language: 'sqlite',\n keywordCase: 'upper',\n\n experimentalWasm: true,\n indent: 2,\n\n allowedBlankLines: 1,\n indentEntries: true,\n\n plugins: [\n require.resolve('@prettier/plugin-xml'),\n require.resolve('@ianvs/prettier-plugin-sort-imports'),\n require.resolve('prettier-plugin-toml'),\n require.resolve('prettier-plugin-jsdoc'),\n require.resolve('prettier-plugin-sql'),\n require.resolve('prettier-plugin-sh'),\n require.resolve('prettier-plugin-embed'),\n require.resolve('prettier-plugin-tailwindcss'),\n ],\n\n overrides: [\n {\n files: ['pnpm-lock.yaml'],\n options: {\n requirePragma: true,\n },\n },\n ],\n});\n","{\n \"name\": \"@2digits/prettier-config\",\n \"version\": \"3.1.0\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/2digits-agency/configs.git\",\n \"directory\": \"packages/prettier-config\"\n },\n \"type\": \"module\",\n \"main\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"files\": [\n \"dist\"\n ],\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"import\": {\n \"types\": \"./dist/index.d.ts\",\n \"default\": \"./dist/index.js\"\n },\n \"require\": {\n \"types\": \"./dist/index.d.cts\",\n \"default\": \"./dist/index.cjs\"\n }\n }\n },\n \"sideEffects\": false,\n \"scripts\": {\n \"build\": \"tsup\",\n \"dev\": \"tsup --watch\",\n \"types\": \"tsc --noEmit\"\n },\n \"keywords\": [\n \"prettier-config\"\n ],\n \"license\": \"MIT\",\n \"public\": true,\n \"dependencies\": {\n \"@2digits/constants\": \"workspace:*\",\n \"@ianvs/prettier-plugin-sort-imports\": \"catalog:\",\n \"@prettier/plugin-xml\": \"catalog:\",\n \"local-pkg\": \"catalog:\",\n \"prettier-plugin-embed\": \"catalog:\",\n \"prettier-plugin-jsdoc\": \"catalog:\",\n \"prettier-plugin-sh\": \"catalog:\",\n \"prettier-plugin-sql\": \"catalog:\",\n \"prettier-plugin-tailwindcss\": \"catalog:\",\n \"prettier-plugin-toml\": \"catalog:\"\n },\n \"devDependencies\": {\n \"@2digits/tsconfig\": \"workspace:*\",\n \"prettier\": \"catalog:\",\n \"tsup\": \"catalog:\",\n \"typescript\": \"catalog:\"\n },\n \"peerDependencies\": {\n \"prettier\": \">=3.0.0\"\n }\n}\n","import type { PrettierConfig as ImportOrderConfig } from '@ianvs/prettier-plugin-sort-imports';\nimport { getPackageInfoSync } from 'local-pkg';\nimport type { Options } from 'prettier';\nimport type { PluginEmbedOptions } from 'prettier-plugin-embed';\nimport type { ShParserOptions } from 'prettier-plugin-sh';\nimport type { SqlFormatOptions } from 'prettier-plugin-sql';\nimport type { PluginOptions } from 'prettier-plugin-tailwindcss';\nimport type { PrettierTaploOptions } from 'prettier-plugin-toml';\n\nimport { devDependencies } from '../package.json';\n\nconst semverRegex = /^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)$/;\nconst localTypescriptVersion = devDependencies.typescript.replace(semverRegex, '');\n\ntype PrettierConfigWithPlugins = Options\n & ImportOrderConfig\n & PluginOptions\n & SqlFormatOptions\n & PrettierTaploOptions\n & PluginEmbedOptions\n & Partial<ShParserOptions>;\n\n/**\n * Define a Prettier configuration with plugins.\n *\n * @template TConfig The Prettier configuration with plugins.\n * @param config The Prettier configuration with plugins.\n * @returns The Prettier configuration with plugins.\n */\nexport function defineConfig<TConfig extends PrettierConfigWithPlugins>(config: TConfig): TConfig {\n return config;\n}\n\n/**\n * Get the version of the locally installed TypeScript.\n *\n * @returns The local TypeScript version, or the version specified in this [package.json](../package.json) file if\n * TypeScript is not installed locally.\n */\nexport function getTypescriptVersion(): string {\n const ts = getPackageInfoSync('typescript');\n\n return ts?.version ?? localTypescriptVersion;\n}\n"]}
|
package/dist/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import {tailwindFunctions}from'@2digits/constants';import {getPackageInfoSync}from'local-pkg';var e=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(p,o)=>(typeof require<"u"?require:p)[o]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var i={typescript:"catalog:"};var l=/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/,a=i.typescript.replace(l,"");function r(){return getPackageInfoSync("typescript")?.version??a}var O={printWidth:120,trailingComma:"all",bracketSameLine:true,singleQuote:true,experimentalOperatorPosition:"start",importOrder:["<BUILTIN_MODULES>","","^(react/(.*)$)|^(react$)","^(react-native/(.*)$)|^(react-native$)","","^(next/(.*)$)|^(next$)","","^(expo/(.*)$)|^(expo$)|^(expo-(.*)$)|^(@expo/(.*)$)","","<THIRD_PARTY_MODULES>","","^@2digits/","^@mod/","","^@/","^(@[A-Z](.*))","",".json$","","^[./]"],importOrderTypeScriptVersion:r(),tailwindFunctions:tailwindFunctions,language:"sqlite",keywordCase:"upper",experimentalWasm:true,indent:2,allowedBlankLines:1,indentEntries:true,plugins:[e.resolve("@prettier/plugin-xml"),e.resolve("@ianvs/prettier-plugin-sort-imports"),e.resolve("prettier-plugin-toml"),e.resolve("prettier-plugin-jsdoc"),e.resolve("prettier-plugin-sql"),e.resolve("prettier-plugin-sh"),e.resolve("prettier-plugin-embed"),e.resolve("prettier-plugin-tailwindcss")],overrides:[{files:["pnpm-lock.yaml"],options:{requirePragma:true}}]};export{O as default};//# sourceMappingURL=index.js.map
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../package.json","../src/utils.ts"],"names":["devDependencies","semverRegex","localTypescriptVersion","getTypescriptVersion","getPackageInfoSync","index_default","tailwindFunctions","__require"],"mappings":"8FAAA,IAAA,CAAA,CAAA,CAAA,CAAA,EAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,CAAA,OAAA,KAAA,CAAA,GAAA,CAAA,IAAA,KAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAA,CAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,SAAA,CAAA,CAAA,CAAA,GAAA,OAAA,OAAA,CAAA,GAAA,CAAA,OAAA,OAAA,CAAA,KAAA,CAAA,IAAA,CAAA,SAAA,CAAA,CAAA,MAAA,KAAA,CAAA,sBAAA,CAAA,CAAA,CAAA,oBAAA,CAAA,CAAA,CAAA,CCkDE,IAAAA,CAAAA,CAAmB,CAIjB,UAAc,CAAA,UAChB,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AAgB,CACxB,CAAA,OAAA,CAAS,CACP,aAAA,CAAe,IACjB,CACF,CACF,CACF","file":"index.js","sourcesContent":["import { tailwindFunctions } from '@2digits/constants';\n\nimport { defineConfig, getTypescriptVersion } from './utils';\n\nexport default defineConfig({\n printWidth: 120,\n trailingComma: 'all',\n bracketSameLine: true,\n singleQuote: true,\n experimentalOperatorPosition: 'start',\n\n importOrder: [\n '<BUILTIN_MODULES>',\n '',\n '^(react/(.*)$)|^(react$)',\n '^(react-native/(.*)$)|^(react-native$)',\n '',\n '^(next/(.*)$)|^(next$)',\n '',\n '^(expo/(.*)$)|^(expo$)|^(expo-(.*)$)|^(@expo/(.*)$)',\n '',\n '<THIRD_PARTY_MODULES>',\n '',\n '^@2digits/',\n '^@mod/',\n '',\n '^@/',\n '^(@[A-Z](.*))',\n '',\n '.json$',\n '',\n '^[./]',\n ],\n importOrderTypeScriptVersion: getTypescriptVersion(),\n\n tailwindFunctions,\n\n language: 'sqlite',\n keywordCase: 'upper',\n\n experimentalWasm: true,\n indent: 2,\n\n allowedBlankLines: 1,\n indentEntries: true,\n\n plugins: [\n require.resolve('@prettier/plugin-xml'),\n require.resolve('@ianvs/prettier-plugin-sort-imports'),\n require.resolve('prettier-plugin-toml'),\n require.resolve('prettier-plugin-jsdoc'),\n require.resolve('prettier-plugin-sql'),\n require.resolve('prettier-plugin-sh'),\n require.resolve('prettier-plugin-embed'),\n require.resolve('prettier-plugin-tailwindcss'),\n ],\n\n overrides: [\n {\n files: ['pnpm-lock.yaml'],\n options: {\n requirePragma: true,\n },\n },\n ],\n});\n","{\n \"name\": \"@2digits/prettier-config\",\n \"version\": \"3.1.0\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/2digits-agency/configs.git\",\n \"directory\": \"packages/prettier-config\"\n },\n \"type\": \"module\",\n \"main\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"files\": [\n \"dist\"\n ],\n \"exports\": {\n \"./package.json\": \"./package.json\",\n \".\": {\n \"import\": {\n \"types\": \"./dist/index.d.ts\",\n \"default\": \"./dist/index.js\"\n },\n \"require\": {\n \"types\": \"./dist/index.d.cts\",\n \"default\": \"./dist/index.cjs\"\n }\n }\n },\n \"sideEffects\": false,\n \"scripts\": {\n \"build\": \"tsup\",\n \"dev\": \"tsup --watch\",\n \"types\": \"tsc --noEmit\"\n },\n \"keywords\": [\n \"prettier-config\"\n ],\n \"license\": \"MIT\",\n \"public\": true,\n \"dependencies\": {\n \"@2digits/constants\": \"workspace:*\",\n \"@ianvs/prettier-plugin-sort-imports\": \"catalog:\",\n \"@prettier/plugin-xml\": \"catalog:\",\n \"local-pkg\": \"catalog:\",\n \"prettier-plugin-embed\": \"catalog:\",\n \"prettier-plugin-jsdoc\": \"catalog:\",\n \"prettier-plugin-sh\": \"catalog:\",\n \"prettier-plugin-sql\": \"catalog:\",\n \"prettier-plugin-tailwindcss\": \"catalog:\",\n \"prettier-plugin-toml\": \"catalog:\"\n },\n \"devDependencies\": {\n \"@2digits/tsconfig\": \"workspace:*\",\n \"prettier\": \"catalog:\",\n \"tsup\": \"catalog:\",\n \"typescript\": \"catalog:\"\n },\n \"peerDependencies\": {\n \"prettier\": \">=3.0.0\"\n }\n}\n","import type { PrettierConfig as ImportOrderConfig } from '@ianvs/prettier-plugin-sort-imports';\nimport { getPackageInfoSync } from 'local-pkg';\nimport type { Options } from 'prettier';\nimport type { PluginEmbedOptions } from 'prettier-plugin-embed';\nimport type { ShParserOptions } from 'prettier-plugin-sh';\nimport type { SqlFormatOptions } from 'prettier-plugin-sql';\nimport type { PluginOptions } from 'prettier-plugin-tailwindcss';\nimport type { PrettierTaploOptions } from 'prettier-plugin-toml';\n\nimport { devDependencies } from '../package.json';\n\nconst semverRegex = /^(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*)$/;\nconst localTypescriptVersion = devDependencies.typescript.replace(semverRegex, '');\n\ntype PrettierConfigWithPlugins = Options\n & ImportOrderConfig\n & PluginOptions\n & SqlFormatOptions\n & PrettierTaploOptions\n & PluginEmbedOptions\n & Partial<ShParserOptions>;\n\n/**\n * Define a Prettier configuration with plugins.\n *\n * @template TConfig The Prettier configuration with plugins.\n * @param config The Prettier configuration with plugins.\n * @returns The Prettier configuration with plugins.\n */\nexport function defineConfig<TConfig extends PrettierConfigWithPlugins>(config: TConfig): TConfig {\n return config;\n}\n\n/**\n * Get the version of the locally installed TypeScript.\n *\n * @returns The local TypeScript version, or the version specified in this [package.json](../package.json) file if\n * TypeScript is not installed locally.\n */\nexport function getTypescriptVersion(): string {\n const ts = getPackageInfoSync('typescript');\n\n return ts?.version ?? localTypescriptVersion;\n}\n"]}
|