@timbic/prettier-config 1.0.7 → 1.0.11
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.d.ts +42 -0
- package/dist/index.js +34 -0
- package/package.json +18 -7
- package/.prettierignore +0 -39
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Config } from "prettier";
|
|
2
|
+
//#region src/index.d.ts
|
|
3
|
+
declare function withTimbic(options?: Config): {
|
|
4
|
+
overrides?: Array<{
|
|
5
|
+
files: string | string[];
|
|
6
|
+
excludeFiles?: string | string[];
|
|
7
|
+
options?: import("prettier").Options;
|
|
8
|
+
}>;
|
|
9
|
+
semi: boolean;
|
|
10
|
+
singleQuote: boolean;
|
|
11
|
+
jsxSingleQuote: boolean;
|
|
12
|
+
trailingComma: "none" | "es5" | "all";
|
|
13
|
+
bracketSpacing: boolean;
|
|
14
|
+
objectWrap: "preserve" | "collapse";
|
|
15
|
+
bracketSameLine: boolean;
|
|
16
|
+
rangeStart: number;
|
|
17
|
+
rangeEnd: number;
|
|
18
|
+
parser?: import("prettier").LiteralUnion<import("prettier").BuiltInParserName, string> | undefined;
|
|
19
|
+
filepath?: string | undefined;
|
|
20
|
+
requirePragma: boolean;
|
|
21
|
+
insertPragma: boolean;
|
|
22
|
+
checkIgnorePragma: boolean;
|
|
23
|
+
proseWrap: "always" | "never" | "preserve";
|
|
24
|
+
arrowParens: "avoid" | "always";
|
|
25
|
+
plugins?: any[] | undefined;
|
|
26
|
+
htmlWhitespaceSensitivity: "css" | "strict" | "ignore";
|
|
27
|
+
endOfLine: "auto" | "lf" | "crlf" | "cr";
|
|
28
|
+
quoteProps: "as-needed" | "consistent" | "preserve";
|
|
29
|
+
vueIndentScriptAndStyle: boolean;
|
|
30
|
+
embeddedLanguageFormatting: "auto" | "off";
|
|
31
|
+
singleAttributePerLine: boolean;
|
|
32
|
+
experimentalOperatorPosition?: "start" | "end" | undefined;
|
|
33
|
+
experimentalTernaries?: boolean | undefined;
|
|
34
|
+
jsxBracketSameLine?: boolean;
|
|
35
|
+
printWidth: number;
|
|
36
|
+
tabWidth: number;
|
|
37
|
+
useTabs: boolean;
|
|
38
|
+
parentParser?: string | undefined;
|
|
39
|
+
__embeddedInHtml?: boolean | undefined;
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { withTimbic as default };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region src/index.ts
|
|
2
|
+
const defaultConfig = {
|
|
3
|
+
arrowParens: "always",
|
|
4
|
+
bracketSameLine: false,
|
|
5
|
+
bracketSpacing: true,
|
|
6
|
+
checkIgnorePragma: false,
|
|
7
|
+
embeddedLanguageFormatting: "auto",
|
|
8
|
+
endOfLine: "lf",
|
|
9
|
+
htmlWhitespaceSensitivity: "css",
|
|
10
|
+
insertPragma: false,
|
|
11
|
+
jsxSingleQuote: false,
|
|
12
|
+
objectWrap: "preserve",
|
|
13
|
+
printWidth: 140,
|
|
14
|
+
proseWrap: "always",
|
|
15
|
+
quoteProps: "consistent",
|
|
16
|
+
rangeEnd: Infinity,
|
|
17
|
+
rangeStart: 0,
|
|
18
|
+
requirePragma: false,
|
|
19
|
+
semi: true,
|
|
20
|
+
singleAttributePerLine: true,
|
|
21
|
+
singleQuote: false,
|
|
22
|
+
tabWidth: 4,
|
|
23
|
+
trailingComma: "all",
|
|
24
|
+
useTabs: true,
|
|
25
|
+
vueIndentScriptAndStyle: false
|
|
26
|
+
};
|
|
27
|
+
function withTimbic(options) {
|
|
28
|
+
return {
|
|
29
|
+
...defaultConfig,
|
|
30
|
+
...options
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { withTimbic as default };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@timbic/prettier-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.11",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Timbic's prettier configuration",
|
|
7
7
|
"author": "Timur Bikmuhametov <tim.bic22@gmail.com>",
|
|
@@ -20,28 +20,39 @@
|
|
|
20
20
|
"main": "./dist/index.js",
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
22
|
"files": [
|
|
23
|
-
".prettierignore",
|
|
24
23
|
"dist"
|
|
25
24
|
],
|
|
26
25
|
"publishConfig": {
|
|
27
26
|
"access": "public"
|
|
28
27
|
},
|
|
29
28
|
"peerDependencies": {
|
|
30
|
-
"prettier": "^3.
|
|
29
|
+
"prettier": "^3.0.0"
|
|
31
30
|
},
|
|
32
31
|
"dependencies": {
|
|
33
|
-
"prettier": "3.9.5"
|
|
32
|
+
"prettier": "^3.9.5"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
35
|
+
"@timbic/eslint-config": "1.0.0",
|
|
36
36
|
"bumpp": "^11.1.0",
|
|
37
|
+
"eslint": "10.7.0",
|
|
38
|
+
"husky": "^9.1.7",
|
|
39
|
+
"lint-staged": "^17.0.8",
|
|
37
40
|
"tsdown": "^0.22.5",
|
|
38
41
|
"typescript": "^6.0.3"
|
|
39
42
|
},
|
|
43
|
+
"lint-staged": {
|
|
44
|
+
"*/**/*.{js,ts,md,json}": [
|
|
45
|
+
"pnpm fmt",
|
|
46
|
+
"pnpm lint:fix"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
40
49
|
"scripts": {
|
|
41
50
|
"build": "tsdown",
|
|
42
|
-
"
|
|
43
|
-
"
|
|
51
|
+
"fmt": "prettier --cache --write .",
|
|
52
|
+
"fmt:chk": "prettier --check .",
|
|
53
|
+
"lint": "eslint --cache",
|
|
54
|
+
"lint:fix": "eslint --cache --fix",
|
|
44
55
|
"typecheck": "tsc --noEmit",
|
|
45
|
-
"release": "bumpp
|
|
56
|
+
"release": "bumpp"
|
|
46
57
|
}
|
|
47
58
|
}
|
package/.prettierignore
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
node_modules
|
|
2
|
-
|
|
3
|
-
dist
|
|
4
|
-
build
|
|
5
|
-
|
|
6
|
-
lib-cov
|
|
7
|
-
coverage
|
|
8
|
-
.nyc_output
|
|
9
|
-
|
|
10
|
-
.gitattributes
|
|
11
|
-
.gitignore
|
|
12
|
-
|
|
13
|
-
LICENSE
|
|
14
|
-
|
|
15
|
-
.env
|
|
16
|
-
|
|
17
|
-
.npm
|
|
18
|
-
.npmrc
|
|
19
|
-
.yarn
|
|
20
|
-
.yarn-integrity
|
|
21
|
-
.yarnclean
|
|
22
|
-
*.tgz
|
|
23
|
-
npm-debug.log*
|
|
24
|
-
yarn-debug.log*
|
|
25
|
-
yarn-error.log*
|
|
26
|
-
yarn.lock
|
|
27
|
-
.pnpm
|
|
28
|
-
pnpm-lock.yaml
|
|
29
|
-
|
|
30
|
-
logs
|
|
31
|
-
*.log
|
|
32
|
-
|
|
33
|
-
.browserslistrc
|
|
34
|
-
.editorconfig
|
|
35
|
-
.eslintignore
|
|
36
|
-
.markdownlintignore
|
|
37
|
-
.prettierignore
|
|
38
|
-
|
|
39
|
-
CHANGELOG.md
|