Skip to content

Commit

Permalink
Migrate to eslint (#284)
Browse files Browse the repository at this point in the history
* upgrading to tslint

* more lint stuff

* more lint fixes

* all errors are gone

* reduced eslint ignores

* fixed todos

* more shenanigans

* added a few rules
  • Loading branch information
JordanBoltonMN authored Dec 29, 2021
1 parent a8f8c47 commit a8f99cc
Show file tree
Hide file tree
Showing 51 changed files with 1,444 additions and 853 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
lib
**/*.js
36 changes: 36 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
},
plugins: ["@typescript-eslint", "security", "prettier"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:security/recommended",
],
rules: {
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
"@typescript-eslint/space-infix-ops": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/typedef": [
"error",
{
arrayDestructuring: true,
arrowParameter: true,
memberVariableDeclaration: true,
objectDestructuring: true,
parameter: true,
propertyDeclaration: true,
variableDeclaration: true,
},
],
"@typescript-eslint/unified-signatures": "error",
"prettier/prettier": ["error"],
"security/detect-non-literal-fs-filename": "off",
"security/detect-object-injection": "off",
},
};
Loading

0 comments on commit a8f99cc

Please sign in to comment.