Skip to content

Commit

Permalink
Add .eslintignore
Browse files Browse the repository at this point in the history
  • Loading branch information
victorquinn committed Aug 31, 2019
1 parent 1b531f4 commit ca4750f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 26 deletions.
4 changes: 4 additions & 0 deletions .eslintignore
@@ -0,0 +1,4 @@
node_modules/
docs/
test/
dist/
5 changes: 4 additions & 1 deletion .eslintrc.js
Expand Up @@ -7,7 +7,9 @@ module.exports = {
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
"SharedArrayBuffer": "readonly",
"define": "writable",
"chance": "writable"
},
"parserOptions": {
"ecmaVersion": 2018
Expand Down Expand Up @@ -118,6 +120,7 @@ module.exports = {
"no-eval": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-boolean-cast": "off",
"no-extra-label": "error",
"no-extra-parens": "off",
"no-floating-decimal": "error",
Expand Down
40 changes: 18 additions & 22 deletions gulpfile.js
Expand Up @@ -6,32 +6,28 @@ const sourcemaps = require('gulp-sourcemaps')
const uglify = require('gulp-uglify')
const pump = require('pump')

gulp.task('lint', () =>
gulp.src(['**/*.js', '!docs/**', '!node_modules/**', '!dist/**', '!test/helpers/**/*.js'])
.pipe(eslint({
gulp.task('lint', () => gulp.src(['**/*.js', '!docs/**', '!node_modules/**', '!dist/**', '!test/helpers/**/*.js'])
.pipe(eslint({
parser: 'babel-eslint',
rules: {
// quotes: ['error', 'single'],
'curly': 'error',
'eqeqeq': 'error',
'new-parens': 'error',
'no-cond-assign': 'error',
'no-console': 'error',
'no-debugger': 'error',
'no-empty': 'error',
'no-fallthrough': 'error',
'no-trailing-spaces': 'error',
'no-mixed-spaces-and-tabs': 'error',
// quotes: ['error', 'single'],
'curly': 'error',
'eqeqeq': 'error',
'new-parens': 'error',
'no-cond-assign': 'error',
'no-console': 'error',
'no-debugger': 'error',
'no-empty': 'error',
'no-fallthrough': 'error',
'no-trailing-spaces': 'error',
'no-mixed-spaces-and-tabs': 'error',
}
}))
.pipe(eslint.format())
.pipe(eslint.failAfterError())
)
}))
.pipe(eslint.format())
.pipe(eslint.failAfterError()))

gulp.task('test', () =>
gulp.src('test/**/*.js')
.pipe(ava({ verbose: true }))
)
gulp.task('test', () => gulp.src('test/**/*.js')
.pipe(ava({ verbose: true })))

gulp.task('watch', () => {
gulp.watch(['chance.js', 'gulpfile.js', 'test/**/*.js'], ['lint', 'test'])
Expand Down
4 changes: 1 addition & 3 deletions package.json
Expand Up @@ -20,6 +20,7 @@
"coveralls": "^2.11.2",
"dirty-chai": "^1.2.2",
"docpress": "0.7.1",
"eslint": "^6.3.0",
"git-update-ghpages": "1.3.0",
"gulp": "^4.0.0",
"gulp-ava": "^0.17.1",
Expand Down Expand Up @@ -77,8 +78,5 @@
"css": [
"docs/chance.css"
]
},
"dependencies": {
"eslint": "^6.3.0"
}
}

0 comments on commit ca4750f

Please sign in to comment.