@forsakringskassan/prettier-config 3.1.7 → 3.2.3
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
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
default: () => index_default
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
|
26
|
+
|
|
27
|
+
// src/resolve-module-path.cjs.ts
|
|
28
|
+
function resolveModulePath(id) {
|
|
29
|
+
return require.resolve(id);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// src/index.ts
|
|
33
|
+
var config = {
|
|
34
|
+
plugins: [resolveModulePath("prettier-plugin-packagejson")],
|
|
35
|
+
singleQuote: false,
|
|
36
|
+
arrowParens: "always",
|
|
37
|
+
tabWidth: 4,
|
|
38
|
+
printWidth: 80,
|
|
39
|
+
trailingComma: "all",
|
|
40
|
+
overrides: [
|
|
41
|
+
{
|
|
42
|
+
files: "package.json",
|
|
43
|
+
options: {
|
|
44
|
+
tabWidth: 2
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
files: ["*.vue", "*.html"],
|
|
49
|
+
options: {
|
|
50
|
+
printWidth: 120
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
files: ["*.scss"],
|
|
55
|
+
options: {
|
|
56
|
+
/* use a high value to not break add line-breaks when using
|
|
57
|
+
* variables shorthands, e.g.
|
|
58
|
+
* "padding: var(--a) var(--b) var(--c) var(--d)" */
|
|
59
|
+
printWidth: 160
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
/* adjust width for examples so they fit in the documentation "view
|
|
64
|
+
* source" container */
|
|
65
|
+
files: "**/examples/*.vue",
|
|
66
|
+
options: {
|
|
67
|
+
printWidth: 100
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
};
|
|
72
|
+
var index_default = config;
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
// src/resolve-module-path.esm.ts
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
function resolveModulePath(id) {
|
|
4
|
+
return fileURLToPath(import.meta.resolve(id));
|
|
5
|
+
}
|
|
6
|
+
|
|
1
7
|
// src/index.ts
|
|
2
|
-
import { fileURLToPath } from "url";
|
|
3
8
|
var config = {
|
|
4
|
-
plugins: [
|
|
5
|
-
fileURLToPath(import.meta.resolve("prettier-plugin-packagejson"))
|
|
6
|
-
],
|
|
9
|
+
plugins: [resolveModulePath("prettier-plugin-packagejson")],
|
|
7
10
|
singleQuote: false,
|
|
8
11
|
arrowParens: "always",
|
|
9
12
|
tabWidth: 4,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveModulePath(id: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { resolveModulePath } from "./resolve-module-path.esm";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveModulePath(id: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forsakringskassan/prettier-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.3",
|
|
4
4
|
"description": "FK Prettier Config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"prettier"
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"exports": {
|
|
18
18
|
".": {
|
|
19
19
|
"types": "./dist/index.d.ts",
|
|
20
|
-
"
|
|
20
|
+
"require": "./dist/index.cjs",
|
|
21
|
+
"default": "./dist/index.mjs"
|
|
21
22
|
}
|
|
22
23
|
},
|
|
23
24
|
"bin": {
|
|
@@ -28,8 +29,8 @@
|
|
|
28
29
|
"prettier.cjs"
|
|
29
30
|
],
|
|
30
31
|
"scripts": {
|
|
31
|
-
"prebuild": "tsc",
|
|
32
32
|
"build": "node build.mjs",
|
|
33
|
+
"postbuild": "tsc",
|
|
33
34
|
"prepack": "release-prepack --bundle --retain-scripts",
|
|
34
35
|
"postpack": "release-postpack",
|
|
35
36
|
"prepublishOnly": "release-prepublish --bundle --retain-scripts",
|
|
@@ -39,5 +40,5 @@
|
|
|
39
40
|
"node": ">= 20.6.0",
|
|
40
41
|
"npm": ">= 9"
|
|
41
42
|
},
|
|
42
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "0b1e31b85cadc36befd63a6c9d20be22dc1a0734"
|
|
43
44
|
}
|
package/prettier.cjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const path = require("path");
|
|
4
3
|
const { spawn } = require("child_process");
|
|
4
|
+
const path = require("path");
|
|
5
5
|
|
|
6
6
|
const pkgPath = path.dirname(require.resolve("prettier/package.json"));
|
|
7
7
|
const binary = path.join(pkgPath, "bin/prettier.cjs");
|
|
8
8
|
|
|
9
|
+
/* eslint-disable-next-line sonarjs/no-os-command-from-path -- want to execute node from PATH */
|
|
9
10
|
spawn("node", [binary, ...process.argv.slice(2)], {
|
|
10
11
|
stdio: "inherit",
|
|
11
12
|
}).on("exit", (code) => {
|