Skip to content

Commit

Permalink
chore: use eslint instead of tslint (#6452)
Browse files Browse the repository at this point in the history
  • Loading branch information
imnotjames committed Jul 24, 2020
1 parent cc23ba2 commit 259ad0e
Show file tree
Hide file tree
Showing 5 changed files with 1,298 additions and 283 deletions.
54 changes: 54 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,54 @@
module.exports = {
"env": {
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-unused-vars": [
"error",
{
"args": "none"
}
],
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/quotes": [
"error",
"double",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"@typescript-eslint/semi": [
"error"
],
"@typescript-eslint/type-annotation-spacing": "error",
"eqeqeq": [
"error",
"smart"
],
"id-blacklist": [
"error",
"any",
"Number",
"number",
"String",
"string",
"Boolean",
"boolean",
"Undefined",
"undefined"
],
"id-match": "error",
"no-eval": "error",
"no-redeclare": "error",
"no-var": "error"
}
};
17 changes: 5 additions & 12 deletions gulpfile.ts
Expand Up @@ -11,7 +11,7 @@ const replace = require("gulp-replace");
const rename = require("gulp-rename");
const mocha = require("gulp-mocha");
const chai = require("chai");
const tslint = require("gulp-tslint");
const eslint = require("gulp-eslint");
const sourcemaps = require("gulp-sourcemaps");
const istanbul = require("gulp-istanbul");
const remapIstanbul = require("remap-istanbul/lib/gulpRemapIstanbul");
Expand Down Expand Up @@ -269,18 +269,11 @@ export class Gulpfile {
* Runs ts linting to validate source code.
*/
@Task()
tslint() {
eslint() {
return gulp.src(["./src/**/*.ts", "./test/**/*.ts", "./sample/**/*.ts"])
.pipe(
tslint({
formatter: "stylish"
})
)
.pipe(tslint.report({
emitError: true,
sort: true,
bell: true
}));
.pipe(eslint())
.pipe(eslint.format('stylish'))
.pipe(eslint.failAfterError())
}

/**
Expand Down

0 comments on commit 259ad0e

Please sign in to comment.