-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
4,816 additions
and
4,191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,35 @@ | ||
extends: | ||
- eslint:recommended | ||
- idiomatic | ||
parserOptions: | ||
ecmaVersion: 2017 | ||
sourceType: module | ||
env: | ||
node: true | ||
browser: true | ||
amd: true | ||
es6: true | ||
jquery: true | ||
rules: | ||
indent: 0 | ||
brace-style: [2, "stroustrup"] | ||
comma-style: [2, "last"] | ||
default-case: 2 | ||
func-style: [2, "declaration"] | ||
no-floating-decimal: 2 | ||
no-nested-ternary: 2 | ||
no-undefined: 2 | ||
radix: 2 | ||
space-before-function-paren: [2, "never"] | ||
space-after-keywords: [1, "always"] | ||
space-before-blocks: 2 | ||
spaced-comment: [2, "always", { exceptions: ["-"] }] | ||
valid-jsdoc: [1, { requireReturn: false, prefer: { return: "returns" }}] | ||
wrap-iife: [2, "inside"] | ||
guard-for-in: 1 | ||
strict: [2, "global"] | ||
global-strict: 0 | ||
camelcase: 1 | ||
curly: [2, "all"] | ||
eqeqeq: [2, "allow-null"] | ||
no-empty: 1 | ||
no-underscore-dangle: 0 | ||
no-use-before-define: 1 | ||
no-obj-calls: 2 | ||
no-unused-vars: [0, {"vars": "local", "args": "after-used"}] | ||
new-cap: 2 | ||
no-shadow: 1 | ||
no-invalid-regexp: 2 | ||
comma-dangle: [2, "never"] | ||
no-undef: 2 | ||
no-new: 2 | ||
no-extra-semi: 2 | ||
no-caller: 1 | ||
semi: 2 | ||
quotes: [1, "single"] | ||
no-unreachable: 2 | ||
eol-last: 1 | ||
no-alert: 2 | ||
no-debugger: 2 | ||
no-console: 2 | ||
globals: | ||
jQuery: false | ||
$j: true | ||
no-multi-spaces: 0 | ||
space-in-parens: 0 | ||
array-bracket-spacing: 0 | ||
computed-property-spacing: 0 | ||
key-spacing: 0 | ||
no-var: 2 | ||
indent: | ||
- 2 | ||
- 2 | ||
- | ||
VariableDeclarator: | ||
var: 2 | ||
let: 2 | ||
const: 3 | ||
brace-style: | ||
- 2 | ||
- 'stroustrup' | ||
- | ||
allowSingleLine: false | ||
one-var: | ||
- 2 | ||
- never | ||
semi: | ||
- 2 | ||
- never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"configFile": "./config/.eslintrc" | ||
"configFile": "../../../dev/tools/frontools/config/.eslintrc" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import path from 'path' | ||
import { src } from 'gulp' | ||
import globby from 'globby' | ||
import eslint from 'gulp-eslint' | ||
import plumber from 'gulp-plumber' | ||
import gulpIf from 'gulp-if' | ||
import notify from 'gulp-notify' | ||
import logger from 'gulp-logger' | ||
|
||
import { env, themes, projectPath } from './config' | ||
import configLoader from './config-loader' | ||
|
||
export default (name, file) => { | ||
const theme = themes[name] | ||
const srcBase = path.join(projectPath, theme.dest) | ||
const eslintConfig = configLoader('eslint.json') | ||
const files = globby.sync(srcBase + '/**/*.js') | ||
|
||
return src(file ? file : files.length ? files : '.') | ||
.pipe(gulpIf( | ||
!env.ci, | ||
plumber({ | ||
errorHandler: notify.onError('Error: <%= error.message %>') | ||
}) | ||
)) | ||
.pipe(eslint(eslintConfig)) | ||
.pipe(eslint.format()) | ||
.pipe(eslint.failAfterError()) | ||
.pipe(logger({ | ||
display : 'name', | ||
beforeEach: 'Theme: ' + name + ' ' + 'File: ', | ||
afterEach : ' - ESLint finished.' | ||
})) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.