| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,144 @@ | |||
| 1 | + { | ||
| 2 | + "env": { | ||
| 3 | + "browser": true, | ||
| 4 | + "jquery": true, | ||
| 5 | + "node": true | ||
| 6 | + }, | ||
| 7 | + "globals": { | ||
| 8 | + "expect": true, | ||
| 9 | + "it": true, | ||
| 10 | + "describe": true, | ||
| 11 | + "beforeEach": true, | ||
| 12 | + "afterEach": true | ||
| 13 | + }, | ||
| 14 | + "parserOptions": { | ||
| 15 | + "ecmaVersion": 6 | ||
| 16 | + }, | ||
| 17 | + "rules": { | ||
| 18 | + | ||
| 19 | + "camelcase": 2, | ||
| 20 | + "curly": 2, | ||
| 21 | + "eqeqeq": 2, | ||
| 22 | + "indent": [ | ||
| 23 | + 2, | ||
| 24 | + 2, | ||
| 25 | + { | ||
| 26 | + "SwitchCase": 1 | ||
| 27 | + } | ||
| 28 | + ], | ||
| 29 | + "no-use-before-define": [ | ||
| 30 | + 2, | ||
| 31 | + { | ||
| 32 | + "functions": false | ||
| 33 | + } | ||
| 34 | + ], | ||
| 35 | + "no-caller": 2, | ||
| 36 | + "new-cap": 0, | ||
| 37 | + "quotes": [ | ||
| 38 | + 2, | ||
| 39 | + "single" | ||
| 40 | + ], | ||
| 41 | + "no-unused-vars": 2, | ||
| 42 | + "strict": [ | ||
| 43 | + 2, | ||
| 44 | + "function" | ||
| 45 | + ], | ||
| 46 | + "no-extend-native": 2, | ||
| 47 | + "wrap-iife": [ | ||
| 48 | + 2, | ||
| 49 | + "any" | ||
| 50 | + ], | ||
| 51 | + "no-empty": 2, | ||
| 52 | + "no-plusplus": 2, | ||
| 53 | + "no-undef": 2, | ||
| 54 | + "linebreak-style": 2, | ||
| 55 | + "max-depth": [ | ||
| 56 | + 2, | ||
| 57 | + 4 | ||
| 58 | + ], | ||
| 59 | + "no-loop-func": 2, | ||
| 60 | + "complexity": [ | ||
| 61 | + 2, | ||
| 62 | + 13 | ||
| 63 | + ], | ||
| 64 | + "max-len": [ | ||
| 65 | + 2, | ||
| 66 | + { | ||
| 67 | + "code": 120, | ||
| 68 | + "ignoreComments": true | ||
| 69 | + } | ||
| 70 | + ], | ||
| 71 | + "max-params": [ | ||
| 72 | + 2, | ||
| 73 | + 5 | ||
| 74 | + ], | ||
| 75 | + | ||
| 76 | + | ||
| 77 | + "curly": [ | ||
| 78 | + 2, | ||
| 79 | + "all" | ||
| 80 | + ], | ||
| 81 | + "keyword-spacing": [ | ||
| 82 | + 2, | ||
| 83 | + {} | ||
| 84 | + ], | ||
| 85 | + "one-var": [ | ||
| 86 | + 2, | ||
| 87 | + "never" | ||
| 88 | + ], | ||
| 89 | + "array-bracket-spacing": [ | ||
| 90 | + 2, | ||
| 91 | + "never", | ||
| 92 | + {} | ||
| 93 | + ], | ||
| 94 | + "space-in-parens": [ | ||
| 95 | + 2, | ||
| 96 | + "never" | ||
| 97 | + ], | ||
| 98 | + "key-spacing": [ | ||
| 99 | + 2, | ||
| 100 | + { | ||
| 101 | + "beforeColon": false, | ||
| 102 | + "afterColon": true | ||
| 103 | + } | ||
| 104 | + ], | ||
| 105 | + "quote-props": [ | ||
| 106 | + 2, | ||
| 107 | + "as-needed" | ||
| 108 | + ], | ||
| 109 | + "space-infix-ops": 2, | ||
| 110 | + "space-unary-ops": [ | ||
| 111 | + 2, | ||
| 112 | + { | ||
| 113 | + "words": false, | ||
| 114 | + "nonwords": false | ||
| 115 | + } | ||
| 116 | + ], | ||
| 117 | + "no-implicit-coercion": [ | ||
| 118 | + 2, | ||
| 119 | + { | ||
| 120 | + "boolean": false, | ||
| 121 | + "string": true, | ||
| 122 | + "number": true | ||
| 123 | + } | ||
| 124 | + ], | ||
| 125 | + "no-with": 2, | ||
| 126 | + "no-multiple-empty-lines": 2, | ||
| 127 | + "brace-style": [ | ||
| 128 | + 2, | ||
| 129 | + "1tbs", | ||
| 130 | + { | ||
| 131 | + "allowSingleLine": true | ||
| 132 | + } | ||
| 133 | + ], | ||
| 134 | + "eol-last": 2, | ||
| 135 | + "no-trailing-spaces": 2, | ||
| 136 | + "indent": [ | ||
| 137 | + 2, | ||
| 138 | + 2, | ||
| 139 | + { | ||
| 140 | + "SwitchCase": 1 | ||
| 141 | + } | ||
| 142 | + ] | ||
| 143 | + } | ||
| 144 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,6 @@ | |||
| 5 | 5 | "beforeOpeningCurlyBrace": true | |
| 6 | 6 | }, | |
| 7 | 7 | "disallowMultipleVarDecl": true, | |
| 8 | - "requireSpacesInsideObjectBrackets": "allButNested", | ||
| 9 | 8 | "disallowSpacesInsideArrayBrackets": true, | |
| 10 | 9 | "disallowSpacesInsideParentheses": true, | |
| 11 | 10 | "disallowSpaceAfterObjectKeys": true, | |
@@ -26,4 +25,4 @@ | |||
| 26 | 25 | "disallowTrailingWhitespace": true, | |
| 27 | 26 | "excludeFiles": ["node_modules/**", "bower_components/**"], | |
| 28 | 27 | "validateIndentation": 2 | |
| 29 | - } | ||
| 28 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,10 +1,8 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | var gulp = require('gulp'); | |
| 3 | 3 | var shell = require('gulp-shell'); | |
| 4 | - var jshint = require('gulp-jshint'); | ||
| 4 | + var eslint = require('gulp-eslint'); | ||
| 5 | 5 | var jasmine = require('gulp-jasmine'); | |
| 6 | - var stylish = require('jshint-stylish'); | ||
| 7 | - var jscs = require('gulp-jscs'); | ||
| 8 | 6 | var isWin = /^win/.test(process.platform); | |
| 9 | 7 | ||
| 10 | 8 | gulp.task('jsdoc', shell.task([ | |
@@ -13,21 +11,16 @@ gulp.task('jsdoc', shell.task([ | |||
| 13 | 11 | './node_modules/.bin/jsdoc -c ./doc-config.json' | |
| 14 | 12 | ])); | |
| 15 | 13 | ||
| 16 | - gulp.task('lint', function () { | ||
| 17 | - return gulp.src(['./src/**/*.js'], ['./test/**/*.js']) | ||
| 18 | - .pipe(jshint()) | ||
| 19 | - .pipe(jshint.reporter(stylish)) | ||
| 20 | - .pipe(jshint.reporter('fail')); | ||
| 21 | - }); | ||
| 22 | - | ||
| 23 | 14 | gulp.task('test', function () { | |
| 24 | 15 | return gulp.src('test/**/*.spec.js') | |
| 25 | 16 | .pipe(jasmine()); | |
| 26 | 17 | }); | |
| 27 | 18 | ||
| 28 | - gulp.task('jscs', function () { | ||
| 19 | + gulp.task('lint', function () { | ||
| 29 | 20 | return gulp.src(['src/**/*.js', 'test/**/*.js']) | |
| 30 | - .pipe(jscs()); | ||
| 21 | + .pipe(eslint()) | ||
| 22 | + .pipe(eslint.format()) | ||
| 23 | + .pipe(eslint.failAfterError()); | ||
| 31 | 24 | }); | |
| 32 | 25 | ||
| 33 | - gulp.task('build', ['lint', 'jscs', 'test']); | ||
| 26 | + gulp.task('build', ['lint', 'test']); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments