@shahrad/prettier-config 1.2.1 → 2.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/dist/index.cjs +17 -7
- package/dist/index.d.cts +34 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.js +7 -7
- package/package.json +23 -23
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,14 +17,25 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
|
-
// index.ts
|
|
30
|
+
// src/index.ts
|
|
21
31
|
var index_exports = {};
|
|
22
32
|
__export(index_exports, {
|
|
23
33
|
default: () => index_default
|
|
24
34
|
});
|
|
25
35
|
module.exports = __toCommonJS(index_exports);
|
|
36
|
+
var SortImportPlugin = __toESM(require("@trivago/prettier-plugin-sort-imports"), 1);
|
|
37
|
+
var PackageJsonPlugin = __toESM(require("prettier-plugin-packagejson"), 1);
|
|
38
|
+
var ShellPlugin = __toESM(require("prettier-plugin-sh"), 1);
|
|
26
39
|
var DEFAULT_CONFIG = {
|
|
27
40
|
useTabs: false,
|
|
28
41
|
semi: true,
|
|
@@ -48,11 +61,8 @@ var DEFAULT_CONFIG = {
|
|
|
48
61
|
}
|
|
49
62
|
],
|
|
50
63
|
importOrder: ["node:*", "<THIRD_PARTY_MODULES>", "", "^@/(.*)$", "^@/tests/(.*)$", "", "^[./]"],
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"prettier-plugin-packagejson",
|
|
55
|
-
"prettier-plugin-sh"
|
|
56
|
-
]
|
|
64
|
+
importOrderSeparation: true,
|
|
65
|
+
importOrderSortSpecifiers: true,
|
|
66
|
+
plugins: [SortImportPlugin, PackageJsonPlugin, ShellPlugin]
|
|
57
67
|
};
|
|
58
68
|
var index_default = DEFAULT_CONFIG;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as SortImportPlugin from '@trivago/prettier-plugin-sort-imports';
|
|
2
|
+
|
|
3
|
+
declare const DEFAULT_CONFIG: {
|
|
4
|
+
useTabs: false;
|
|
5
|
+
semi: true;
|
|
6
|
+
singleQuote: true;
|
|
7
|
+
jsxSingleQuote: true;
|
|
8
|
+
trailingComma: "es5";
|
|
9
|
+
endOfLine: "lf";
|
|
10
|
+
printWidth: number;
|
|
11
|
+
overrides: ({
|
|
12
|
+
files: string;
|
|
13
|
+
options: {
|
|
14
|
+
tabWidth: number;
|
|
15
|
+
useTabs: false;
|
|
16
|
+
printWidth: number;
|
|
17
|
+
spaceRedirects?: undefined;
|
|
18
|
+
};
|
|
19
|
+
} | {
|
|
20
|
+
files: string[];
|
|
21
|
+
options: {
|
|
22
|
+
spaceRedirects: boolean;
|
|
23
|
+
tabWidth?: undefined;
|
|
24
|
+
useTabs?: undefined;
|
|
25
|
+
printWidth?: undefined;
|
|
26
|
+
};
|
|
27
|
+
})[];
|
|
28
|
+
importOrder: string[];
|
|
29
|
+
importOrderSeparation: boolean;
|
|
30
|
+
importOrderSortSpecifiers: boolean;
|
|
31
|
+
plugins: (typeof SortImportPlugin)[];
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { DEFAULT_CONFIG as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as SortImportPlugin from '@trivago/prettier-plugin-sort-imports';
|
|
2
|
+
|
|
1
3
|
declare const DEFAULT_CONFIG: {
|
|
2
4
|
useTabs: false;
|
|
3
5
|
semi: true;
|
|
@@ -24,8 +26,9 @@ declare const DEFAULT_CONFIG: {
|
|
|
24
26
|
};
|
|
25
27
|
})[];
|
|
26
28
|
importOrder: string[];
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
importOrderSeparation: boolean;
|
|
30
|
+
importOrderSortSpecifiers: boolean;
|
|
31
|
+
plugins: (typeof SortImportPlugin)[];
|
|
29
32
|
};
|
|
30
33
|
|
|
31
34
|
export { DEFAULT_CONFIG as default };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
// index.ts
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import * as SortImportPlugin from "@trivago/prettier-plugin-sort-imports";
|
|
3
|
+
import * as PackageJsonPlugin from "prettier-plugin-packagejson";
|
|
4
|
+
import * as ShellPlugin from "prettier-plugin-sh";
|
|
2
5
|
var DEFAULT_CONFIG = {
|
|
3
6
|
useTabs: false,
|
|
4
7
|
semi: true,
|
|
@@ -24,12 +27,9 @@ var DEFAULT_CONFIG = {
|
|
|
24
27
|
}
|
|
25
28
|
],
|
|
26
29
|
importOrder: ["node:*", "<THIRD_PARTY_MODULES>", "", "^@/(.*)$", "^@/tests/(.*)$", "", "^[./]"],
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"prettier-plugin-packagejson",
|
|
31
|
-
"prettier-plugin-sh"
|
|
32
|
-
]
|
|
30
|
+
importOrderSeparation: true,
|
|
31
|
+
importOrderSortSpecifiers: true,
|
|
32
|
+
plugins: [SortImportPlugin, PackageJsonPlugin, ShellPlugin]
|
|
33
33
|
};
|
|
34
34
|
var index_default = DEFAULT_CONFIG;
|
|
35
35
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shahrad/prettier-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "My personal Prettier config",
|
|
5
5
|
"homepage": "https://github.com/shahradelahi/prettier-config#readme",
|
|
6
6
|
"repository": {
|
|
@@ -12,46 +12,46 @@
|
|
|
12
12
|
"type": "module",
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
"import": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"default": "./dist/index.js"
|
|
18
|
+
},
|
|
19
|
+
"require": {
|
|
20
|
+
"types": "./dist/index.d.cts",
|
|
21
|
+
"default": "./dist/index.cjs"
|
|
22
|
+
}
|
|
18
23
|
}
|
|
19
24
|
},
|
|
20
25
|
"main": "dist/index.cjs",
|
|
21
26
|
"module": "dist/index.js",
|
|
22
27
|
"types": "dist/index.d.ts",
|
|
23
28
|
"files": [
|
|
24
|
-
"dist/**"
|
|
25
|
-
"!*.d.cts"
|
|
29
|
+
"dist/**"
|
|
26
30
|
],
|
|
27
31
|
"scripts": {
|
|
28
|
-
"build": "tsup
|
|
32
|
+
"build": "tsup",
|
|
29
33
|
"clean": "git clean -xdf node_modules dist",
|
|
30
34
|
"format": "prettier --write .",
|
|
31
35
|
"format:check": "prettier --check .",
|
|
32
|
-
"lint": "eslint .",
|
|
36
|
+
"lint": "pnpm typecheck && eslint .",
|
|
33
37
|
"lint:fix": "eslint --fix .",
|
|
34
|
-
"prepublishOnly": "pnpm
|
|
35
|
-
|
|
36
|
-
"dependencies": {
|
|
37
|
-
"@ianvs/prettier-plugin-sort-imports": "latest",
|
|
38
|
-
"prettier-plugin-packagejson": "latest",
|
|
39
|
-
"prettier-plugin-sh": "latest"
|
|
38
|
+
"prepublishOnly": "pnpm build && pnpm lint && pnpm format:check",
|
|
39
|
+
"typecheck": "tsc --noEmit"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@shahrad/eslint-config": "^1.
|
|
43
|
-
"@
|
|
44
|
-
"eslint": "^
|
|
45
|
-
"tsup": "^
|
|
46
|
-
"typescript": "^
|
|
42
|
+
"@shahrad/eslint-config": "^1.1.0",
|
|
43
|
+
"@shahrad/tsconfig": "^1.3.0",
|
|
44
|
+
"eslint": "^10.15.0",
|
|
45
|
+
"tsup": "^9.0.0",
|
|
46
|
+
"typescript": "^6.0.3"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@
|
|
49
|
+
"@trivago/prettier-plugin-sort-imports": "^6",
|
|
50
50
|
"prettier": ">=3.0.0",
|
|
51
|
-
"prettier-plugin-packagejson": "^
|
|
52
|
-
"prettier-plugin-sh": "^0.
|
|
51
|
+
"prettier-plugin-packagejson": "^3",
|
|
52
|
+
"prettier-plugin-sh": "^0.20"
|
|
53
53
|
},
|
|
54
|
-
"packageManager": "pnpm@
|
|
54
|
+
"packageManager": "pnpm@12.21.0+sha512.66fd8278ee28935ce951792d34367ff3af5c432a2756445823029533835b8da529bbe0be5130afd56ed0713fb8789e47bad82d93bd5ae2fe54b15562d6276ef0",
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public",
|
|
57
57
|
"provenance": true
|