Use ESHint
- Dominant language
- JavaScript
- Stars
- 8
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Remove "jshint" dev dependency from package.json and the gulp task.
sh:
``` sh
npm install gulp-eslint --save-dev
```
gulpfile.js:
``` js
var eslint = require('gulp-eslint');
gulp.task('lint', function () {
return gulp
.src(['./src/*.js', './src/cinemas/*/*.js', './tests/*.js'])
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failOnError());
});
```
.eslintrc:
``` json
{
"rules": {
"no-console": 0,
"no-extra-parens": 2,
"no-reserved-keys": 2,
"no-eq-null": 2,
"no-extend-native": 2,
"no-process-env": 2,
"no-self-compare": 2,
"no-void": 2,
"no-warning-comments": [1, { "terms": ["todo", "@toto"], "location": "start" }],
"vars-on-top": 2,
"wrap-iife": [2, "inside"],
"global-strict": [2, "always"],
"new-cap": 0,
"no-shadow": 0,
"no-mixed-requires": 0,
"no-new-require": 2,
"brace-style": [2, "1tbs"],
"comma-style": [2, "last"],
"func-style": [2, "expression"],
"no-inline-comments": 2,
"no-lonely-if": 2,
"no-multiple-empty-lines": 2,
"no-nested-ternary": 2,
"one-var": 2,
"operator-assignment": [2, "always"],
"padded-blocks": [2, "never"],
"quote-props": [2, "as-needed"],
"quotes": [2, "single"],
"space-after-keywords": [2, "always"],
"space-before-blocks": [2, "always"],
"space-in-brackets": [2, "never"],
"space-in-parens": [2, "never"],
"space-unary-ops": [2, { "words": true, "nonwords": false }],
"spaced-line-comment": [2, "always"],
},
"env":{
"mocha": true,
"node": true
}
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Review package.json and gulpfile.js to find the current jshint dependency and lint task, then inspect the supplied .eslintrc settings. Install the specified gulp-eslint dependency, update the lint task and configuration, and run the project lint command to confirm the JavaScript sources and tests pass without jshint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100