Skip to content

Commit f4c832d

Browse files
author
Mike Shaw
committed
feat: move husky config to separate file
Signed-off-by: Mike Shaw <mike.shaw@dwp.gsi.gov.uk>
1 parent 5ae3cba commit f4c832d

File tree

3 files changed

+70
-62
lines changed

3 files changed

+70
-62
lines changed

.editorconfig

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ root = true
33
[*]
44
charset = utf-8
55
end_of_line = lf
6-
indent_size = 4
6+
indent_size = 2
77
indent_style = space
88
insert_final_newline = true
99
trim_trailing_whitespace = true
1010

1111
[*.md]
1212
trim_trailing_whitespace = false
13-

.huskyrc.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
"hooks": {
3+
"commit-msg": "commitlint --edit",
4+
"pre-commit": "lint-staged"
5+
}
6+
}

package.json

+63-60
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,66 @@
11
{
2-
"name": "@dwp/eslint-config-mocha",
3-
"version": "1.0.0",
4-
"author": "Adam Moss & Mike Shaw",
5-
"license": "ISC",
6-
"description": "mocha configuration for eslint",
7-
"keywords": [
8-
"config",
9-
"shareable-config",
10-
"eslint",
11-
"lint",
12-
"mocha"
13-
],
14-
"homepage": "https://github.com/dwp/eslint-config-mocha",
15-
"repository": {
16-
"type": "git",
17-
"url": "git+ssh://git@github.com:dwp/eslint-config-mocha.git"
18-
},
19-
"bugs": {
20-
"url": "https://github.com/dwp/eslint-config-mocha/issues"
21-
},
22-
"files": [
23-
"src/**",
24-
"tests/.eslintrc.json"
25-
],
26-
"main": "src/index.js",
27-
"scripts": {
28-
"precommit": "lint-staged",
29-
"commitmsg": "commitlint --edit",
30-
"test": "npm run pipeline",
31-
"pipeline": "npm run compliance-tests && npm run security-tests && npm run unit-tests && npm run quality-tests",
32-
"compliance-tests": "npm run compliance:commitlint && npm run compliance:eslint",
33-
"compliance:commitlint": "commitlint --from=develop --to=HEAD",
34-
"compliance:eslint": "eslint --ignore-path .gitignore .",
35-
"security-tests": "npm run security:outdated && npm run security:nsp",
36-
"security:outdated": "npm outdated || true",
37-
"security:nsp": "nsp check #",
38-
"security:snyk": "snyk test -dev",
39-
"unit-tests": "npm run unit:test",
40-
"unit:test": "nyc --report-dir .coverage/unit mocha ./tests/**/*.spec.js",
41-
"quality-tests": "npm run quality:sonarjs",
42-
"quality:sonarjs": "sonarjs -e 'tests/**'",
43-
"quality:sonar-scanner": "sonar-scanner"
44-
},
45-
"dependencies": {
46-
"eslint-plugin-mocha": "5.2.0"
47-
},
48-
"devDependencies": {
49-
"@commitlint/cli": "7.2.1",
50-
"@dwp/commitlint-config-base": "1.0.0",
51-
"@dwp/eslint-config-base": "2.0.1",
52-
"@dwp/nyc-config-base": "1.0.0",
53-
"chai": "4.2.0",
54-
"eslint": "5.9.0",
55-
"husky": "1.2.0",
56-
"lint-staged": "8.1.0",
57-
"mocha": "5.2.0",
58-
"nsp": "3.2.1",
59-
"nyc": "13.1.0",
60-
"snyk": "1.116.2",
61-
"sonarjs": "1.0.0"
2+
"name": "@dwp/eslint-config-mocha",
3+
"version": "1.0.0",
4+
"author": "Mike Shaw",
5+
"contributors": [
6+
{
7+
"name": "Adam Moss"
628
}
9+
],
10+
"license": "ISC",
11+
"description": "mocha configuration for eslint",
12+
"keywords": [
13+
"config",
14+
"shareable-config",
15+
"eslint",
16+
"lint",
17+
"mocha"
18+
],
19+
"homepage": "https://github.com/dwp/eslint-config-mocha",
20+
"repository": {
21+
"type": "git",
22+
"url": "git+ssh://git@github.com:dwp/eslint-config-mocha.git"
23+
},
24+
"bugs": {
25+
"url": "https://github.com/dwp/eslint-config-mocha/issues"
26+
},
27+
"files": [
28+
"src/**",
29+
"tests/.eslintrc.json"
30+
],
31+
"main": "src/index.js",
32+
"scripts": {
33+
"test": "npm run pipeline",
34+
"pipeline": "npm run compliance-tests && npm run security-tests && npm run unit-tests && npm run quality-tests",
35+
"compliance-tests": "npm run compliance:commitlint && npm run compliance:eslint",
36+
"compliance:commitlint": "commitlint --from=develop --to=HEAD",
37+
"compliance:eslint": "eslint --ignore-path .gitignore .",
38+
"security-tests": "npm run security:outdated && npm run security:nsp",
39+
"security:outdated": "npm outdated || true",
40+
"security:nsp": "nsp check #",
41+
"security:snyk": "snyk test -dev",
42+
"unit-tests": "npm run unit:test",
43+
"unit:test": "nyc --report-dir .coverage/unit mocha ./tests/**/*.spec.js",
44+
"quality-tests": "npm run quality:sonarjs",
45+
"quality:sonarjs": "sonarjs -e 'tests/**'",
46+
"quality:sonar-scanner": "sonar-scanner"
47+
},
48+
"dependencies": {
49+
"eslint-plugin-mocha": "5.2.0"
50+
},
51+
"devDependencies": {
52+
"@commitlint/cli": "7.2.1",
53+
"@dwp/commitlint-config-base": "1.0.0",
54+
"@dwp/eslint-config-base": "2.0.1",
55+
"@dwp/nyc-config-base": "1.0.0",
56+
"chai": "4.2.0",
57+
"eslint": "5.9.0",
58+
"husky": "1.2.0",
59+
"lint-staged": "8.1.0",
60+
"mocha": "5.2.0",
61+
"nsp": "3.2.1",
62+
"nyc": "13.1.0",
63+
"snyk": "1.116.2",
64+
"sonarjs": "1.0.0"
65+
}
6366
}

0 commit comments

Comments
 (0)