@wkovacs64/prettier-config 2.0.0 → 3.0.2
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 +20 -6
- package/index.js +24 -6
- package/package.json +17 -21
- package/CHANGELOG.md +0 -5
- package/lib/default-.prettierignore +0 -1
- package/lib/default-prettier.config.js +0 -6
- package/scripts/postinstall.js +0 -8
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
|
-
|
|
11
|
+
npm install --save-dev prettier @wkovacs64/prettier-config
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
### Usage
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
`.prettierignore` into your project if they do not already exist.
|
|
16
|
+
Follow the Prettier documentation on [sharing configurations][prettier-sharing].
|
|
18
17
|
|
|
19
|
-
|
|
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
|
@@ -3,23 +3,41 @@ module.exports = {
|
|
|
3
3
|
|
|
4
4
|
// defaults
|
|
5
5
|
arrowParens: 'always',
|
|
6
|
+
bracketSameLine: false,
|
|
6
7
|
bracketSpacing: true,
|
|
8
|
+
embeddedLanguageFormatting: 'auto',
|
|
7
9
|
endOfLine: 'lf',
|
|
8
|
-
jsxBracketSameLine: false,
|
|
9
|
-
jsxSingleQuote: false,
|
|
10
10
|
htmlWhitespaceSensitivity: 'css',
|
|
11
|
-
rangeStart: 0,
|
|
12
|
-
rangeEnd: Infinity,
|
|
13
|
-
requirePragma: false,
|
|
14
11
|
insertPragma: false,
|
|
12
|
+
jsxSingleQuote: false,
|
|
15
13
|
printWidth: 80,
|
|
14
|
+
proseWrap: 'preserve',
|
|
16
15
|
quoteProps: 'as-needed',
|
|
16
|
+
rangeEnd: Infinity,
|
|
17
|
+
rangeStart: 0,
|
|
18
|
+
requirePragma: false,
|
|
17
19
|
semi: true,
|
|
18
20
|
tabWidth: 2,
|
|
19
21
|
useTabs: false,
|
|
22
|
+
vueIndentScriptAndStyle: false,
|
|
20
23
|
|
|
21
24
|
// customized
|
|
22
|
-
proseWrap: 'always',
|
|
23
25
|
singleQuote: true,
|
|
24
26
|
trailingComma: 'all',
|
|
27
|
+
|
|
28
|
+
// workaround for https://github.com/changesets/changesets/issues/774
|
|
29
|
+
overrides: [
|
|
30
|
+
{
|
|
31
|
+
files: ['*.md', '*.mdx'],
|
|
32
|
+
options: {
|
|
33
|
+
proseWrap: 'always',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
files: ['**/.changeset/*.md', 'CHANGELOG.md'],
|
|
38
|
+
options: {
|
|
39
|
+
proseWrap: 'never',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
],
|
|
25
43
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wkovacs64/prettier-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.2",
|
|
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
|
|
32
|
-
"lint": "eslint --ext \".js,.ts,.tsx\" .",
|
|
33
|
-
"
|
|
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,22 +44,19 @@
|
|
|
45
44
|
"engines": {
|
|
46
45
|
"node": ">= 8.9.0"
|
|
47
46
|
},
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"cpy": "8.1.0"
|
|
50
|
-
},
|
|
47
|
+
"dependencies": {},
|
|
51
48
|
"devDependencies": {
|
|
52
|
-
"@commitlint/cli": "
|
|
53
|
-
"@commitlint/config-conventional": "
|
|
54
|
-
"commitizen": "4.
|
|
55
|
-
"cross-env": "7.0.
|
|
56
|
-
"cz-conventional-changelog": "3.
|
|
57
|
-
"eslint": "
|
|
58
|
-
"eslint-plugin-wkovacs64": "
|
|
59
|
-
"husky": "
|
|
60
|
-
"lint-staged": "
|
|
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.13.0",
|
|
56
|
+
"husky": "7.0.4",
|
|
57
|
+
"lint-staged": "12.4.1",
|
|
61
58
|
"npm-run-all": "4.1.5",
|
|
62
|
-
"prettier": "2.
|
|
63
|
-
"
|
|
64
|
-
"semantic-release": "17.0.4"
|
|
59
|
+
"prettier": "2.6.2",
|
|
60
|
+
"semantic-release": "19.0.2"
|
|
65
61
|
}
|
|
66
62
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
package.json
|