@shahrad/prettier-config 1.1.0 → 1.2.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 +58 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +37 -0
- package/package.json +32 -15
- package/index.d.ts +0 -7
- package/index.js +0 -28
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
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
|
+
// index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
default: () => index_default
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
|
26
|
+
var DEFAULT_CONFIG = {
|
|
27
|
+
useTabs: false,
|
|
28
|
+
semi: true,
|
|
29
|
+
singleQuote: true,
|
|
30
|
+
jsxSingleQuote: true,
|
|
31
|
+
trailingComma: "es5",
|
|
32
|
+
endOfLine: "lf",
|
|
33
|
+
printWidth: 100,
|
|
34
|
+
overrides: [
|
|
35
|
+
{
|
|
36
|
+
files: "*.md",
|
|
37
|
+
options: {
|
|
38
|
+
tabWidth: 2,
|
|
39
|
+
useTabs: false,
|
|
40
|
+
printWidth: 79
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
files: ["Dockerfile", "*.dockerfile"],
|
|
45
|
+
options: {
|
|
46
|
+
spaceRedirects: false
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
importOrder: ["node:*", "<THIRD_PARTY_MODULES>", "", "^@/(.*)$", "^@/tests/(.*)$", "", "^[./]"],
|
|
51
|
+
importOrderParserPlugins: ["typescript", "jsx", "explicitResourceManagement"],
|
|
52
|
+
plugins: [
|
|
53
|
+
"@ianvs/prettier-plugin-sort-imports",
|
|
54
|
+
"prettier-plugin-packagejson",
|
|
55
|
+
"prettier-plugin-sh"
|
|
56
|
+
]
|
|
57
|
+
};
|
|
58
|
+
var index_default = DEFAULT_CONFIG;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const DEFAULT_CONFIG: {
|
|
2
|
+
useTabs: false;
|
|
3
|
+
semi: true;
|
|
4
|
+
singleQuote: true;
|
|
5
|
+
jsxSingleQuote: true;
|
|
6
|
+
trailingComma: "es5";
|
|
7
|
+
endOfLine: "lf";
|
|
8
|
+
printWidth: number;
|
|
9
|
+
overrides: ({
|
|
10
|
+
files: string;
|
|
11
|
+
options: {
|
|
12
|
+
tabWidth: number;
|
|
13
|
+
useTabs: false;
|
|
14
|
+
printWidth: number;
|
|
15
|
+
spaceRedirects?: undefined;
|
|
16
|
+
};
|
|
17
|
+
} | {
|
|
18
|
+
files: string[];
|
|
19
|
+
options: {
|
|
20
|
+
spaceRedirects: boolean;
|
|
21
|
+
tabWidth?: undefined;
|
|
22
|
+
useTabs?: undefined;
|
|
23
|
+
printWidth?: undefined;
|
|
24
|
+
};
|
|
25
|
+
})[];
|
|
26
|
+
importOrder: string[];
|
|
27
|
+
importOrderParserPlugins: ("explicitResourceManagement" | "jsx" | "typescript")[];
|
|
28
|
+
plugins: string[];
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { DEFAULT_CONFIG as default };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// index.ts
|
|
2
|
+
var DEFAULT_CONFIG = {
|
|
3
|
+
useTabs: false,
|
|
4
|
+
semi: true,
|
|
5
|
+
singleQuote: true,
|
|
6
|
+
jsxSingleQuote: true,
|
|
7
|
+
trailingComma: "es5",
|
|
8
|
+
endOfLine: "lf",
|
|
9
|
+
printWidth: 100,
|
|
10
|
+
overrides: [
|
|
11
|
+
{
|
|
12
|
+
files: "*.md",
|
|
13
|
+
options: {
|
|
14
|
+
tabWidth: 2,
|
|
15
|
+
useTabs: false,
|
|
16
|
+
printWidth: 79
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
files: ["Dockerfile", "*.dockerfile"],
|
|
21
|
+
options: {
|
|
22
|
+
spaceRedirects: false
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
importOrder: ["node:*", "<THIRD_PARTY_MODULES>", "", "^@/(.*)$", "^@/tests/(.*)$", "", "^[./]"],
|
|
27
|
+
importOrderParserPlugins: ["typescript", "jsx", "explicitResourceManagement"],
|
|
28
|
+
plugins: [
|
|
29
|
+
"@ianvs/prettier-plugin-sort-imports",
|
|
30
|
+
"prettier-plugin-packagejson",
|
|
31
|
+
"prettier-plugin-sh"
|
|
32
|
+
]
|
|
33
|
+
};
|
|
34
|
+
var index_default = DEFAULT_CONFIG;
|
|
35
|
+
export {
|
|
36
|
+
index_default as default
|
|
37
|
+
};
|
package/package.json
CHANGED
|
@@ -1,40 +1,57 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shahrad/prettier-config",
|
|
3
|
-
"version": "1.1
|
|
4
|
-
"private": false,
|
|
3
|
+
"version": "1.2.1",
|
|
5
4
|
"description": "My personal Prettier config",
|
|
6
5
|
"homepage": "https://github.com/shahradelahi/prettier-config#readme",
|
|
7
|
-
"repository":
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/shahradelahi/prettier-config.git"
|
|
9
|
+
},
|
|
8
10
|
"license": "MIT",
|
|
9
11
|
"author": "Shahrad Elahi <shahrad@litehex.com> (https://github.com/shahradelahi)",
|
|
10
12
|
"type": "module",
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"import": "./dist/index.js",
|
|
17
|
+
"default": "./dist/index.cjs"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"main": "dist/index.cjs",
|
|
21
|
+
"module": "dist/index.js",
|
|
22
|
+
"types": "dist/index.d.ts",
|
|
13
23
|
"files": [
|
|
14
|
-
"
|
|
15
|
-
"
|
|
24
|
+
"dist/**",
|
|
25
|
+
"!*.d.cts"
|
|
16
26
|
],
|
|
17
27
|
"scripts": {
|
|
18
|
-
"
|
|
28
|
+
"build": "tsup --dts-resolve --format cjs,esm index.ts",
|
|
29
|
+
"clean": "git clean -xdf node_modules dist",
|
|
19
30
|
"format": "prettier --write .",
|
|
20
31
|
"format:check": "prettier --check .",
|
|
21
32
|
"lint": "eslint .",
|
|
22
33
|
"lint:fix": "eslint --fix .",
|
|
23
|
-
"prepublishOnly": "pnpm lint && pnpm format:check"
|
|
34
|
+
"prepublishOnly": "pnpm lint && pnpm build && pnpm format:check"
|
|
24
35
|
},
|
|
25
36
|
"dependencies": {
|
|
26
|
-
"@ianvs/prettier-plugin-sort-imports": "
|
|
27
|
-
"prettier-plugin-packagejson": "
|
|
28
|
-
"prettier-plugin-sh": "
|
|
37
|
+
"@ianvs/prettier-plugin-sort-imports": "latest",
|
|
38
|
+
"prettier-plugin-packagejson": "latest",
|
|
39
|
+
"prettier-plugin-sh": "latest"
|
|
29
40
|
},
|
|
30
41
|
"devDependencies": {
|
|
31
42
|
"@shahrad/eslint-config": "^1.0.0",
|
|
32
|
-
"
|
|
43
|
+
"@sindresorhus/tsconfig": "^7.0.0",
|
|
44
|
+
"eslint": "^9.21.0",
|
|
45
|
+
"tsup": "^8.3.6",
|
|
46
|
+
"typescript": "^5.7.3"
|
|
33
47
|
},
|
|
34
48
|
"peerDependencies": {
|
|
35
|
-
"prettier": "
|
|
49
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.4",
|
|
50
|
+
"prettier": ">=3.0.0",
|
|
51
|
+
"prettier-plugin-packagejson": "^2.5",
|
|
52
|
+
"prettier-plugin-sh": "^0.15"
|
|
36
53
|
},
|
|
37
|
-
"packageManager": "pnpm@
|
|
54
|
+
"packageManager": "pnpm@10.5.2",
|
|
38
55
|
"publishConfig": {
|
|
39
56
|
"access": "public",
|
|
40
57
|
"provenance": true
|
package/index.d.ts
DELETED
package/index.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/** @type {import('@ianvs/prettier-plugin-sort-imports').PrettierConfig} */
|
|
2
|
-
const DEFAULT_CONFIG = {
|
|
3
|
-
useTabs: false,
|
|
4
|
-
semi: true,
|
|
5
|
-
singleQuote: true,
|
|
6
|
-
jsxSingleQuote: true,
|
|
7
|
-
trailingComma: 'es5',
|
|
8
|
-
endOfLine: 'lf',
|
|
9
|
-
printWidth: 100,
|
|
10
|
-
overrides: [
|
|
11
|
-
{
|
|
12
|
-
files: '*.md',
|
|
13
|
-
options: {
|
|
14
|
-
tabWidth: 2,
|
|
15
|
-
useTabs: false,
|
|
16
|
-
printWidth: 79,
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
],
|
|
20
|
-
importOrder: ['<THIRD_PARTY_MODULES>', '', '^@/(.*)$', '^@/tests/(.*)$', '', '^[./]'],
|
|
21
|
-
plugins: [
|
|
22
|
-
'@ianvs/prettier-plugin-sort-imports',
|
|
23
|
-
'prettier-plugin-packagejson',
|
|
24
|
-
'prettier-plugin-sh',
|
|
25
|
-
],
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export default DEFAULT_CONFIG;
|