@hiddenability/opinionated-defaults 0.0.12 → 0.0.13
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/prettier/index.d.ts
CHANGED
package/dist/prettier/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import lodash from "lodash";
|
|
2
1
|
export { default as prettierConfigBase } from "./base.mjs";
|
|
3
2
|
export { default as prettierConfigAstro } from "./astro.mjs";
|
|
4
3
|
export { default as prettierConfigTailwind } from "./tailwind.mjs";
|
|
5
|
-
export
|
|
4
|
+
export { merge } from "./merge.mjs";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import lodash from "lodash";
|
|
2
|
+
const { isArray, mergeWith, union } = lodash;
|
|
3
|
+
const arrayMerge = (arr1, arr2) => {
|
|
4
|
+
if (!isArray(arr1) || !isArray(arr2)) return;
|
|
5
|
+
const retArr = union(arr1, arr2);
|
|
6
|
+
if (retArr.includes("prettier-plugin-tailwindcss")) {
|
|
7
|
+
retArr.push(
|
|
8
|
+
retArr.splice(retArr.indexOf("prettier-plugin-tailwindcss"), 1)[0]
|
|
9
|
+
);
|
|
10
|
+
}
|
|
11
|
+
return retArr;
|
|
12
|
+
};
|
|
13
|
+
export const merge = (source, ...sources) => mergeWith({}, source, ...sources, arrayMerge);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hiddenability/opinionated-defaults",
|
|
3
3
|
"description": "Opinionated default configurations for dev tools.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.13",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
},
|
|
10
10
|
"type": "module",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "unbuild",
|
|
13
|
-
"prepack": "bun run lint && unbuild",
|
|
14
|
-
"lint": "eslint . --fix"
|
|
12
|
+
"build": "bun run test run && bun run lint && unbuild",
|
|
13
|
+
"prepack": "bun run test run && bun run lint && unbuild",
|
|
14
|
+
"lint": "eslint . --fix",
|
|
15
|
+
"test": "vitest"
|
|
15
16
|
},
|
|
16
17
|
"exports": {
|
|
17
18
|
"./eslint": {
|
|
@@ -52,9 +53,10 @@
|
|
|
52
53
|
"typescript-eslint": "^8.34.0"
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
|
-
"@hiddenability/opinionated-defaults": "^0.0.
|
|
56
|
+
"@hiddenability/opinionated-defaults": "^0.0.12",
|
|
56
57
|
"jiti": "^2.4.2",
|
|
57
58
|
"typescript": "^5.8.3",
|
|
58
|
-
"unbuild": "^3.5.0"
|
|
59
|
+
"unbuild": "^3.5.0",
|
|
60
|
+
"vitest": "^3.2.4"
|
|
59
61
|
}
|
|
60
62
|
}
|