@anolilab/prettier-config 2.0.2 → 2.0.6
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/CHANGELOG.md +28 -0
- package/README.md +77 -0
- package/{index.js → index.cjs} +6 -3
- package/lib/postinstall.js +1 -1
- package/package.json +19 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
### @anolilab/prettier-config [2.0.6](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/prettier-config@2.0.5...@anolilab/prettier-config@2.0.6) (2022-01-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* added ts-check to the prettier config ([6d03d06](https://github.com/anolilab/javascript-style-guide/commit/6d03d067f6b26176c449ab3ac1175dbd2b99a0f4))
|
|
7
|
+
|
|
8
|
+
### @anolilab/prettier-config [2.0.5](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/prettier-config@2.0.4...@anolilab/prettier-config@2.0.5) (2021-12-30)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* changed file to cjs ([a75b530](https://github.com/anolilab/javascript-style-guide/commit/a75b530461d6007464e290f8c6d1149630d8a03b))
|
|
14
|
+
|
|
15
|
+
### @anolilab/prettier-config [2.0.4](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/prettier-config@2.0.3...@anolilab/prettier-config@2.0.4) (2021-09-02)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* added funding to the package ([f90d18f](https://github.com/anolilab/javascript-style-guide/commit/f90d18f8347a4bdc395b1740c85ac74a4072297c))
|
|
21
|
+
|
|
22
|
+
### @anolilab/prettier-config [2.0.3](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/prettier-config@2.0.2...@anolilab/prettier-config@2.0.3) (2021-09-02)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* fixed release flow in all packages ([8c5ec13](https://github.com/anolilab/javascript-style-guide/commit/8c5ec1341e11ccf48d8d3e8f8808fb162d062d97))
|
|
28
|
+
|
|
1
29
|
### @anolilab/prettier-config [2.0.2](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/prettier-config@2.0.1...@anolilab/prettier-config@2.0.2) (2021-08-17)
|
|
2
30
|
|
|
3
31
|
|
package/README.md
CHANGED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Prettier shareable configuration
|
|
2
|
+
|
|
3
|
+
Anolilab Coding Standard for semantic-release.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
<div align="center">
|
|
8
|
+
<p>
|
|
9
|
+
<sup>
|
|
10
|
+
Daniel Bannert's open source work is supported by the community on <a href="https://github.com/sponsors/prisis">GitHub Sponsors</a>
|
|
11
|
+
</sup>
|
|
12
|
+
</p>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install --dev-save @anolilab/prettier-config
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
If you don’t have a `.prettierrc.cjs` and `.prettierignore`, we will create the file for you after installing `@anolilab/prettier-config`.
|
|
26
|
+
|
|
27
|
+
If you already have a `.prettierrc.cjs` and `.prettierignore`, then you can extend the `.prettierrc.cjs`, with `@anolilab/prettier-config`.
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
module.exports = {
|
|
31
|
+
"printWidth": 120,
|
|
32
|
+
"tabWidth": 4,
|
|
33
|
+
"useTabs": false,
|
|
34
|
+
"semi": true,
|
|
35
|
+
"singleQuote": false,
|
|
36
|
+
"quoteProps": "as-needed",
|
|
37
|
+
"jsxSingleQuote": false,
|
|
38
|
+
"trailingComma": "all",
|
|
39
|
+
"bracketSpacing": true,
|
|
40
|
+
"jsxBracketSameLine": false,
|
|
41
|
+
"arrowParens": "always",
|
|
42
|
+
"rangeStart": 0,
|
|
43
|
+
"rangeEnd": Infinity,
|
|
44
|
+
"requirePragma": false,
|
|
45
|
+
"insertPragma": false,
|
|
46
|
+
"proseWrap": "preserve",
|
|
47
|
+
"htmlWhitespaceSensitivity": "css",
|
|
48
|
+
"vueIndentScriptAndStyle": false,
|
|
49
|
+
"endOfLine": "lf",
|
|
50
|
+
"embeddedLanguageFormatting": "auto"
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Supported Node.js Versions
|
|
56
|
+
|
|
57
|
+
Libraries in this ecosystem make the best effort to track
|
|
58
|
+
[Node.js' release schedule](https://nodejs.org/en/about/releases/). Here's [a
|
|
59
|
+
post on why we think this is important](https://medium.com/the-node-js-collection/maintainers-should-consider-following-node-js-release-schedule-ab08ed4de71a).
|
|
60
|
+
|
|
61
|
+
Contributing
|
|
62
|
+
------------
|
|
63
|
+
|
|
64
|
+
If you would like to help take a look at the [list of issues](https://github.com/anolilab/javascript-style-guide/issues) and check our [Contributing](.github/CONTRIBUTING.md) guild.
|
|
65
|
+
|
|
66
|
+
> **Note:** please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
|
|
67
|
+
|
|
68
|
+
Credits
|
|
69
|
+
-------------
|
|
70
|
+
|
|
71
|
+
- [Daniel Bannert](https://github.com/prisis)
|
|
72
|
+
- [All Contributors](https://github.com/anolilab/javascript-style-guide/graphs/contributors)
|
|
73
|
+
|
|
74
|
+
License
|
|
75
|
+
-------------
|
|
76
|
+
|
|
77
|
+
The anolilab javascript-style-guide is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT)
|
package/{index.js → index.cjs}
RENAMED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @type {import('prettier').Options}
|
|
5
|
+
*/
|
|
6
|
+
module.exports = {
|
|
2
7
|
// max 120 characters per line
|
|
3
8
|
printWidth: 120,
|
|
4
9
|
// use 2 spaces for indentation
|
|
@@ -17,8 +22,6 @@ export default {
|
|
|
17
22
|
trailingComma: "all",
|
|
18
23
|
// spaces are required at the beginning and end of the braces
|
|
19
24
|
bracketSpacing: true,
|
|
20
|
-
// end tag of jsx need to wrap
|
|
21
|
-
jsxBracketSameLine: false,
|
|
22
25
|
// brackets are required for arrow function parameter, even when there is only one parameter
|
|
23
26
|
arrowParens: "always",
|
|
24
27
|
// format the entire contents of the file
|
package/lib/postinstall.js
CHANGED
|
@@ -7,7 +7,7 @@ if (process.env.CI) {
|
|
|
7
7
|
import { writeFile, existsSync } from 'fs';
|
|
8
8
|
import { resolve, join } from 'path';
|
|
9
9
|
import { promisify } from 'util';
|
|
10
|
-
import content from '../index.
|
|
10
|
+
import content from '../index.cjs';
|
|
11
11
|
|
|
12
12
|
const writeFileAsync = promisify(writeFile);
|
|
13
13
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anolilab/prettier-config",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "Prettier shareable config for Anolilab.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -10,18 +10,32 @@
|
|
|
10
10
|
"config",
|
|
11
11
|
"prettier-config"
|
|
12
12
|
],
|
|
13
|
-
"homepage": "
|
|
14
|
-
"repository":
|
|
13
|
+
"homepage": "https://anolilab.com/nodejs/packages/prettier-config",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/anolilab/javascript-style-guide.git",
|
|
17
|
+
"directory": "packages/prettier-config"
|
|
18
|
+
},
|
|
19
|
+
"funding": [
|
|
20
|
+
{
|
|
21
|
+
"type": "github",
|
|
22
|
+
"url": "https://github.com/sponsors/prisis"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"type": "consulting",
|
|
26
|
+
"url": "https://anolilab.com/support"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
15
29
|
"license": "MIT",
|
|
16
30
|
"author": {
|
|
17
31
|
"name": "Daniel Bannert",
|
|
18
32
|
"email": "d.bannert@anolilab.de"
|
|
19
33
|
},
|
|
20
34
|
"type": "module",
|
|
21
|
-
"main": "index.
|
|
35
|
+
"main": "index.cjs",
|
|
22
36
|
"files": [
|
|
23
37
|
"lib",
|
|
24
|
-
"index.
|
|
38
|
+
"index.cjs",
|
|
25
39
|
"README.md",
|
|
26
40
|
"CHANGELOG.md",
|
|
27
41
|
"LICENSE.md"
|