eslint-plugin-haraka
Advanced tools
Comparing version 1.0.2 to 1.0.3
27
index.js
@@ -1,24 +0,3 @@ | ||
module.exports = { | ||
"env": { | ||
"node": true, | ||
"mocha": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"installedESLint": true, | ||
"root": true, | ||
"rules": { | ||
"comma-dangle": [2, "only-multiline"], | ||
"dot-notation": 2, | ||
"indent": [2, 2, {"SwitchCase": 1}], | ||
"one-var": [2, "never"], | ||
"no-trailing-spaces": [2, { "skipBlankLines": false }], | ||
"keyword-spacing": [2, { | ||
"before": true, | ||
"after": true | ||
}], | ||
"no-delete-var": 2, | ||
"no-label-var": 2, | ||
"no-shadow": 2, | ||
"no-unused-vars": [ 1, { "args": "none" }] | ||
} | ||
} | ||
var fs = require('fs'); | ||
module.exports = JSON.parse(fs.readFileSync('.eslintrc.json')); |
{ | ||
"name": "eslint-plugin-haraka", | ||
"version": "1.0.2", | ||
"description": "Eslint rules for Haraka projects", | ||
"version": "1.0.3", | ||
"description": "eslint rules for Haraka projects", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "eslint *.js" | ||
"test": "./node_modules/.bin/eslint *.js" | ||
}, | ||
@@ -9,0 +9,0 @@ "repository": { |
# haraka-eslint | ||
eslint rules for Haraka projects | ||
## Install | ||
In your Haraka plugin: | ||
1. Add to NPM dependencies: | ||
`npm install --save-dev eslint eslint-plugin-haraka` | ||
2. Install an eslint config file: | ||
`tee .eslintrc.json <<EOLINT | ||
{ | ||
"plugins": [ | ||
"haraka" | ||
] | ||
} | ||
` | ||
3. Add within the "scripts" section of `package.json`: | ||
` | ||
"lint": "./node_modules/.bin/eslint *.js test/**/*.js" | ||
"lintfix": "./node_modules/.bin/eslint --fix *.js test/**/*.js" | ||
` | ||
4. Add to the "script" section of .travis.yml: | ||
`npm run lint` | ||
## Usage | ||
To check your project against lint rules: | ||
`npm run lint` | ||
Step #4 above does this automatically when Travis is set up. | ||
If you agree with the lint suggestions, you can run `npm run lintfix` and the changes will be made to your files automatically. | ||
If you disagree, you can add custom rules to your .eslintrc.json file. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4322
8
36
27
1
1