Skip to content

Commit 4f822b4

Browse files
committed
style: Reformat code with @hdnet/prettier-config
1 parent 7bef52d commit 4f822b4

File tree

7 files changed

+30
-35
lines changed

7 files changed

+30
-35
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ from the HDNET Standard Recommendations
66
using [prettier](https://prettier.io)
77
through a [shareable config](https://prettier.io/docs/en/configuration.html#sharing-configurations).
88

9-
109
## Getting started
1110

1211
1. Install dependencies
12+
1313
```bash
1414
$ npm i -D prettier @hdnet/prettier-config
1515
```
1616

1717
2. Create your prettier config file (i.e. `prettier.config.js`) and extend from @hdnet/prettier-config:
18+
1819
```javascript
1920
import hdnetPrettierConfig from '@hdnet/prettier-config'
2021

@@ -24,6 +25,7 @@ export default {
2425
```
2526

2627
## Notes
28+
2729
We explicitely parse .json files as JSON which differs from the behavior within prettier itself where certain files are assigned to JSON5 or JSONC.
2830

2931
## Contribute

commitlint.config.cjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module.exports = {
2-
extends: '@hdnet',
2+
extends: '@hdnet',
33

4-
parserPreset: {
5-
parserOpts: {
6-
issuePrefixes: ['#'],
7-
},
4+
parserPreset: {
5+
parserOpts: {
6+
issuePrefixes: ['#'],
87
},
8+
},
99
}

index.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
export default {
2-
arrowParens: 'avoid',
3-
bracketSameLine: false,
4-
bracketSpacing: true,
5-
printWidth: 120,
6-
tabWidth: 2,
7-
semi: false,
8-
singleQuote: true,
9-
trailingComma: 'all',
10-
useTabs: false,
11-
overrides: [
12-
{
13-
files: '*.json',
14-
options: {
15-
parser: 'json'
16-
}
17-
}
18-
]
2+
arrowParens: 'avoid',
3+
bracketSameLine: false,
4+
bracketSpacing: true,
5+
printWidth: 120,
6+
tabWidth: 2,
7+
semi: false,
8+
singleQuote: true,
9+
trailingComma: 'all',
10+
useTabs: false,
11+
overrides: [
12+
{
13+
files: '*.json',
14+
options: {
15+
parser: 'json',
16+
},
17+
},
18+
],
1919
}

package-lock.json

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,13 @@
44
"description": "HDNET prettier-config, implementing HSR-15",
55
"author": "HDNET",
66
"type": "module",
7-
"keywords": [
8-
"prettier",
9-
"hdnet",
10-
"HSR"
11-
],
7+
"keywords": ["prettier", "hdnet", "HSR"],
128
"repository": {
139
"type": "git",
1410
"url": "https://github.com/HDNET/prettier-config.git"
1511
},
1612
"main": "index.js",
17-
"files": [
18-
"index.js"
19-
],
13+
"files": ["index.js"],
2014
"scripts": {
2115
"prepare": "husky"
2216
},

package.json.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
> requiring explanation.
55
66
- [scripts](https://docs.npmjs.com/cli/v7/configuring-npm/package-json#scripts)
7-
- `prepare` Installs git hooks with husky.
7+
- `prepare` Installs git hooks with husky.

prettier.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from './index.js'

0 commit comments

Comments
 (0)