forked from valor-software/ngx-bootstrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(lint): use eslint-config-valorsoft
- Loading branch information
Showing
10 changed files
with
98 additions
and
275 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,200 +1,7 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"extends": "./node_modules/eslint-config-valorsoft/.eslintrc", | ||
"env": { | ||
"browser": 2, | ||
"node": 2, | ||
"mocha": 2, | ||
"es6": 2 | ||
}, | ||
"ecmaFeatures": { | ||
"modules": true | ||
}, | ||
"globals": { | ||
"_": 2, | ||
"$": 2, | ||
"angular": 2, | ||
"jQuery": 2 | ||
}, | ||
"rules": { | ||
// Possible Errors | ||
"comma-dangle": 2, | ||
// no-comma-dangle - (deprecated) | ||
"no-cond-assign": [2, "always"], | ||
"no-console": 2, | ||
"no-constant-condition": 2, | ||
"no-control-regex": 2, | ||
"no-debugger": 2, | ||
"no-dupe-keys": 2, | ||
"no-dupe-args": 2, | ||
"no-duplicate-case": 2, | ||
"no-empty-character-class": 2, | ||
// no-empty-class - (deprecated) | ||
"no-empty": 2, | ||
"no-ex-assign": 2, | ||
"no-extra-boolean-cast": 2, | ||
"no-extra-parens": 2, | ||
"no-extra-semi": 2, | ||
"no-func-assign": 2, | ||
"no-inner-declarations": 2, | ||
"no-invalid-regexp": 2, | ||
"no-irregular-whitespace": 2, | ||
"no-negated-in-lhs": 2, | ||
"no-obj-calls": 2, | ||
"no-regex-spaces": 2, | ||
"no-sparse-arrays": 2, | ||
"no-unreachable": 2, | ||
"use-isnan": 2, | ||
"valid-jsdoc": 2, | ||
"valid-typeof": 2, | ||
"no-unexpected-multiline": 2, | ||
|
||
// Best Practices | ||
// not sure | ||
"accessor-pairs": [2, {"getWithoutSet": false, "setWithoutGet": true}], | ||
"block-scoped-var": 2, | ||
"complexity": [2, 6], | ||
"consistent-return": 2, | ||
"curly": 2, | ||
"default-case": 2, | ||
"dot-notation": 2, | ||
// not good for chain calls, but not for properties | ||
"dot-location": [2, "property"], | ||
"eqeqeq": 2, | ||
"guard-for-in": 2, | ||
"no-alert": 2, | ||
"no-caller": 2, | ||
"no-div-regex": 2, | ||
"no-else-return": 2, | ||
"no-empty-label": 2, | ||
"no-eq-null": 2, | ||
"no-eval": 2, | ||
"no-extend-native": 2, | ||
"no-extra-bind": 2, | ||
"no-fallthrough": 2, | ||
"no-floating-decimal": 2, | ||
"no-implied-eval": 2, | ||
"no-iterator": 2, | ||
"no-labels": 2, | ||
"no-lone-blocks": 2, | ||
"no-loop-func": 2, | ||
"no-multi-spaces": 2, | ||
"no-multi-str": 2, | ||
"no-native-reassign": 2, | ||
"no-new": 2, | ||
"no-new-func": 2, | ||
"no-new-wrappers": 2, | ||
"no-octal": 2, | ||
"no-octal-escape": 2, | ||
"no-param-reassign": 2, | ||
"no-process-env": 2, | ||
"no-proto": 2, | ||
"no-redeclare": 2, | ||
"no-return-assign": 2, | ||
"no-script-url": 2, | ||
"no-self-compare": 2, | ||
"no-sequences": 2, | ||
"no-throw-literal": 2, | ||
"no-unused-expressions": 2, | ||
"no-void": 2, | ||
"no-warning-comments": [1, { "terms": ["todo", "fixme"], "location": "anywhere" }], | ||
"no-with": 2, | ||
"radix": 2, | ||
"vars-on-top": 0, | ||
"wrap-iife": [2, "inside"], | ||
"yoda": [2, "never"], | ||
|
||
// Strict Mode | ||
"strict": [0], | ||
|
||
// Variables | ||
"no-catch-shadow": 2, | ||
"no-delete-var": 2, | ||
"no-label-var": 2, | ||
"no-shadow": 2, | ||
"no-shadow-restricted-names": 2, | ||
"no-undef": 2, | ||
"no-undef-init": 2, | ||
"no-undefined": 2, | ||
"no-unused-vars": 2, | ||
"no-use-before-define": [2, "nofunc"], | ||
|
||
// Node.js | ||
"handle-callback-err": [2, "^.*(e|E)rr" ], | ||
"no-mixed-requires": [2, true], | ||
"no-new-require": 2, | ||
"no-path-concat": 2, | ||
"no-process-exit": 2, | ||
"no-sync": 2, | ||
|
||
// Stylistic Issues | ||
"array-bracket-spacing": [2, "never"], | ||
"brace-style": [2, "1tbs", { "allowSingleLine": true }], | ||
"camelcase": 2, | ||
"comma-spacing": [2, {"before": false, "after": true}], | ||
"comma-style": [2, "last"], | ||
"computed-property-spacing": [2, "never"], | ||
"consistent-this": [2, "self"], | ||
// not sure | ||
"eol-last": 0, | ||
"func-names": 0, | ||
"func-style": [2, "declaration"], | ||
"indent": [2, 2], | ||
"key-spacing": [2, { "beforeColon": false, "afterColon": true}], | ||
"max-nested-callbacks": [2, 3], | ||
"new-cap": [2, {"newIsCap": true, "capIsNew": true, "capIsNewExceptions":[ | ||
"ObjectId", | ||
"Object", | ||
"Function", | ||
"Number", | ||
"String", | ||
"Boolean", | ||
"Date", | ||
"Array", | ||
"Symbol", | ||
"RegExp" | ||
]}], | ||
"new-parens": 2, | ||
"newline-after-var": 0, | ||
"no-array-constructor": 2, | ||
"no-inline-comments": 2, | ||
"no-lonely-if": 2, | ||
"no-mixed-spaces-and-tabs": 2, | ||
"no-multiple-empty-lines": [2, {"max": 1}], | ||
"no-nested-ternary": 2, | ||
"no-new-object": 2, | ||
"no-spaced-func": 2, | ||
"no-ternary": 0, | ||
"no-trailing-spaces": 2, | ||
"no-underscore-dangle": 2, | ||
"no-unneeded-ternary": 2, | ||
"object-curly-spacing": [2, "never"], | ||
"one-var": [2, { | ||
"var": "never", // Exactly one var declaration per function | ||
"let": "never", // Exactly one let declaration per block | ||
"const": "never" // Exactly one declarator per const declaration per block | ||
}], | ||
"operator-assignment": [1, "always"], | ||
"operator-linebreak": [2, "after"], | ||
"padded-blocks": [2, "never"], | ||
"quote-props": [2, "as-needed"], | ||
"quotes": [2, "single", "avoid-escape"], | ||
"semi": [2, "always"], | ||
"semi-spacing": 2, | ||
// "sort-vars": [1, { "ignoreCase": true }], | ||
"space-after-keywords": [2, "always" ], | ||
"space-before-blocks": [2, "always"], | ||
"space-in-parens": [2, "never"], | ||
"space-infix-ops": 2, | ||
"space-return-throw-case": 2, | ||
"space-unary-ops": [2, { "words": true, "nonwords": false }], | ||
"spaced-comment": 0, | ||
"wrap-regexp": 0, | ||
|
||
// Legacy | ||
"max-len": [1, 120, 4], | ||
// todo: apply max-params | ||
"max-params": [0, 3], | ||
// todo: apply max-statements | ||
"max-statements": [2, 30], | ||
"no-bitwise": 2 | ||
"node": true | ||
} | ||
} |
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,5 +1,6 @@ | ||
#!/usr/bin/env node | ||
|
||
/*eslint no-console: 0, no-sync: 0*/ | ||
'use strict'; | ||
const del = require('del'); | ||
|
||
console.log(del.sync(['components/**/*.+(js|d.ts|js.map)'])); |
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,23 +1,17 @@ | ||
var gulp = require('gulp'); | ||
var esLint = require('gulp-eslint'); | ||
var tslint = require('gulp-tslint'); | ||
'use strict'; | ||
|
||
var paths = gulp.paths; | ||
const gulp = require('gulp'); | ||
const tslint = require('gulp-tslint'); | ||
const paths = gulp.paths; | ||
|
||
gulp.task('eslint', function() { | ||
return gulp.src(paths.jssrc) | ||
.pipe(esLint({useEslintrc: true})) | ||
.pipe(esLint.format()) | ||
.pipe(esLint.failOnError()); | ||
}); | ||
|
||
gulp.task('tslint', function() { | ||
return gulp.src(paths.tssrc) | ||
gulp.task('tslint', () => | ||
gulp | ||
.src(paths.tssrc) | ||
.pipe(tslint()) | ||
.pipe(tslint.report('verbose', { | ||
emitError: true, | ||
reportLimit: 0 | ||
})); | ||
}); | ||
})) | ||
); | ||
|
||
gulp.task('lint', ['tslint', 'eslint']); | ||
gulp.task('lint', ['tslint']); |
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
Oops, something went wrong.