@wkovacs64/prettier-config 3.0.3 → 4.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.
Files changed (3) hide show
  1. package/README.md +15 -10
  2. package/index.js +6 -1
  3. package/package.json +18 -18
package/README.md CHANGED
@@ -2,9 +2,8 @@
2
2
 
3
3
  This is my personal [Prettier][prettier] configuration.
4
4
 
5
- [![npm Version][npm-image]][npm-url]
6
- [![Build Status][ci-image]][ci-url]
7
- [![semantic-release][semantic-release-image]][semantic-release-url]
5
+ [![npm Version][npm-image]][npm-url] [![Build Status][ci-image]][ci-url]
6
+ [![changesets][changesets-image]][changesets-url]
8
7
 
9
8
  ### Install
10
9
 
@@ -21,18 +20,23 @@ Follow the Prettier documentation on [sharing configurations][prettier-sharing].
21
20
  #### `prettier.config.js`
22
21
 
23
22
  ```js
24
- const prettierConfig = require('@wkovacs64/prettier-config');
23
+ import prettierConfig from '@wkovacs64/prettier-config';
25
24
 
26
- module.exports = {
25
+ /** @type {import("prettier").Options} */
26
+ export const config = {
27
27
  ...prettierConfig,
28
28
  // overrides here
29
29
  };
30
+
31
+ export default config;
30
32
  ```
31
33
 
32
34
  #### `.prettierignore`
33
35
 
34
36
  ```
37
+ .changeset
35
38
  package.json
39
+ package-lock.json
36
40
  ```
37
41
 
38
42
  #### `package.json`
@@ -41,7 +45,8 @@ package.json
41
45
  {
42
46
  "scripts": {
43
47
  ...
44
- "format": "prettier --write .",
48
+ "format": "prettier --cache --write .",
49
+ "format:check": "prettier --cache --check .",
45
50
  ...
46
51
  }
47
52
  }
@@ -51,12 +56,12 @@ package.json
51
56
  https://img.shields.io/npm/v/@wkovacs64/prettier-config.svg?style=flat-square
52
57
  [npm-url]: https://www.npmjs.com/package/@wkovacs64/prettier-config
53
58
  [ci-image]:
54
- https://img.shields.io/github/workflow/status/wKovacs64/prettier-config/%F0%9F%A4%96%20CI/main?logo=github&style=flat-square
59
+ https://img.shields.io/github/actions/workflow/status/wKovacs64/prettier-config/ci.yml?logo=github&style=flat-square
55
60
  [ci-url]:
56
61
  https://github.com/wKovacs64/prettier-config/actions?query=workflow%3Aci
57
- [semantic-release-image]:
58
- https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square
59
- [semantic-release-url]: https://github.com/semantic-release/semantic-release
62
+ [changesets-image]:
63
+ https://img.shields.io/badge/maintained%20with-changesets-blue?style=flat-square
64
+ [changesets-url]: https://github.com/changesets/changesets
60
65
  [prettier]: https://prettier.io/
61
66
  [prettier-sharing]:
62
67
  https://prettier.io/docs/en/configuration.html#sharing-configurations
package/index.js CHANGED
@@ -1,4 +1,5 @@
1
- module.exports = {
1
+ /** @type {import("prettier").Options} */
2
+ export default {
2
3
  $schema: 'http://json.schemastore.org/prettierrc',
3
4
 
4
5
  // defaults
@@ -26,6 +27,10 @@ module.exports = {
26
27
  singleQuote: true,
27
28
  trailingComma: 'all',
28
29
 
30
+ plugins: ['prettier-plugin-tailwindcss'],
31
+ tailwindAttributes: ['class', 'className', '.*[cC]lassName'],
32
+ tailwindFunctions: ['clsx', 'cn'],
33
+
29
34
  // workaround for https://github.com/changesets/changesets/issues/774
30
35
  overrides: [
31
36
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wkovacs64/prettier-config",
3
- "version": "3.0.3",
3
+ "version": "4.0.1",
4
4
  "description": "@wKovacs64 Prettier config",
5
5
  "keywords": [
6
6
  "prettier",
@@ -12,7 +12,11 @@
12
12
  "email": "justin.r.hall@gmail.com"
13
13
  },
14
14
  "license": "MIT",
15
+ "type": "module",
15
16
  "main": "index.js",
17
+ "exports": {
18
+ ".": "./index.js"
19
+ },
16
20
  "files": [
17
21
  "index.js"
18
22
  ],
@@ -29,31 +33,27 @@
29
33
  "changeset:version": "changeset version && npm install --package-lock-only",
30
34
  "changeset:publish": "changeset publish",
31
35
  "format": "prettier --cache --write .",
32
- "lint": "eslint .",
33
- "husky:install": "husky install",
34
- "prepare": "npm run --silent husky:install"
35
- },
36
- "config": {
37
- "commitizen": {
38
- "path": "./node_modules/cz-conventional-changelog"
39
- }
36
+ "format:check": "prettier --cache --check .",
37
+ "lint": "eslint ."
40
38
  },
41
39
  "private": false,
40
+ "prettier": "./index.js",
42
41
  "publishConfig": {
43
42
  "access": "public"
44
43
  },
45
44
  "engines": {
46
- "node": ">= 8.9.0"
45
+ "node": ">= 18"
46
+ },
47
+ "dependencies": {
48
+ "prettier-plugin-tailwindcss": "^0.6.1"
47
49
  },
48
50
  "devDependencies": {
49
- "@changesets/changelog-github": "0.4.7",
50
- "@changesets/cli": "2.25.2",
51
+ "@changesets/changelog-github": "0.5.0",
52
+ "@changesets/cli": "2.27.5",
51
53
  "cross-env": "7.0.3",
52
- "eslint": "7.32.0",
53
- "eslint-plugin-wkovacs64": "13.17.0",
54
- "husky": "8.0.2",
55
- "lint-staged": "13.0.3",
56
- "npm-run-all": "4.1.5",
57
- "prettier": "2.7.1"
54
+ "eslint": "8.57.0",
55
+ "eslint-plugin-wkovacs64": "16.2.0",
56
+ "npm-run-all2": "6.2.0",
57
+ "prettier": "3.3.0"
58
58
  }
59
59
  }