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": { "parserOptions": {
"ecmaVersion": 6, "ecmaVersion": 6,
"ecmaFeatures": { "ecmaFeatures": {
"experimentalObjectRestSpread": true, "experimentalObjectRestSpread": true,
"impliedStrict": true, "impliedStrict": true,
"modules": true,
"blockBindings": true,
"arrowFunctions": true,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"templateStrings": true
}, },
}, },
"env": { "env": {
"es6": true, "es6": true,
"node": true "node": true,
"browser": true
}, },
"plugins": [ "plugins": [
"standard",
"promise"
], ],
"globals": { "globals": {
@ -134,17 +140,13 @@
"space-infix-ops": 2, "space-infix-ops": 2,
"space-unary-ops": [2, { "words": true, "nonwords": false }], "space-unary-ops": [2, { "words": true, "nonwords": false }],
"spaced-comment": [2, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!", ","] }], "spaced-comment": [2, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!", ","] }],
"strict": 0,
"template-curly-spacing": [2, "never"], "template-curly-spacing": [2, "never"],
"use-isnan": 2, "use-isnan": 2,
"valid-typeof": 2, "valid-typeof": 2,
"wrap-iife": [2, "any"], "wrap-iife": [2, "any"],
"yield-star-spacing": [2, "both"], "yield-star-spacing": [2, "both"],
"yoda": [2, "never"], "yoda": [2, "never"],
"prefer-const": 1
"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
} }
} }

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 livereload = require('gulp-livereload')
var del = require('del') var del = require('del')
var eslint = require('gulp-eslint') var eslint = require('gulp-eslint')
var fs = require('fs')
var path = require('path')
// browser reload // browser reload
@ -55,7 +57,7 @@ gulp.task('copy:watch', function(){
gulp.task('lint', function () { gulp.task('lint', function () {
// Ignoring node_modules, dist, and docs folders: // Ignoring node_modules, dist, and docs folders:
return gulp.src(['app/**/*.js', 'ui/**/*.js', '!node_modules/**', '!dist/**', '!docs/**']) 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. // eslint.format() outputs the lint results to the console.
// Alternatively use eslint.formatEach() (see Docs). // Alternatively use eslint.formatEach() (see Docs).
.pipe(eslint.format()) .pipe(eslint.format())

View File

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