Merge pull request #54 from pdehaan/add-eslint
Adding basic ESLint config
This commit is contained in:
commit
3c9889c075
|
@ -0,0 +1 @@
|
|||
public/bundle.js
|
|
@ -0,0 +1,38 @@
|
|||
env:
|
||||
browser: true
|
||||
es6: true
|
||||
jquery: true
|
||||
node: true
|
||||
|
||||
extends:
|
||||
- eslint:recommended
|
||||
- plugin:node/recommended
|
||||
|
||||
plugins:
|
||||
- node
|
||||
- security
|
||||
|
||||
root: true
|
||||
|
||||
rules:
|
||||
security/detect-buffer-noassert: warn
|
||||
security/detect-child-process: warn
|
||||
security/detect-disable-mustache-escape: warn
|
||||
security/detect-eval-with-expression: warn
|
||||
security/detect-new-buffer: warn
|
||||
security/detect-no-csrf-before-method-override: warn
|
||||
security/detect-non-literal-fs-filename: warn
|
||||
security/detect-non-literal-regexp: warn
|
||||
security/detect-non-literal-require: warn
|
||||
security/detect-possible-timing-attacks: warn
|
||||
security/detect-pseudoRandomBytes: warn
|
||||
security/detect-unsafe-regex: warn
|
||||
|
||||
eqeqeq: error
|
||||
no-console: warn
|
||||
no-path-concat: error
|
||||
no-unused-vars: [error, {argsIgnorePattern: "^_|next"}]
|
||||
no-var: error
|
||||
one-var: [error, never]
|
||||
prefer-const: error
|
||||
quotes: [error, single]
|
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
|
@ -23,14 +23,21 @@
|
|||
"browserify": "^14.4.0",
|
||||
"buffer-shims": "^1.0.0",
|
||||
"cross-env": "^5.0.0",
|
||||
"prettier": "^1.3.1",
|
||||
"eslint": "3.19.0",
|
||||
"eslint-plugin-node": "5.0.0",
|
||||
"eslint-plugin-security": "1.3.0",
|
||||
"prettier": "1.4.4",
|
||||
"watchify": "^3.9.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
},
|
||||
"license": "MPL-2.0",
|
||||
"repository": "mozilla/something-awesome",
|
||||
"scripts": {
|
||||
"format": "prettier --single-quote --write 'frontend/src/*.js' 'server/*.js'",
|
||||
"dev": "watchify frontend/src/main.js -o public/bundle.js -d | node server/portal_server.js",
|
||||
"format": "prettier 'frontend/src/*.js' 'server/*.js' 'public/*.css' --single-quote --write",
|
||||
"lint": "eslint .",
|
||||
"start": "watchify frontend/src/main.js -o public/bundle.js -d | cross-env NODE_ENV=production node server/portal_server.js",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue