Skip to content

Commit 8cb268f

Browse files
committed
feat: update prettier rules/config
1 parent cd1eb4b commit 8cb268f

File tree

12 files changed

+41
-31
lines changed

12 files changed

+41
-31
lines changed

.editorconfig

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
root = true
22

3-
[*.js]
4-
indent_size = 2
5-
indent_style = space
3+
[*]
4+
charset = utf-8
65
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
max_line_length = 80
10+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
.DS_Store
2-
node_modules/
2+
._.DS_Store
3+
Thumbs.db
4+
/.env
5+
/.nvm
6+
/.vscode
7+
/npm-debug.log
8+
/yarn.lock
9+
**/node_modules

.prettierignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# Ignore artifacts:
1+
.github/
22
*.json
3-
*.xml
4-
*.yml
53
*.md

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"arrowParens": "avoid",
3+
"semi": false,
4+
"singleQuote": true,
5+
"trailingComma": "none",
6+
"proseWrap": "always"
7+
}

.prettierrc.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

package-lock.json

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

src/package-url.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ class PackageURL {
232232
let rawQualifiers
233233
const { searchParams } = url
234234
if (searchParams.size !== 0) {
235-
searchParams.forEach((value) =>
235+
searchParams.forEach(value =>
236236
decodePurlComponent('qualifiers', value)
237237
)
238238
// Split the remainder once from right on '?'.

src/purl-component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ const {
3232
validateSubpath
3333
} = require('./validate')
3434

35-
const PurlComponentEncoder = (comp) =>
35+
const PurlComponentEncoder = comp =>
3636
isNonEmptyString(comp) ? encodeURIComponent(comp) : ''
3737

38-
const PurlComponentStringNormalizer = (comp) =>
38+
const PurlComponentStringNormalizer = comp =>
3939
typeof comp === 'string' ? comp : undefined
4040

4141
const PurlComponentValidator = (_comp, _throws) => true

src/purl-type.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const {
1616
const { validateEmptyByType, validateRequiredByType } = require('./validate')
1717
const { PurlError } = require('./error')
1818

19-
const PurlTypNormalizer = (purl) => purl
19+
const PurlTypNormalizer = purl => purl
2020

2121
const PurlTypeValidator = (_purl, _throws) => true
2222

0 commit comments

Comments
 (0)