@2digits/prettier-config 3.3.2 → 3.4.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/dist/index.cjs +1 -71
- package/dist/index.d.cts +23 -22
- package/dist/index.d.mts +23 -22
- package/dist/index.mjs +1 -78
- package/package.json +13 -18
- package/dist/index.d.ts +0 -24
package/dist/index.cjs
CHANGED
|
@@ -1,71 +1 @@
|
|
|
1
|
-
|
|
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 getTypescriptVersion() {
|
|
12
|
-
const ts = localPkg.getPackageInfoSync("typescript");
|
|
13
|
-
return ts?.version ?? localTypescriptVersion;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const index = {
|
|
17
|
-
printWidth: 120,
|
|
18
|
-
trailingComma: "all",
|
|
19
|
-
bracketSameLine: true,
|
|
20
|
-
singleQuote: true,
|
|
21
|
-
experimentalOperatorPosition: "start",
|
|
22
|
-
importOrder: [
|
|
23
|
-
"<BUILTIN_MODULES>",
|
|
24
|
-
"",
|
|
25
|
-
"^(react/(.*)$)|^(react$)",
|
|
26
|
-
"^(react-native/(.*)$)|^(react-native$)",
|
|
27
|
-
"",
|
|
28
|
-
"^(next/(.*)$)|^(next$)",
|
|
29
|
-
"",
|
|
30
|
-
"^(expo/(.*)$)|^(expo$)|^(expo-(.*)$)|^(@expo/(.*)$)",
|
|
31
|
-
"",
|
|
32
|
-
"<THIRD_PARTY_MODULES>",
|
|
33
|
-
"",
|
|
34
|
-
"^@2digits/",
|
|
35
|
-
"^@mod/",
|
|
36
|
-
"",
|
|
37
|
-
"^@/",
|
|
38
|
-
"^(@[A-Z](.*))",
|
|
39
|
-
"",
|
|
40
|
-
".json$",
|
|
41
|
-
"",
|
|
42
|
-
"^[./]"
|
|
43
|
-
],
|
|
44
|
-
importOrderTypeScriptVersion: getTypescriptVersion(),
|
|
45
|
-
tailwindFunctions: constants.tailwindFunctions,
|
|
46
|
-
language: "sqlite",
|
|
47
|
-
keywordCase: "upper",
|
|
48
|
-
indent: 2,
|
|
49
|
-
allowedBlankLines: 1,
|
|
50
|
-
indentEntries: true,
|
|
51
|
-
plugins: [
|
|
52
|
-
require.resolve("@prettier/plugin-xml"),
|
|
53
|
-
require.resolve("@ianvs/prettier-plugin-sort-imports"),
|
|
54
|
-
require.resolve("prettier-plugin-toml"),
|
|
55
|
-
require.resolve("prettier-plugin-jsdoc"),
|
|
56
|
-
require.resolve("prettier-plugin-sql"),
|
|
57
|
-
require.resolve("prettier-plugin-sh"),
|
|
58
|
-
require.resolve("prettier-plugin-embed"),
|
|
59
|
-
require.resolve("prettier-plugin-tailwindcss")
|
|
60
|
-
],
|
|
61
|
-
overrides: [
|
|
62
|
-
{
|
|
63
|
-
files: ["pnpm-lock.yaml"],
|
|
64
|
-
options: {
|
|
65
|
-
requirePragma: true
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
]
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
module.exports = index;
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));const c=s(require(`@2digits/constants`)),l=s(require(`local-pkg`));var u={"@2digits/tsconfig":`workspace:*`,prettier:`catalog:`,tsdown:`catalog:`,typescript:`catalog:`};const d=/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/,f=u.typescript.replace(d,``);function p(){let e=(0,l.getPackageInfoSync)(`typescript`);return e?.version??f}var m={printWidth:120,trailingComma:`all`,bracketSameLine:!0,singleQuote:!0,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:p(),tailwindFunctions:c.tailwindFunctions,language:`sqlite`,keywordCase:`upper`,indent:2,allowedBlankLines:1,indentEntries:!0,plugins:[require.resolve(`@prettier/plugin-xml`),require.resolve(`@ianvs/prettier-plugin-sort-imports`),require.resolve(`prettier-plugin-toml`),require.resolve(`prettier-plugin-jsdoc`),require.resolve(`prettier-plugin-sql`),require.resolve(`prettier-plugin-sh`),require.resolve(`prettier-plugin-embed`),require.resolve(`prettier-plugin-tailwindcss`)],overrides:[{files:[`pnpm-lock.yaml`],options:{requirePragma:!0}}]};module.exports=m;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
1
2
|
declare const _default: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
readonly printWidth: 120;
|
|
4
|
+
readonly trailingComma: "all";
|
|
5
|
+
readonly bracketSameLine: true;
|
|
6
|
+
readonly singleQuote: true;
|
|
7
|
+
readonly experimentalOperatorPosition: "start";
|
|
8
|
+
readonly importOrder: ["<BUILTIN_MODULES>", "", "^(react/(.*)$)|^(react$)", "^(react-native/(.*)$)|^(react-native$)", "", "^(next/(.*)$)|^(next$)", "", "^(expo/(.*)$)|^(expo$)|^(expo-(.*)$)|^(@expo/(.*)$)", "", "<THIRD_PARTY_MODULES>", "", "^@2digits/", "^@mod/", "", "^@/", "^(@[A-Z](.*))", "", ".json$", "", "^[./]"];
|
|
9
|
+
readonly importOrderTypeScriptVersion: string;
|
|
10
|
+
readonly tailwindFunctions: string[];
|
|
11
|
+
readonly language: "sqlite";
|
|
12
|
+
readonly keywordCase: "upper";
|
|
13
|
+
readonly indent: 2;
|
|
14
|
+
readonly allowedBlankLines: 1;
|
|
15
|
+
readonly indentEntries: true;
|
|
16
|
+
readonly plugins: [string, string, string, string, string, string, string, string];
|
|
17
|
+
readonly overrides: [{
|
|
18
|
+
readonly files: ["pnpm-lock.yaml"];
|
|
19
|
+
readonly options: {
|
|
20
|
+
readonly requirePragma: true;
|
|
21
|
+
};
|
|
22
|
+
}];
|
|
22
23
|
};
|
|
23
|
-
|
|
24
|
-
export
|
|
24
|
+
//#endregion
|
|
25
|
+
export { _default as default };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
1
2
|
declare const _default: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
readonly printWidth: 120;
|
|
4
|
+
readonly trailingComma: "all";
|
|
5
|
+
readonly bracketSameLine: true;
|
|
6
|
+
readonly singleQuote: true;
|
|
7
|
+
readonly experimentalOperatorPosition: "start";
|
|
8
|
+
readonly importOrder: ["<BUILTIN_MODULES>", "", "^(react/(.*)$)|^(react$)", "^(react-native/(.*)$)|^(react-native$)", "", "^(next/(.*)$)|^(next$)", "", "^(expo/(.*)$)|^(expo$)|^(expo-(.*)$)|^(@expo/(.*)$)", "", "<THIRD_PARTY_MODULES>", "", "^@2digits/", "^@mod/", "", "^@/", "^(@[A-Z](.*))", "", ".json$", "", "^[./]"];
|
|
9
|
+
readonly importOrderTypeScriptVersion: string;
|
|
10
|
+
readonly tailwindFunctions: string[];
|
|
11
|
+
readonly language: "sqlite";
|
|
12
|
+
readonly keywordCase: "upper";
|
|
13
|
+
readonly indent: 2;
|
|
14
|
+
readonly allowedBlankLines: 1;
|
|
15
|
+
readonly indentEntries: true;
|
|
16
|
+
readonly plugins: [string, string, string, string, string, string, string, string];
|
|
17
|
+
readonly overrides: [{
|
|
18
|
+
readonly files: ["pnpm-lock.yaml"];
|
|
19
|
+
readonly options: {
|
|
20
|
+
readonly requirePragma: true;
|
|
21
|
+
};
|
|
22
|
+
}];
|
|
22
23
|
};
|
|
23
|
-
|
|
24
|
-
export { _default as default };
|
|
24
|
+
//#endregion
|
|
25
|
+
export { _default as default };
|
package/dist/index.mjs
CHANGED
|
@@ -1,78 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getPackageInfoSync } from 'local-pkg';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// -- Unbuild CommonJS Shims --
|
|
7
|
-
import __cjs_url__ from 'url';
|
|
8
|
-
import __cjs_path__ from 'path';
|
|
9
|
-
import __cjs_mod__ from 'module';
|
|
10
|
-
const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
11
|
-
const __dirname = __cjs_path__.dirname(__filename);
|
|
12
|
-
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
13
|
-
const devDependencies = {
|
|
14
|
-
typescript: "catalog:"};
|
|
15
|
-
|
|
16
|
-
const semverRegex = /^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/;
|
|
17
|
-
const localTypescriptVersion = devDependencies.typescript.replace(semverRegex, "");
|
|
18
|
-
function getTypescriptVersion() {
|
|
19
|
-
const ts = getPackageInfoSync("typescript");
|
|
20
|
-
return ts?.version ?? localTypescriptVersion;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const index = {
|
|
24
|
-
printWidth: 120,
|
|
25
|
-
trailingComma: "all",
|
|
26
|
-
bracketSameLine: true,
|
|
27
|
-
singleQuote: true,
|
|
28
|
-
experimentalOperatorPosition: "start",
|
|
29
|
-
importOrder: [
|
|
30
|
-
"<BUILTIN_MODULES>",
|
|
31
|
-
"",
|
|
32
|
-
"^(react/(.*)$)|^(react$)",
|
|
33
|
-
"^(react-native/(.*)$)|^(react-native$)",
|
|
34
|
-
"",
|
|
35
|
-
"^(next/(.*)$)|^(next$)",
|
|
36
|
-
"",
|
|
37
|
-
"^(expo/(.*)$)|^(expo$)|^(expo-(.*)$)|^(@expo/(.*)$)",
|
|
38
|
-
"",
|
|
39
|
-
"<THIRD_PARTY_MODULES>",
|
|
40
|
-
"",
|
|
41
|
-
"^@2digits/",
|
|
42
|
-
"^@mod/",
|
|
43
|
-
"",
|
|
44
|
-
"^@/",
|
|
45
|
-
"^(@[A-Z](.*))",
|
|
46
|
-
"",
|
|
47
|
-
".json$",
|
|
48
|
-
"",
|
|
49
|
-
"^[./]"
|
|
50
|
-
],
|
|
51
|
-
importOrderTypeScriptVersion: getTypescriptVersion(),
|
|
52
|
-
tailwindFunctions,
|
|
53
|
-
language: "sqlite",
|
|
54
|
-
keywordCase: "upper",
|
|
55
|
-
indent: 2,
|
|
56
|
-
allowedBlankLines: 1,
|
|
57
|
-
indentEntries: true,
|
|
58
|
-
plugins: [
|
|
59
|
-
require.resolve("@prettier/plugin-xml"),
|
|
60
|
-
require.resolve("@ianvs/prettier-plugin-sort-imports"),
|
|
61
|
-
require.resolve("prettier-plugin-toml"),
|
|
62
|
-
require.resolve("prettier-plugin-jsdoc"),
|
|
63
|
-
require.resolve("prettier-plugin-sql"),
|
|
64
|
-
require.resolve("prettier-plugin-sh"),
|
|
65
|
-
require.resolve("prettier-plugin-embed"),
|
|
66
|
-
require.resolve("prettier-plugin-tailwindcss")
|
|
67
|
-
],
|
|
68
|
-
overrides: [
|
|
69
|
-
{
|
|
70
|
-
files: ["pnpm-lock.yaml"],
|
|
71
|
-
options: {
|
|
72
|
-
requirePragma: true
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
]
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
export { index as default };
|
|
1
|
+
import{createRequire as e}from"node:module";import{tailwindFunctions as t}from"@2digits/constants";import{getPackageInfoSync as n}from"local-pkg";var r=e(import.meta.url),i={"@2digits/tsconfig":`workspace:*`,prettier:`catalog:`,tsdown:`catalog:`,typescript:`catalog:`};const a=/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)$/,o=i.typescript.replace(a,``);function s(){let e=n(`typescript`);return e?.version??o}var c={printWidth:120,trailingComma:`all`,bracketSameLine:!0,singleQuote:!0,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:s(),tailwindFunctions:t,language:`sqlite`,keywordCase:`upper`,indent:2,allowedBlankLines:1,indentEntries:!0,plugins:[r.resolve(`@prettier/plugin-xml`),r.resolve(`@ianvs/prettier-plugin-sort-imports`),r.resolve(`prettier-plugin-toml`),r.resolve(`prettier-plugin-jsdoc`),r.resolve(`prettier-plugin-sql`),r.resolve(`prettier-plugin-sh`),r.resolve(`prettier-plugin-embed`),r.resolve(`prettier-plugin-tailwindcss`)],overrides:[{files:[`pnpm-lock.yaml`],options:{requirePragma:!0}}]};export{c as default};
|
package/package.json
CHANGED
|
@@ -1,29 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@2digits/prettier-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.1",
|
|
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.
|
|
11
|
-
"
|
|
10
|
+
"main": "./dist/index.cjs",
|
|
11
|
+
"module": "./dist/index.mjs",
|
|
12
|
+
"types": "./dist/index.d.cts",
|
|
12
13
|
"files": [
|
|
13
14
|
"dist"
|
|
14
15
|
],
|
|
15
16
|
"exports": {
|
|
16
|
-
"./package.json": "./package.json",
|
|
17
17
|
".": {
|
|
18
|
-
"import":
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"require": {
|
|
23
|
-
"types": "./dist/index.d.cts",
|
|
24
|
-
"default": "./dist/index.cjs"
|
|
25
|
-
}
|
|
26
|
-
}
|
|
18
|
+
"import": "./dist/index.mjs",
|
|
19
|
+
"require": "./dist/index.cjs"
|
|
20
|
+
},
|
|
21
|
+
"./package.json": "./package.json"
|
|
27
22
|
},
|
|
28
23
|
"sideEffects": false,
|
|
29
24
|
"keywords": [
|
|
@@ -39,22 +34,22 @@
|
|
|
39
34
|
"prettier-plugin-jsdoc": "1.3.2",
|
|
40
35
|
"prettier-plugin-sh": "0.17.4",
|
|
41
36
|
"prettier-plugin-sql": "0.19.0",
|
|
42
|
-
"prettier-plugin-tailwindcss": "0.6.
|
|
37
|
+
"prettier-plugin-tailwindcss": "0.6.12",
|
|
43
38
|
"prettier-plugin-toml": "2.0.4",
|
|
44
|
-
"@2digits/constants": "1.
|
|
39
|
+
"@2digits/constants": "1.1.1"
|
|
45
40
|
},
|
|
46
41
|
"devDependencies": {
|
|
47
42
|
"prettier": "3.5.3",
|
|
43
|
+
"tsdown": "0.12.7",
|
|
48
44
|
"typescript": "5.8.3",
|
|
49
|
-
"unbuild": "3.5.0",
|
|
50
45
|
"@2digits/tsconfig": "0.7.1"
|
|
51
46
|
},
|
|
52
47
|
"peerDependencies": {
|
|
53
48
|
"prettier": ">=3.0.0"
|
|
54
49
|
},
|
|
55
50
|
"scripts": {
|
|
56
|
-
"build": "
|
|
57
|
-
"dev": "
|
|
51
|
+
"build": "tsdown --minify",
|
|
52
|
+
"dev": "tsdown --watch",
|
|
58
53
|
"types": "tsc --noEmit"
|
|
59
54
|
}
|
|
60
55
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
readonly printWidth: 120;
|
|
3
|
-
readonly trailingComma: "all";
|
|
4
|
-
readonly bracketSameLine: true;
|
|
5
|
-
readonly singleQuote: true;
|
|
6
|
-
readonly experimentalOperatorPosition: "start";
|
|
7
|
-
readonly importOrder: ["<BUILTIN_MODULES>", "", "^(react/(.*)$)|^(react$)", "^(react-native/(.*)$)|^(react-native$)", "", "^(next/(.*)$)|^(next$)", "", "^(expo/(.*)$)|^(expo$)|^(expo-(.*)$)|^(@expo/(.*)$)", "", "<THIRD_PARTY_MODULES>", "", "^@2digits/", "^@mod/", "", "^@/", "^(@[A-Z](.*))", "", ".json$", "", "^[./]"];
|
|
8
|
-
readonly importOrderTypeScriptVersion: string;
|
|
9
|
-
readonly tailwindFunctions: string[];
|
|
10
|
-
readonly language: "sqlite";
|
|
11
|
-
readonly keywordCase: "upper";
|
|
12
|
-
readonly indent: 2;
|
|
13
|
-
readonly allowedBlankLines: 1;
|
|
14
|
-
readonly indentEntries: true;
|
|
15
|
-
readonly plugins: [string, string, string, string, string, string, string, string];
|
|
16
|
-
readonly overrides: [{
|
|
17
|
-
readonly files: ["pnpm-lock.yaml"];
|
|
18
|
-
readonly options: {
|
|
19
|
-
readonly requirePragma: true;
|
|
20
|
-
};
|
|
21
|
-
}];
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export = _default;
|