1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Got eslint running correctly

This commit is contained in:
Dan Finlay 2016-06-21 12:40:09 -07:00
parent 7b9a1197c8
commit 45506d6758
4 changed files with 16 additions and 10 deletions

View File

@ -1,20 +1,26 @@
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"impliedStrict": true,
"modules": true,
"blockBindings": true,
"arrowFunctions": true,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"templateStrings": true
},
},
"env": {
"es6": true,
"node": true
"node": true,
"browser": true
},
"plugins": [
"standard",
"promise"
],
"globals": {
@ -134,17 +140,13 @@
"space-infix-ops": 2,
"space-unary-ops": [2, { "words": true, "nonwords": false }],
"spaced-comment": [2, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!", ","] }],
"strict": 0,
"template-curly-spacing": [2, "never"],
"use-isnan": 2,
"valid-typeof": 2,
"wrap-iife": [2, "any"],
"yield-star-spacing": [2, "both"],
"yoda": [2, "never"],
"standard/object-curly-even-spacing": [2, "either"],
"standard/array-bracket-even-spacing": [2, "either"],
"standard/computed-property-even-spacing": [2, "even"],
"promise/param-names": 2
"prefer-const": 1
}
}

1
.nvmrc Normal file
View File

@ -0,0 +1 @@
6.0

View File

@ -10,6 +10,8 @@ var assign = require('lodash.assign')
var livereload = require('gulp-livereload')
var del = require('del')
var eslint = require('gulp-eslint')
var fs = require('fs')
var path = require('path')
// browser reload
@ -55,7 +57,7 @@ gulp.task('copy:watch', function(){
gulp.task('lint', function () {
// Ignoring node_modules, dist, and docs folders:
return gulp.src(['app/**/*.js', 'ui/**/*.js', '!node_modules/**', '!dist/**', '!docs/**'])
.pipe(eslint())
.pipe(eslint(fs.readFileSync(path.join(__dirname, '.eslintrc'))))
// eslint.format() outputs the lint results to the console.
// Alternatively use eslint.formatEach() (see Docs).
.pipe(eslint.format())

View File

@ -69,6 +69,7 @@
"xtend": "^4.0.1"
},
"devDependencies": {
"babel-eslint": "^6.0.5",
"babel-preset-es2015": "^6.6.0",
"babel-register": "^6.7.2",
"babelify": "^7.2.0",