@fxhxyz/prettier-config 1.0.1 → 1.0.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/.prettierignore +18 -0
- package/.prettierrc.js +6 -0
- package/.prettierrc.json +41 -0
- package/package.json +21 -11
- package/readme.md +44 -2
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -25
- package/index.ts +0 -25
- package/tsconfig.json +0 -10
package/.prettierignore
ADDED
package/.prettierrc.js
ADDED
package/.prettierrc.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json.schemastore.org/prettierrc",
|
|
3
|
+
"tabWidth": 2,
|
|
4
|
+
"useTabs": true,
|
|
5
|
+
"printWidth": 120,
|
|
6
|
+
"singleQuote": true,
|
|
7
|
+
"jsxSingleQuote": true,
|
|
8
|
+
"singleAttributePerLine": true,
|
|
9
|
+
"arrowParens": "avoid",
|
|
10
|
+
"semi": true,
|
|
11
|
+
"jsxBracketSameLine": false,
|
|
12
|
+
"bracketSameLine": false,
|
|
13
|
+
"trailingComma": "es5",
|
|
14
|
+
"bracketSpacing": true,
|
|
15
|
+
"proseWrap": "always",
|
|
16
|
+
"quoteProps": "as-needed",
|
|
17
|
+
"endOfLine": "lf",
|
|
18
|
+
"plugins": [
|
|
19
|
+
"@ianvs/prettier-plugin-sort-imports",
|
|
20
|
+
"prettier-plugin-multiline-arrays"
|
|
21
|
+
],
|
|
22
|
+
"multilineArraysWrapThreshold": 2,
|
|
23
|
+
"importOrder": [
|
|
24
|
+
"<BUILTIN_MODULES>",
|
|
25
|
+
"^(react|next(.*))$",
|
|
26
|
+
"<THIRD_PARTY_MODULES>",
|
|
27
|
+
"<TYPES>",
|
|
28
|
+
"",
|
|
29
|
+
"^@/(.*)$",
|
|
30
|
+
"^~/(.*)$",
|
|
31
|
+
"^[./]",
|
|
32
|
+
"<TYPES>^[.]",
|
|
33
|
+
"^(.*)(sass|css|scss)$"
|
|
34
|
+
],
|
|
35
|
+
"importOrderParserPlugins": [
|
|
36
|
+
"classProperties",
|
|
37
|
+
"decorators-legacy",
|
|
38
|
+
"jsx",
|
|
39
|
+
"typescript"
|
|
40
|
+
]
|
|
41
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fxhxyz/prettier-config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"description": "My professional prettier config",
|
|
6
|
+
"main": "./.prettierrc.js",
|
|
7
|
+
"prettier": "./.prettierrc.json",
|
|
5
8
|
"keywords": [
|
|
6
9
|
"typescript",
|
|
7
10
|
"prettier",
|
|
@@ -9,9 +12,16 @@
|
|
|
9
12
|
"prettier config",
|
|
10
13
|
"config"
|
|
11
14
|
],
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
"files": [
|
|
16
|
+
".prettierignore",
|
|
17
|
+
".prettierrc.cjs",
|
|
18
|
+
".prettierrc.js",
|
|
19
|
+
".prettierrc.mjs",
|
|
20
|
+
".prettierrc.json"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"format": "prettier --write ."
|
|
24
|
+
},
|
|
15
25
|
"author": {
|
|
16
26
|
"name": "fxhxyz4",
|
|
17
27
|
"email": "fxhsec@proton.me",
|
|
@@ -33,15 +43,15 @@
|
|
|
33
43
|
"publishConfig": {
|
|
34
44
|
"access": "public"
|
|
35
45
|
},
|
|
36
|
-
"
|
|
37
|
-
"
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.4.1",
|
|
48
|
+
"prettier": "^3.5.2",
|
|
49
|
+
"prettier-plugin-multiline-arrays": "3.0.3"
|
|
38
50
|
},
|
|
39
51
|
"peerDependencies": {
|
|
40
|
-
"prettier": "^
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"@types/prettier": "^3.0.0",
|
|
44
|
-
"typescript": "^5.7.3"
|
|
52
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.4.1",
|
|
53
|
+
"prettier": "^3.5.2",
|
|
54
|
+
"prettier-plugin-multiline-arrays": "3.0.3"
|
|
45
55
|
},
|
|
46
56
|
"engines": {
|
|
47
57
|
"node": "20.x"
|
package/readme.md
CHANGED
|
@@ -5,10 +5,52 @@
|
|
|
5
5
|
### how to use?
|
|
6
6
|
+ ***npm***
|
|
7
7
|
```
|
|
8
|
-
npm install
|
|
8
|
+
npm install @fxhxyz/prettier-config -D
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
+ ***yarn***
|
|
12
12
|
```
|
|
13
|
-
yarn add
|
|
13
|
+
yarn add @fxhxyz/prettier-config -D
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
+ ***pnpm***
|
|
17
|
+
```
|
|
18
|
+
pnpm add @fxhxyz/prettier-config -D
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
+ ***usage commonjs***
|
|
22
|
+
```js
|
|
23
|
+
// .prettierrc.cjs
|
|
24
|
+
module.exports = require("@fxhxyz/prettier-config");
|
|
25
|
+
|
|
26
|
+
// package.json
|
|
27
|
+
"scripts": {
|
|
28
|
+
"format": "prettier --write ."
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
+ ***usage es6***
|
|
33
|
+
```js
|
|
34
|
+
// .prettierrc.mjs/.js
|
|
35
|
+
import { config } from "@fxhxyz/prettier-config";
|
|
36
|
+
export { config };
|
|
37
|
+
|
|
38
|
+
// package.json
|
|
39
|
+
"scripts": {
|
|
40
|
+
"format": "prettier --write ."
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
#
|
|
46
|
+
|
|
47
|
+
### copying prettierignore & editorconfig from node_modules
|
|
48
|
+
```
|
|
49
|
+
# linux/mac
|
|
50
|
+
cp node_modules/@fxhxyz/prettier-config/.prettierignore .prettierignore &&
|
|
51
|
+
cp node_modules/@fxhxyz/prettier-config/.editorconfig .editorconfig
|
|
52
|
+
|
|
53
|
+
# win
|
|
54
|
+
copy node_modules/@fxhxyz/prettier-config/.prettierignore .prettierignore &&
|
|
55
|
+
copy node_modules/@fxhxyz/prettier-config/.editorconfig .editorconfig
|
|
14
56
|
```
|
package/dist/index.d.ts
DELETED
package/dist/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.config = void 0;
|
|
4
|
-
/** @type {import("prettier").Config} */
|
|
5
|
-
exports.config = {
|
|
6
|
-
tabWidth: 2,
|
|
7
|
-
useTabs: true,
|
|
8
|
-
printWidth: 140,
|
|
9
|
-
singleQuote: true,
|
|
10
|
-
jsxSingleQuote: true,
|
|
11
|
-
arrowParens: "avoid",
|
|
12
|
-
semi: true,
|
|
13
|
-
jsxBracketSameLine: false,
|
|
14
|
-
trailingComma: "es5",
|
|
15
|
-
bracketSpacing: true,
|
|
16
|
-
proseWrap: "always",
|
|
17
|
-
quoteProps: "as-needed",
|
|
18
|
-
htmlWhitespaceSensitivity: "css",
|
|
19
|
-
cssEnable: ["css", "scss", "less"],
|
|
20
|
-
jsxSortProps: true,
|
|
21
|
-
yamlBracketSpacing: true,
|
|
22
|
-
markdownQuoteStyle: "consistent",
|
|
23
|
-
parser: "jsonc",
|
|
24
|
-
endOfLine: "lf",
|
|
25
|
-
};
|
package/index.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { Config } from "prettier";
|
|
2
|
-
|
|
3
|
-
/** @type {import("prettier").Config} */
|
|
4
|
-
|
|
5
|
-
export const config: Config = {
|
|
6
|
-
tabWidth: 2,
|
|
7
|
-
useTabs: true,
|
|
8
|
-
printWidth: 140,
|
|
9
|
-
singleQuote: true,
|
|
10
|
-
jsxSingleQuote: true,
|
|
11
|
-
arrowParens: "avoid",
|
|
12
|
-
semi: true,
|
|
13
|
-
jsxBracketSameLine: false,
|
|
14
|
-
trailingComma: "es5",
|
|
15
|
-
bracketSpacing: true,
|
|
16
|
-
proseWrap: "always",
|
|
17
|
-
quoteProps: "as-needed",
|
|
18
|
-
htmlWhitespaceSensitivity: "css",
|
|
19
|
-
cssEnable: ["css", "scss", "less"],
|
|
20
|
-
jsxSortProps: true,
|
|
21
|
-
yamlBracketSpacing: true,
|
|
22
|
-
markdownQuoteStyle: "consistent",
|
|
23
|
-
parser: "jsonc",
|
|
24
|
-
endOfLine: "lf",
|
|
25
|
-
};
|