@shahrad/prettier-config 1.2.2 → 2.0.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/lib/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { Config } from 'prettier';
2
+
3
+ export default Config;
package/lib/index.js ADDED
@@ -0,0 +1,43 @@
1
+ import ImportOrderParserPlugin from '@trivago/prettier-plugin-sort-imports';
2
+ import PackageJsonPlugin from 'prettier-plugin-packagejson';
3
+ import * as ShellPlugin from 'prettier-plugin-sh';
4
+
5
+ const DEFAULT_CONFIG = {
6
+ useTabs: false,
7
+ semi: true,
8
+ singleQuote: true,
9
+ jsxSingleQuote: true,
10
+ trailingComma: 'es5',
11
+ endOfLine: 'lf',
12
+ printWidth: 100,
13
+ overrides: [
14
+ {
15
+ files: '*.md',
16
+ options: {
17
+ tabWidth: 2,
18
+ useTabs: false,
19
+ printWidth: 79,
20
+ },
21
+ },
22
+ {
23
+ files: ['Dockerfile', '*.dockerfile'],
24
+ options: {
25
+ spaceRedirects: false,
26
+ },
27
+ },
28
+ ],
29
+ importOrder: [
30
+ 'node:*',
31
+ '<THIRD_PARTY_MODULES>',
32
+ '<SEPARATOR>',
33
+ '^@/(.*)$',
34
+ '^@/tests/(.*)$',
35
+ '<SEPARATOR>',
36
+ '^[./]',
37
+ ],
38
+ importOrderParserPlugins: ['typescript', 'jsx', 'explicitResourceManagement'],
39
+ importOrderSeparation: true,
40
+ plugins: [ImportOrderParserPlugin, PackageJsonPlugin, ShellPlugin],
41
+ };
42
+
43
+ export default DEFAULT_CONFIG;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shahrad/prettier-config",
3
- "version": "1.2.2",
3
+ "version": "2.0.1",
4
4
  "description": "My personal Prettier config",
5
5
  "homepage": "https://github.com/shahradelahi/prettier-config#readme",
6
6
  "repository": {
@@ -10,34 +10,23 @@
10
10
  "license": "MIT",
11
11
  "author": "Shahrad Elahi <shahrad@litehex.com> (https://github.com/shahradelahi)",
12
12
  "type": "module",
13
- "main": "dist/index.js",
14
- "types": "dist/index.d.ts",
13
+ "main": "lib/index.js",
14
+ "types": "lib/index.d.ts",
15
15
  "files": [
16
- "dist/**",
17
- "!*.d.cts"
16
+ "lib/*"
18
17
  ],
19
18
  "scripts": {
20
- "build": "git clean -xdf dist && tsc",
21
- "clean": "git clean -xdf node_modules dist",
22
19
  "format": "prettier --write .",
23
20
  "format:check": "prettier --check .",
24
- "lint": "eslint .",
25
- "lint:fix": "eslint --fix .",
26
- "prepublishOnly": "pnpm lint && pnpm build && pnpm format:check"
27
- },
28
- "devDependencies": {
29
- "@shahrad/eslint-config": "^1.0.0",
30
- "@sindresorhus/tsconfig": "^7.0.0",
31
- "eslint": "^9.21.0",
32
- "typescript": "^5.7.3"
21
+ "prepublishOnly": "pnpm format:check"
33
22
  },
34
23
  "peerDependencies": {
35
- "@ianvs/prettier-plugin-sort-imports": "^4.4",
24
+ "@trivago/prettier-plugin-sort-imports": "^6",
36
25
  "prettier": ">=3.0.0",
37
- "prettier-plugin-packagejson": "^2.5",
38
- "prettier-plugin-sh": "^0.15"
26
+ "prettier-plugin-packagejson": "^3",
27
+ "prettier-plugin-sh": "^0.20"
39
28
  },
40
- "packageManager": "pnpm@10.6.3",
29
+ "packageManager": "pnpm@12.21.0+sha512.66fd8278ee28935ce951792d34367ff3af5c432a2756445823029533835b8da529bbe0be5130afd56ed0713fb8789e47bad82d93bd5ae2fe54b15562d6276ef0",
41
30
  "publishConfig": {
42
31
  "access": "public",
43
32
  "provenance": true
package/dist/index.d.ts DELETED
@@ -1,30 +0,0 @@
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
- export default DEFAULT_CONFIG;
package/dist/index.js DELETED
@@ -1,33 +0,0 @@
1
- const DEFAULT_CONFIG = {
2
- useTabs: false,
3
- semi: true,
4
- singleQuote: true,
5
- jsxSingleQuote: true,
6
- trailingComma: 'es5',
7
- endOfLine: 'lf',
8
- printWidth: 100,
9
- overrides: [
10
- {
11
- files: '*.md',
12
- options: {
13
- tabWidth: 2,
14
- useTabs: false,
15
- printWidth: 79,
16
- },
17
- },
18
- {
19
- files: ['Dockerfile', '*.dockerfile'],
20
- options: {
21
- spaceRedirects: false,
22
- },
23
- },
24
- ],
25
- importOrder: ['node:*', '<THIRD_PARTY_MODULES>', '', '^@/(.*)$', '^@/tests/(.*)$', '', '^[./]'],
26
- importOrderParserPlugins: ['typescript', 'jsx', 'explicitResourceManagement'],
27
- plugins: [
28
- '@ianvs/prettier-plugin-sort-imports',
29
- 'prettier-plugin-packagejson',
30
- 'prettier-plugin-sh',
31
- ],
32
- };
33
- export default DEFAULT_CONFIG;