@timbic/prettier-config 1.1.0 → 1.1.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/README.md CHANGED
@@ -8,7 +8,7 @@ Extensible prettier configuration for the smart developers.
8
8
  pnpm add -D prettier @timbic/prettier-config
9
9
  ```
10
10
 
11
- ```mjs
11
+ ```ts
12
12
  import withTimbic from "@timbic/prettier-config";
13
13
 
14
14
  export default withTimbic();
@@ -22,9 +22,35 @@ export default withTimbic({
22
22
 
23
23
  Your options will override the defaults and extend the config.
24
24
 
25
- ## Default options:
25
+ ## Types
26
26
 
27
- ```mjs
27
+ Now this package has its own types! That means that when using withTimbic() you will get enhanced type annotations by Quick Info on each
28
+ rule, as well as the right default set by withTimbic(), e.g.
29
+
30
+ ```ts
31
+ // before
32
+ export default withTimbic({
33
+ tabWidth: 3,
34
+ // Specify the number of spaces per indentation-level.
35
+ // @default
36
+ //
37
+ // 2 (incorrect, this is not a withTimbic() default, this is prettier default)
38
+ });
39
+
40
+ // after
41
+ export default withTimbic({
42
+ tabWidth: 3,
43
+ // Specify the number of spaces per indentation-level.
44
+ // @default
45
+ //
46
+ // 4 (correct, see our default options below)
47
+ // @see — https://prettier.io/docs/options#tab-width
48
+ });
49
+ ```
50
+
51
+ ## Default options
52
+
53
+ ```ts
28
54
  {
29
55
  arrowParens: "always",
30
56
  bracketSameLine: false,
package/dist/index.d.ts CHANGED
@@ -31,9 +31,9 @@ interface Options {
31
31
  *
32
32
  * @see https://prettier.io/docs/options#tabs
33
33
  */
34
- useTabs?: boolean;
35
- parentParser?: string | undefined;
36
- __embeddedInHtml?: boolean | undefined;
34
+ useTabs: boolean;
35
+ parentParser?: string;
36
+ __embeddedInHtml?: boolean;
37
37
  /**
38
38
  * Print semicolons at the ends of statements.
39
39
  * @default true
@@ -100,10 +100,14 @@ interface Options {
100
100
  rangeEnd: number;
101
101
  /**
102
102
  * Specify which parser to use.
103
+ *
104
+ * @see https://prettier.io/docs/options#parser
103
105
  */
104
106
  parser: LiteralUnion<BuiltInParserName>;
105
107
  /**
106
108
  * Specify the input filepath. This will be used to do parser inference.
109
+ *
110
+ * @see https://prettier.io/docs/options#file-path
107
111
  */
108
112
  filepath: string;
109
113
  /**
@@ -148,6 +152,8 @@ interface Options {
148
152
  arrowParens: "avoid" | "always";
149
153
  /**
150
154
  * Provide ability to support new languages to prettier.
155
+ *
156
+ * @see https://prettier.io/docs/plugins
151
157
  */
152
158
  plugins: Array<string | URL | Plugin>;
153
159
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@timbic/prettier-config",
3
3
  "type": "module",
4
- "version": "1.1.0",
4
+ "version": "1.1.3",
5
5
  "private": false,
6
6
  "description": "Timbic's prettier configuration",
7
7
  "author": "Timur Bikmuhametov <tim.bic22@gmail.com>",
@@ -29,16 +29,16 @@
29
29
  "prettier": "^3.0.0"
30
30
  },
31
31
  "dependencies": {
32
- "prettier": "^3.9.5"
32
+ "prettier": "^3.9.6"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@timbic/eslint-config": "1.0.0",
36
- "bumpp": "^11.1.0",
36
+ "bumpp": "12.0.0",
37
37
  "eslint": "10.7.0",
38
- "husky": "^9.1.7",
39
- "lint-staged": "^17.0.8",
40
- "tsdown": "^0.22.5",
41
- "typescript": "^6.0.3"
38
+ "husky": "9.1.7",
39
+ "lint-staged": "17.1.0",
40
+ "tsdown": "0.22.13",
41
+ "typescript": "6.0.3"
42
42
  },
43
43
  "lint-staged": {
44
44
  "*/**/*.{js,ts,md,json}": [