不要怂,就是干,撸起袖子干!

Commit 319c83c4 by Felix Becker Committed by Jan Aagaard Meier

Add eslint (#6288)

1 parent 687d23a9
Showing with 49 additions and 0 deletions
{
"rules": {
"no-console": "off",
"no-extra-parens": "warn",
"valid-jsdoc": "off",
"new-cap": ["warn", {"properties": false}],
"comma-spacing": ["error", {"before": false, "after": true}],
"no-extra-boolean-cast": "warn",
"strict": ["warn", "global"],
"no-var": "error",
"prefer-const": "error",
"semi": ["error", "always"],
"space-before-function-paren": ["warn", "never"],
"prefer-arrow-callback": "error",
"comma-style": ["warn", "last"],
"no-bitwise": "off",
"no-cond-assign": ["error", "except-parens"],
"curly": "off",
"eqeqeq": "error",
"no-extend-native": "error",
"wrap-iife": ["error", "any"],
"indent": ["error", 2, {"SwitchCase": 1}],
"no-use-before-define": "off",
"no-caller": "error",
"no-undef": "error",
"no-unused-vars": "error",
"no-irregular-whitespace": "error",
"max-depth": ["error", 8],
"quotes": ["error", "single", {"avoidEscape": true}],
"linebreak-style": "error",
"no-loop-func": "warn",
"object-shorthand": "error",
"one-var-declaration-per-line": "warn",
"comma-dangle": "warn",
"no-shadow": "warn",
"camelcase": "warn"
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "script"
},
"env": {
"node": true,
"mocha": true,
"es6": true
}
}
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
"continuation-local-storage": "^3.1.4", "continuation-local-storage": "^3.1.4",
"coveralls": "^2.11.9", "coveralls": "^2.11.9",
"dox": "~0.8.0", "dox": "~0.8.0",
"eslint": "^3.1.0",
"git": "^0.1.5", "git": "^0.1.5",
"hints": "^1.1.0", "hints": "^1.1.0",
"istanbul": "^0.4.3", "istanbul": "^0.4.3",
...@@ -94,6 +95,7 @@ ...@@ -94,6 +95,7 @@
], ],
"main": "index", "main": "index",
"scripts": { "scripts": {
"lint": "eslint lib test",
"test": "if [ $COVERAGE ]; then npm run coveralls; else npm run jshint && npm run teaser && npm run test-unit && npm run test-integration; fi", "test": "if [ $COVERAGE ]; then npm run coveralls; else npm run jshint && npm run teaser && npm run test-unit && npm run test-integration; fi",
"test-docker": "docker-compose run sequelize /bin/sh -c \"npm run test-all\"", "test-docker": "docker-compose run sequelize /bin/sh -c \"npm run test-all\"",
"test-docker-unit": "docker-compose run sequelize /bin/sh -c \"npm run test-unit-all\"", "test-docker-unit": "docker-compose run sequelize /bin/sh -c \"npm run test-unit-all\"",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!