@forsakringskassan/prettier-config-svelte 3.0.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/LICENSE.md +24 -0
- package/dist/index.js +59 -0
- package/package.json +39 -0
- package/prettier.cjs +13 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2024 Försäkringskassan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person
|
|
6
|
+
obtaining a copy of this software and associated documentation
|
|
7
|
+
files (the “Software”), to deal in the Software without
|
|
8
|
+
restriction, including without limitation the rights to use,
|
|
9
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the
|
|
11
|
+
Software is furnished to do so, subject to the following
|
|
12
|
+
conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be
|
|
15
|
+
included in all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
|
|
18
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
19
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
20
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
21
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
22
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
23
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
24
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
3
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
// ../prettier-config/index.js
|
|
7
|
+
var require_prettier_config = __commonJS({
|
|
8
|
+
"../prettier-config/index.js"(exports2, module2) {
|
|
9
|
+
module2.exports = {
|
|
10
|
+
singleQuote: false,
|
|
11
|
+
arrowParens: "always",
|
|
12
|
+
tabWidth: 4,
|
|
13
|
+
printWidth: 80,
|
|
14
|
+
trailingComma: "all",
|
|
15
|
+
overrides: [
|
|
16
|
+
{
|
|
17
|
+
files: "package.json",
|
|
18
|
+
options: {
|
|
19
|
+
tabWidth: 2
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
files: ["*.vue", "*.html"],
|
|
24
|
+
options: {
|
|
25
|
+
printWidth: 120
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
files: ["*.scss"],
|
|
30
|
+
options: {
|
|
31
|
+
/* use a high value to not break add line-breaks when using
|
|
32
|
+
* variables shorthands, e.g.
|
|
33
|
+
* "padding: var(--a) var(--b) var(--c) var(--d)" */
|
|
34
|
+
printWidth: 160
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
/* adjust width for examples so they fit in the documentation "view
|
|
39
|
+
* source" container */
|
|
40
|
+
files: "**/examples/*.vue",
|
|
41
|
+
options: {
|
|
42
|
+
printWidth: 100
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// index.js
|
|
51
|
+
var mainConfig = require_prettier_config();
|
|
52
|
+
module.exports = {
|
|
53
|
+
...mainConfig,
|
|
54
|
+
plugins: ["prettier-plugin-svelte"],
|
|
55
|
+
overrides: [
|
|
56
|
+
...mainConfig.overrides,
|
|
57
|
+
{ files: "*.svelte", options: { parser: "svelte" } }
|
|
58
|
+
]
|
|
59
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@forsakringskassan/prettier-config-svelte",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "FK Prettier Svelte Config",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"prettier"
|
|
7
|
+
],
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "node generate.mjs"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/Forsakringskassan/prettier-config",
|
|
12
|
+
"bugs": "https://github.com/Forsakringskassan/prettier-config/issues",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/Forsakringskassan/prettier-config.git"
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"author": "Försäkringskassan",
|
|
19
|
+
"main": "dist/index.js",
|
|
20
|
+
"bin": {
|
|
21
|
+
"prettier": "prettier.cjs"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist/index.js",
|
|
25
|
+
"prettier.cjs"
|
|
26
|
+
],
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"prettier": "3.4.2",
|
|
29
|
+
"prettier-plugin-svelte": "^3.3.2"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">= 20",
|
|
33
|
+
"npm": ">= 9"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"esbuild": "^0.24.2"
|
|
37
|
+
},
|
|
38
|
+
"gitHead": "0a0d8033b40bb16deee4442b839c1244c1543bf8"
|
|
39
|
+
}
|
package/prettier.cjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const { spawn } = require("child_process");
|
|
5
|
+
|
|
6
|
+
const pkgPath = path.dirname(require.resolve("prettier/package.json"));
|
|
7
|
+
const binary = path.join(pkgPath, "bin/prettier.cjs");
|
|
8
|
+
|
|
9
|
+
spawn("node", [binary, ...process.argv.slice(2)], {
|
|
10
|
+
stdio: "inherit",
|
|
11
|
+
}).on("exit", (code) => {
|
|
12
|
+
process.exit(code);
|
|
13
|
+
});
|