@wkovacs64/prettier-config 1.0.2 → 3.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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @wkovacs64/prettier-config
2
2
 
3
- This is my personal Prettier configuration.
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
6
  [![semantic-release][semantic-release-image]][semantic-release-url]
@@ -8,24 +8,23 @@ This is my personal Prettier configuration.
8
8
  ### Install
9
9
 
10
10
  ```
11
- yarn add --dev prettier @wkovacs64/prettier-config
11
+ npm install --save-dev prettier @wkovacs64/prettier-config
12
12
  ```
13
13
 
14
14
  ### Usage
15
15
 
16
- Installing this package will attempt to copy a default `prettier.config.js` and
17
- `.prettierignore` into your project if they do not already exist.
16
+ Follow the Prettier documentation on [sharing configurations][prettier-sharing].
18
17
 
19
- They look like this:
18
+ ### Examples
20
19
 
21
20
  #### `prettier.config.js`
22
21
 
23
22
  ```js
24
- // eslint-disable-next-line import/no-extraneous-dependencies
25
23
  const prettierConfig = require('@wkovacs64/prettier-config');
26
24
 
27
25
  module.exports = {
28
26
  ...prettierConfig,
27
+ // overrides here
29
28
  };
30
29
  ```
31
30
 
@@ -35,6 +34,18 @@ module.exports = {
35
34
  package.json
36
35
  ```
37
36
 
37
+ #### `package.json`
38
+
39
+ ```
40
+ {
41
+ "scripts": {
42
+ ...
43
+ "format": "prettier --write .",
44
+ ...
45
+ }
46
+ }
47
+ ```
48
+
38
49
  [npm-image]:
39
50
  https://img.shields.io/npm/v/@wkovacs64/prettier-config.svg?style=flat-square
40
51
  [npm-url]: https://www.npmjs.com/package/@wkovacs64/prettier-config
@@ -44,3 +55,6 @@ package.json
44
55
  [semantic-release-image]:
45
56
  https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square
46
57
  [semantic-release-url]: https://github.com/semantic-release/semantic-release
58
+ [prettier]: https://prettier.io/
59
+ [prettier-sharing]:
60
+ https://prettier.io/docs/en/configuration.html#sharing-configurations
package/index.js CHANGED
@@ -2,21 +2,23 @@ module.exports = {
2
2
  $schema: 'http://json.schemastore.org/prettierrc',
3
3
 
4
4
  // defaults
5
- arrowParens: 'avoid',
5
+ arrowParens: 'always',
6
+ bracketSameLine: false,
6
7
  bracketSpacing: true,
7
- endOfLine: 'auto',
8
- jsxBracketSameLine: false,
9
- jsxSingleQuote: false,
8
+ embeddedLanguageFormatting: 'auto',
9
+ endOfLine: 'lf',
10
10
  htmlWhitespaceSensitivity: 'css',
11
- rangeStart: 0,
12
- rangeEnd: Infinity,
13
- requirePragma: false,
14
11
  insertPragma: false,
12
+ jsxSingleQuote: false,
15
13
  printWidth: 80,
16
14
  quoteProps: 'as-needed',
15
+ rangeEnd: Infinity,
16
+ rangeStart: 0,
17
+ requirePragma: false,
17
18
  semi: true,
18
19
  tabWidth: 2,
19
20
  useTabs: false,
21
+ vueIndentScriptAndStyle: false,
20
22
 
21
23
  // customized
22
24
  proseWrap: 'always',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wkovacs64/prettier-config",
3
- "version": "1.0.2",
3
+ "version": "3.0.1",
4
4
  "description": "@wKovacs64 Prettier config",
5
5
  "keywords": [
6
6
  "prettier",
@@ -14,8 +14,6 @@
14
14
  "license": "MIT",
15
15
  "main": "index.js",
16
16
  "files": [
17
- "lib",
18
- "scripts",
19
17
  "index.js"
20
18
  ],
21
19
  "homepage": "https://github.com/wKovacs64/prettier-config#readme",
@@ -28,9 +26,10 @@
28
26
  },
29
27
  "scripts": {
30
28
  "cm": "git-cz",
31
- "format": "prettier --write \"**/*.{js,ts,tsx,html,json,md,yml,yaml}\"",
32
- "lint": "eslint --ext \".js,.ts,.tsx\" .",
33
- "postinstall": "node ./scripts/postinstall.js",
29
+ "format": "prettier --write .",
30
+ "lint": "eslint --ext \".js,.jsx,.ts,.tsx\" .",
31
+ "husky:install": "husky install",
32
+ "prepare": "npm run --silent husky:install",
34
33
  "validate": "npm-run-all --silent --parallel lint"
35
34
  },
36
35
  "config": {
@@ -45,24 +44,19 @@
45
44
  "engines": {
46
45
  "node": ">= 8.9.0"
47
46
  },
48
- "dependencies": {
49
- "cpy": "7.3.0"
50
- },
47
+ "dependencies": {},
51
48
  "devDependencies": {
52
- "@commitlint/cli": "8.0.0",
53
- "@commitlint/config-conventional": "8.0.0",
54
- "@wkovacs64/eslint-config": "5.0.0",
55
- "commitizen": "3.1.1",
56
- "cross-env": "5.2.0",
57
- "cz-conventional-changelog": "2.1.0",
58
- "eslint": "5.16.0",
59
- "eslint-plugin-import": "2.18.0",
60
- "eslint-plugin-jest": "22.7.1",
61
- "husky": "2.7.0",
62
- "lint-staged": "8.2.1",
49
+ "@commitlint/cli": "16.2.3",
50
+ "@commitlint/config-conventional": "16.2.1",
51
+ "commitizen": "4.2.4",
52
+ "cross-env": "7.0.3",
53
+ "cz-conventional-changelog": "3.3.0",
54
+ "eslint": "7.32.0",
55
+ "eslint-plugin-wkovacs64": "13.12.0",
56
+ "husky": "7.0.4",
57
+ "lint-staged": "12.3.7",
63
58
  "npm-run-all": "4.1.5",
64
- "prettier": "1.18.2",
65
- "rimraf": "2.6.3",
66
- "semantic-release": "15.13.18"
59
+ "prettier": "2.6.2",
60
+ "semantic-release": "19.0.2"
67
61
  }
68
62
  }
package/CHANGELOG.md DELETED
@@ -1,5 +0,0 @@
1
- # Change Log
2
-
3
- The changelog is automatically updated using
4
- [semantic-release](https://github.com/semantic-release/semantic-release). You
5
- can see it on the [releases page](../../releases).
@@ -1 +0,0 @@
1
- package.json
@@ -1,6 +0,0 @@
1
- // eslint-disable-next-line import/no-extraneous-dependencies
2
- const prettierConfig = require('@wkovacs64/prettier-config');
3
-
4
- module.exports = {
5
- ...prettierConfig,
6
- };
@@ -1,8 +0,0 @@
1
- const cpy = require('cpy');
2
-
3
- const prefix = 'default-';
4
-
5
- cpy(['lib/*'], process.env.INIT_CWD, {
6
- rename: basename => basename.slice(prefix.length),
7
- overwrite: false,
8
- });