Skip to content

Repository to install ESLint, plugins and js-beautify.

License

Notifications You must be signed in to change notification settings

parsiya/eslint-security

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-security

Repository to install ESLint, plugins and js-beautify.

For more information please see:

Usage

  1. git clone https://github.com/parsiya/eslint-security
  2. npm install
  3. Access ESLint: node_modules/.bin/eslint, access js-beautify: node_modules/.bin/js-beautify.

Replicate the Installation

npm i --save eslint eslint-plugin-standard eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-config-standard eslint-config-semistandard eslint-plugin-scanjs-rules eslint-plugin-no-unsanitized eslint-plugin-prototype-pollution-security-rules eslint-plugin-angularjs-security-rules eslint-plugin-react eslint-plugin-security eslint-plugin-no-wildcard-postmessage js-beautify

Troubleshooting

ESLint might encounter parsing errors. Check the output for these errors. try and resolve them. Parsing errors may prevent ESLint from performing analysis on files. Searching for the error usually turns up the solution.

If you see an error not covered here please make an issue with the error and your solution. I will add them here.

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

Add the following to your config file. Chances are your config file already has parserOptions.

"parserOptions": {
  "sourceType": "module",
}

Credit: AtomLinter/linter-eslint#462 (comment)

Parsing error: 'import' and 'export' may only appear at the top level

  1. Change the ESLint parser from esprima (default) to babel-eslint.
  2. Add allowImportExportEverywhere: true to parserOptions.
"parser": "babel-eslint",
"parserOptions": {
  // ...
  "allowImportExportEverywhere": true
},

Credit

About

Repository to install ESLint, plugins and js-beautify.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published