Add pre-commit hook for standard linter

This commit is contained in:
Christoph Diehl 2018-01-22 22:30:40 +01:00
parent ab97313acb
commit 94938bda28
3 changed files with 84 additions and 52 deletions

View File

@ -1,5 +1,5 @@
module.exports = function (config) {
var configuration = {
let configuration = {
basePath: './tests',
frameworks: ['qunit'],
@ -46,15 +46,15 @@ module.exports = function(config) {
coverageReporter: {
reporters: [
{ type: "lcov", dir: "coverage/" },
{ type: 'lcov', dir: 'coverage/' },
{ type: 'text-summary' }
]
},
};
if (process.env.TRAVIS) {
configuration.browsers = ['Chrome_travis_ci', 'Firefox'];
}
}
config.set(configuration);
};
if (process.env.TRAVIS) {
configuration.browsers = ['Chrome_travis_ci', 'Firefox']
}
config.set(configuration)
}

View File

@ -1,10 +1,49 @@
{
"name": "octo",
"description": "",
"keywords": [
"fuzzing", "browsers"
],
"homepage": "https://github.com/mozillasecurity/octo",
"repository": {
"type": "git",
"url": "https://github.com/mozillasecurity/octo.git"
},
"bugs": {
"url": "https://github.com/mozillasecurity/octo/issues",
"email": "cdiehl@mozilla.com"
},
"author": "Christoph Diehl <cdiehl@mozilla.com>",
"license": "MPL-2.0",
"scripts": {
"test": "grunt test --verbose",
"test:lint": "cross-env NODE_ENV=test standard --verbose"
},
"standard": {
"ignore": [
"tests/**"
],
"globals": [
"random",
"make",
"utils",
"logger",
"MersenneTwister",
"o",
"btoa",
"atob"
],
"envs": [
"browser"
]
},
"devDependencies": {
"cross-env": "^5.1.3",
"grunt": "*",
"grunt-karma": "*",
"grunt-karma-coveralls": "*",
"grunt-standard": "*",
"husky": "^0.14.3",
"karma": "*",
"karma-chrome-launcher": "*",
"karma-coverage": "*",
@ -12,12 +51,5 @@
"karma-qunit": "*",
"qunitjs": "*",
"standard": "*"
},
"scripts": {
"test": "grunt test --verbose"
},
"standard": {
"globals": ["random", "make", "utils", "logger", "MersenneTwister", "o", "btoa", "atob"],
"envs": ["browser"]
}
}