Skip to content

Commit

Permalink
change out tslint for eslint, new publish config (#486)
Browse files Browse the repository at this point in the history
* change out tslint for eslint, new publish config

* rename tsconfig.internal to tsconfig.dev

* add framework for extra ts rules

* simplify whitelist, expand ignore

* simplify tsconfigs

* strengthen eslint rules

* rename test file

* var -> const

* add google lint rules and set a bunch of warnings

* quiet down warnings on npm test
  • Loading branch information
bkendall authored Oct 9, 2019
1 parent 7ba8a11 commit 9a9332b
Show file tree
Hide file tree
Showing 11 changed files with 293 additions and 187 deletions.
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
coverage
lib
node_modules
templates
standalone
templates
11 changes: 0 additions & 11 deletions .eslintrc

This file was deleted.

70 changes: 70 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
module.exports = {
"env": {
"es6": true,
"node": true,
},
"extends": [
"eslint:recommended",
"google",
"prettier",
"prettier/@typescript-eslint",
],
"rules": {
"prettier/prettier": "error",
"no-prototype-builtins": "warn", // TODO(bkendall): remove, allow to error.
"no-restricted-globals": ["error", "name", "length"], // This is a keeper.
"no-useless-escape": "warn", // TODO(bkendall): remove, allow to error.
"prefer-const": "warn", // TODO(bkendall): remove, allow to error.
"prefer-promise-reject-errors": "warn", // TODO(bkendall): remove, allow to error.
"prefer-spread": "warn", // TODO(bkendall): remove, allow to error.
"require-jsdoc": "warn", // TODO(bkendall): remove, allow to error.
"valid-jsdoc": "warn", // TODO(bkendall): remove, allow to error.
},
"overrides": [
{
"files": ["*.ts"],
"rules": {
"camelcase": "warn", // TODO(bkendall): remove, allow to error.
"new-cap": "warn", // TODO(bkendall): remove, allow to error.
"no-case-declarations": "warn", // TODO(bkendall): remove, allow to error.
"no-constant-condition": "warn", // TODO(bkendall): remove, allow to error.
"no-fallthrough": "warn", // TODO(bkendall): remove, allow to error.
"no-unused-vars": "warn", // TODO(bkendall): remove, allow to error.
"require-atomic-updates": "warn", // TODO(bkendall): remove, allow to error.
},
},
{
"files": ["*.js"],
"rules": {
"guard-for-in": "warn", // TODO(bkendall): remove, allow to error.
"no-extra-boolean-cast": "warn", // TODO(bkendall): remove, allow to error.
"no-invalid-this": "warn", // TODO(bkendall): remove, allow to error.
"no-redeclare": "warn", // TODO(bkendall): remove, allow to error.
"no-undef": "warn", // TODO(bkendall): remove, allow to error.
"no-var": "warn", // TODO(bkendall): remove, allow to error.
"one-var": "warn", // TODO(bkendall): remove, allow to error.
"prefer-rest-params": "warn", // TODO(bkendall): remove, allow to error.
},
},
{
"files": ["*.spec.*"],
"env": {
"mocha": true,
},
"rules": {
"require-jsdoc": "warn", // TODO(bkendall): remove, allow to error.
},
},
],
"globals": {},
"parserOptions": {
"ecmaVersion": "2017",
"project": ["tsconfig.json"],
"sourceType": "module",
},
"plugins": [
"prettier",
"@typescript-eslint",
],
"parser": "@typescript-eslint/parser",
};
4 changes: 2 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"trailingComma": "es5",
"arrowParens": "always",
"printWidth": 100,
"arrowParens": "always"
"trailingComma": "es5"
}
Loading

0 comments on commit 9a9332b

Please sign in to comment.