@corysimmons/prettier-config 1.0.0

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 ADDED
@@ -0,0 +1,32 @@
1
+ # @corysimmons/prettier-config
2
+
3
+ Shared [Prettier](https://prettier.io/) config with StandardJS-flavored style and [Tailwind CSS](https://tailwindcss.com/) class sorting.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm i -D prettier prettier-plugin-tailwindcss @corysimmons/prettier-config
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ `package.json`:
14
+
15
+ ```json
16
+ {
17
+ "prettier": "@corysimmons/prettier-config"
18
+ }
19
+ ```
20
+
21
+ ### Overriding
22
+
23
+ `prettier.config.mjs`:
24
+
25
+ ```js
26
+ import config from '@corysimmons/prettier-config'
27
+
28
+ export default {
29
+ ...config,
30
+ printWidth: 100
31
+ }
32
+ ```
package/package.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "@corysimmons/prettier-config",
3
+ "version": "1.0.0",
4
+ "description": "Shared Prettier config with StandardJS style and Tailwind class sorting",
5
+ "type": "module",
6
+ "main": "prettier.config.mjs",
7
+ "files": ["prettier.config.mjs"],
8
+ "peerDependencies": {
9
+ "prettier": ">=3.0.0",
10
+ "prettier-plugin-tailwindcss": ">=0.6.0"
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/corysimmons/lint-config.git",
15
+ "directory": "packages/prettier-config"
16
+ },
17
+ "license": "MIT"
18
+ }
@@ -0,0 +1,15 @@
1
+ /** @type {import("prettier").Config} */
2
+ const config = {
3
+ semi: false,
4
+ singleQuote: true,
5
+ tabWidth: 2,
6
+ useTabs: false,
7
+ trailingComma: 'none',
8
+ printWidth: 80,
9
+ bracketSpacing: true,
10
+ arrowParens: 'always',
11
+ plugins: ['prettier-plugin-tailwindcss'],
12
+ tailwindFunctions: ['clsx', 'cn', 'cva', 'twMerge', 'twJoin']
13
+ }
14
+
15
+ export default config