Skip to content

Commit a326109

Browse files
Merge pull request #46 from remarkablemark/chore-package
Set up standard-version, commitlint, and upgrade package dependencies
2 parents b51a729 + 2d35a1f commit a326109

File tree

6 files changed

+42
-49
lines changed

6 files changed

+42
-49
lines changed

.commitlintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc

Lines changed: 16 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,18 @@
11
{
2-
"env": {
3-
"node": true,
4-
"browser": true,
5-
"mocha": true,
6-
"commonjs": true
7-
},
8-
9-
"extends": "eslint:recommended",
10-
11-
"rules": {
12-
"indent": [
13-
"error",
14-
4,
15-
{ "SwitchCase": 1 }
16-
],
17-
"linebreak-style": [
18-
"error",
19-
"unix"
20-
],
21-
"quotes": [
22-
"error",
23-
"single"
24-
],
25-
"semi": [
26-
"error",
27-
"always"
28-
],
29-
"no-unused-vars": [
30-
"error",
31-
{ "vars": "all", "args": "none" }
32-
],
33-
"strict": 2,
34-
"no-cond-assign": 2,
35-
"camelcase": 1
36-
}
2+
"env": {
3+
"node": true,
4+
"browser": true,
5+
"mocha": true,
6+
"commonjs": true
7+
},
8+
"extends": "eslint:recommended",
9+
"rules": {
10+
"indent": ["error", 4, { "SwitchCase": 1 }],
11+
"linebreak-style": ["error", "unix"],
12+
"quotes": ["error", "single"],
13+
"semi": ["error", "always"],
14+
"no-unused-vars": ["error", { "vars": "all", "args": "none" }],
15+
"no-cond-assign": 2,
16+
"camelcase": 1
17+
}
3718
}

.npmignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
test
1+
benchmarks
22
coverage
33
examples
4+
test
45
webpack.config.js
5-
CHANGELOG.md
6+
.commitlintrc*
67
.eslint*
8+
.npm*
79
.travis*
8-
.npmignore

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
save-exact=true
2+
package-lock=false

package.json

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@
55
"author": "Mark <mark@remarkablemark.org>",
66
"main": "index.js",
77
"scripts": {
8-
"build-unmin": "NODE_ENV=development webpack index.js dist/html-react-parser.js",
9-
"build-min": "NODE_ENV=production webpack -p index.js dist/html-react-parser.min.js",
8+
"build:unmin": "NODE_ENV=development webpack index.js dist/html-react-parser.js",
9+
"build:min": "NODE_ENV=production webpack -p index.js dist/html-react-parser.min.js",
1010
"clean": "rm -rf dist",
11-
"prepublish": "npm run clean && npm run build-unmin && npm run build-min",
12-
"test": "mocha",
13-
"lint": "eslint index.js \"lib/**\" \"test/**\"",
11+
"commitmsg": "commitlint -e $GIT_PARAMS",
1412
"cover": "istanbul cover _mocha -- -R spec \"test/**/*\"",
15-
"coveralls": "cat coverage/lcov.info | coveralls"
13+
"coveralls": "cat coverage/lcov.info | coveralls",
14+
"lint": "eslint --ignore-path .gitignore .",
15+
"lint:fix": "npm run lint -- --fix",
16+
"prepublishOnly": "npm run clean && npm run build:unmin && npm run build:min",
17+
"release": "standard-version --no-verify",
18+
"test": "mocha"
1619
},
1720
"repository": {
1821
"type": "git",
@@ -34,13 +37,17 @@
3437
"style-to-object": "0.2.0"
3538
},
3639
"devDependencies": {
37-
"coveralls": "^2.13.1",
38-
"eslint": "^4.1.1",
40+
"@commitlint/cli": "^5.2.3",
41+
"@commitlint/config-conventional": "^5.2.3",
42+
"coveralls": "^3.0.0",
43+
"eslint": "^4.12.0",
44+
"husky": "^0.14.3",
3945
"istanbul": "^0.4.5",
40-
"mocha": "^3.4.2",
46+
"mocha": "^4.0.1",
4147
"react": "^16",
4248
"react-dom": "^16",
43-
"webpack": "^3.0.0"
49+
"standard-version": "^4.2.0",
50+
"webpack": "^3.8.1"
4451
},
4552
"peerDependencies": {
4653
"react": "^0.14 || ^15 || ^16"

0 commit comments

Comments
 (0)