@wkovacs64/prettier-config 3.0.2 → 4.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.
Files changed (3) hide show
  1. package/README.md +16 -9
  2. package/index.js +7 -1
  3. package/package.json +24 -25
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  This is my personal [Prettier][prettier] configuration.
4
4
 
5
5
  [![npm Version][npm-image]][npm-url] [![Build Status][ci-image]][ci-url]
6
- [![semantic-release][semantic-release-image]][semantic-release-url]
6
+ [![changesets][changesets-image]][changesets-url]
7
7
 
8
8
  ### Install
9
9
 
@@ -20,18 +20,23 @@ Follow the Prettier documentation on [sharing configurations][prettier-sharing].
20
20
  #### `prettier.config.js`
21
21
 
22
22
  ```js
23
- const prettierConfig = require('@wkovacs64/prettier-config');
23
+ import prettierConfig from '@wkovacs64/prettier-config';
24
24
 
25
- module.exports = {
25
+ /** @type {import("prettier").Options} */
26
+ export const config = {
26
27
  ...prettierConfig,
27
28
  // overrides here
28
29
  };
30
+
31
+ export default config;
29
32
  ```
30
33
 
31
34
  #### `.prettierignore`
32
35
 
33
36
  ```
37
+ .changeset
34
38
  package.json
39
+ package-lock.json
35
40
  ```
36
41
 
37
42
  #### `package.json`
@@ -40,7 +45,8 @@ package.json
40
45
  {
41
46
  "scripts": {
42
47
  ...
43
- "format": "prettier --write .",
48
+ "format": "prettier --cache --write .",
49
+ "format:check": "prettier --cache --check .",
44
50
  ...
45
51
  }
46
52
  }
@@ -50,11 +56,12 @@ package.json
50
56
  https://img.shields.io/npm/v/@wkovacs64/prettier-config.svg?style=flat-square
51
57
  [npm-url]: https://www.npmjs.com/package/@wkovacs64/prettier-config
52
58
  [ci-image]:
53
- https://img.shields.io/circleci/project/github/wKovacs64/prettier-config/master.svg?style=flat-square
54
- [ci-url]: https://circleci.com/gh/wKovacs64/prettier-config
55
- [semantic-release-image]:
56
- https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square
57
- [semantic-release-url]: https://github.com/semantic-release/semantic-release
59
+ https://img.shields.io/github/actions/workflow/status/wKovacs64/prettier-config/ci.yml?logo=github&style=flat-square
60
+ [ci-url]:
61
+ https://github.com/wKovacs64/prettier-config/actions?query=workflow%3Aci
62
+ [changesets-image]:
63
+ https://img.shields.io/badge/maintained%20with-changesets-blue?style=flat-square
64
+ [changesets-url]: https://github.com/changesets/changesets
58
65
  [prettier]: https://prettier.io/
59
66
  [prettier-sharing]:
60
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
@@ -17,6 +18,7 @@ module.exports = {
17
18
  rangeStart: 0,
18
19
  requirePragma: false,
19
20
  semi: true,
21
+ singleAttributePerLine: false,
20
22
  tabWidth: 2,
21
23
  useTabs: false,
22
24
  vueIndentScriptAndStyle: false,
@@ -25,6 +27,10 @@ module.exports = {
25
27
  singleQuote: true,
26
28
  trailingComma: 'all',
27
29
 
30
+ plugins: ['prettier-plugin-tailwindcss'],
31
+ tailwindAttributes: ['class', 'className', '.*[cC]lassName'],
32
+ tailwindFunctions: ['clsx', 'cn'],
33
+
28
34
  // workaround for https://github.com/changesets/changesets/issues/774
29
35
  overrides: [
30
36
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wkovacs64/prettier-config",
3
- "version": "3.0.2",
3
+ "version": "4.0.0",
4
4
  "description": "@wKovacs64 Prettier config",
5
5
  "keywords": [
6
6
  "prettier",
@@ -12,7 +12,13 @@
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
+ ".": {
19
+ "import": "./index.js"
20
+ }
21
+ },
16
22
  "files": [
17
23
  "index.js"
18
24
  ],
@@ -25,38 +31,31 @@
25
31
  "url": "https://github.com/wKovacs64/prettier-config/issues"
26
32
  },
27
33
  "scripts": {
28
- "cm": "git-cz",
29
- "format": "prettier --write .",
30
- "lint": "eslint --ext \".js,.jsx,.ts,.tsx\" .",
31
- "husky:install": "husky install",
32
- "prepare": "npm run --silent husky:install",
33
- "validate": "npm-run-all --silent --parallel lint"
34
- },
35
- "config": {
36
- "commitizen": {
37
- "path": "./node_modules/cz-conventional-changelog"
38
- }
34
+ "changeset": "changeset",
35
+ "changeset:version": "changeset version && npm install --package-lock-only",
36
+ "changeset:publish": "changeset publish",
37
+ "format": "prettier --cache --write .",
38
+ "format:check": "prettier --cache --check .",
39
+ "lint": "eslint ."
39
40
  },
40
41
  "private": false,
42
+ "prettier": "./index.js",
41
43
  "publishConfig": {
42
44
  "access": "public"
43
45
  },
44
46
  "engines": {
45
- "node": ">= 8.9.0"
47
+ "node": ">= 18"
48
+ },
49
+ "dependencies": {
50
+ "prettier-plugin-tailwindcss": "^0.6.1"
46
51
  },
47
- "dependencies": {},
48
52
  "devDependencies": {
49
- "@commitlint/cli": "16.2.3",
50
- "@commitlint/config-conventional": "16.2.1",
51
- "commitizen": "4.2.4",
53
+ "@changesets/changelog-github": "0.5.0",
54
+ "@changesets/cli": "2.27.5",
52
55
  "cross-env": "7.0.3",
53
- "cz-conventional-changelog": "3.3.0",
54
- "eslint": "7.32.0",
55
- "eslint-plugin-wkovacs64": "13.13.0",
56
- "husky": "7.0.4",
57
- "lint-staged": "12.4.1",
58
- "npm-run-all": "4.1.5",
59
- "prettier": "2.6.2",
60
- "semantic-release": "19.0.2"
56
+ "eslint": "8.57.0",
57
+ "eslint-plugin-wkovacs64": "16.2.0",
58
+ "npm-run-all2": "6.2.0",
59
+ "prettier": "3.3.0"
61
60
  }
62
61
  }