Skip to content

Commit 43c6775

Browse files
Merge pull request #157 from remarkablemark/build/devDependencies
build: upgrade devDependencies
2 parents 598f9eb + 91fb693 commit 43c6775

13 files changed

+73
-63
lines changed

.eslintrc renamed to .eslintrc.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
},
1313
"plugins": ["prettier"],
1414
"rules": {
15+
"no-debugger": "error",
16+
"no-console": "error",
1517
"prettier/prettier": "error"
1618
}
1719
}

.huskyrc

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

.huskyrc.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"hooks": {
3+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
4+
"pre-commit": "npm run lint:dts && npm run test:coverage && lint-staged"
5+
}
6+
}

.lintstagedrc

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

.lintstagedrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"*.js": "npm run lint:fix",
3+
"*.{html,json,md,yml}": "prettier --write"
4+
}

.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+
}

index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ var domParserOptions = { decodeEntities: true, lowerCaseAttributeNames: false };
77
/**
88
* Converts HTML string to React elements.
99
*
10-
* @param {String} html - The HTML string to parse to React.
11-
* @param {Object} [options] - The parser options.
12-
* @param {Function} [options.replace] - The replace method.
13-
* @return {ReactElement|Array|String} - When parsed with HTML string, returns React elements; otherwise, returns string or empty array.
10+
* @param {String} html - The HTML string to parse to React.
11+
* @param {Object} [options] - The parser options.
12+
* @param {Function} [options.replace] - The replace method.
13+
* @return {JSX.Element|JSX.Element[]|String} - Returns React element(s), string, or empty array.
1414
*/
1515
function HTMLReactParser(html, options) {
1616
if (typeof html !== 'string') {
@@ -22,5 +22,6 @@ function HTMLReactParser(html, options) {
2222
HTMLReactParser.domToReact = domToReact;
2323
HTMLReactParser.htmlToDOM = htmlToDOM;
2424

25+
// support CommonJS and ES Modules
2526
module.exports = HTMLReactParser;
2627
module.exports.default = HTMLReactParser;

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
}

0 commit comments

Comments
 (0)