Skip to content

Commit

Permalink
chore: Git precommit hook to format JS files
Browse files Browse the repository at this point in the history
nzakas committed Mar 25, 2022
1 parent f69290f commit e2ae2ee
Showing 3 changed files with 1,567 additions and 21 deletions.
1,577 changes: 1,558 additions & 19 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -25,13 +25,21 @@
"url": "https://github.com/nodesecurity/eslint-plugin-security/issues"
},
"homepage": "https://github.com/nodesecurity/eslint-plugin-security#readme",
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.js": "eslint --fix"
},
"dependencies": {
"safe-regex": "^2.1.1"
},
"devDependencies": {
"changelog": "1.3.0",
"eslint": "^8.11.0",
"eslint-config-nodesecurity": "^1.3.1",
"mocha": "^9.2.2"
"lint-staged": "^12.3.7",
"mocha": "^9.2.2",
"yorkie": "^2.0.0"
}
}
1 change: 0 additions & 1 deletion test/detect-non-literal-require.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,6 @@ const tester = new RuleTester();
const ruleName = 'detect-non-literal-require';
const invalid = 'var a = require(c)';


tester.run(ruleName, require(`../rules/${ruleName}`), {
valid: [{ code: 'var a = require(\'b\')' }],
invalid: [

0 comments on commit e2ae2ee

Please sign in to comment.