Skip to content

Commit 4b5fad9

Browse files
style(lib): upgrade prettier and fix lint
prettier ^1.19.1 → ^2.0.5 Update .prettierrc.json to ensure code style is still consistent. Fix lint for new rule: space after function.
1 parent 8e3d127 commit 4b5fad9

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

.prettierrc

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

.prettierrc.json

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

lib/attributes-to-props.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function cssToJs(style) {
7777
var styleObject = {};
7878

7979
if (style) {
80-
styleToObject(style, function(property, value) {
80+
styleToObject(style, function (property, value) {
8181
// skip CSS comment
8282
if (property && value) {
8383
styleObject[camelCase(property)] = value;

lib/utilities.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function camelCase(string) {
2121
// convert to camelCase
2222
return string
2323
.toLowerCase()
24-
.replace(hyphenPatternRegex, function(_, character) {
24+
.replace(hyphenPatternRegex, function (_, character) {
2525
return character.toUpperCase();
2626
});
2727
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"mocha": "^6.2.2",
5454
"nyc": "^14.1.1",
5555
"preact": "^10.0.4",
56-
"prettier": "^1.19.1",
56+
"prettier": "^2.0.5",
5757
"react": "^16",
5858
"react-dom": "^16",
5959
"rimraf": "^3.0.0",

0 commit comments

Comments
 (0)