Skip to content

Commit

Permalink
Node 16 NPM 8 upgrade -> TSLINT => ESLINT migration (broken compile d…
Browse files Browse the repository at this point in the history
…ue to Prettier lint not adjusted yet)
  • Loading branch information
danielweck committed Nov 13, 2021
1 parent 51de9f4 commit 830881a
Show file tree
Hide file tree
Showing 9 changed files with 12,991 additions and 959 deletions.
10 changes: 10 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.vscode/*
.history/*
.github/*
.git/*
dist/*
docs/*
misc/*
node_modules/*
tools/*
tsconfigs/*
93 changes: 93 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
module.exports = {
parser: "@typescript-eslint/parser",
env: {
node: true,
browser: true,
es6: true,
es2020: true,
},
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
extends: ["plugin:@typescript-eslint/recommended", "prettier", "plugin:prettier/recommended"],
plugins: ["unused-imports", "prettier"],
rules: {
quotes: ["error", "double"],
"comma-dangle": ["error", "always-multiline"],
"eol-last": ["error", "always"],
semi: ["error", "always"],

"no-unused-vars": 0,
// "@typescript-eslint/no-unused-vars": 0,
"@typescript-eslint/no-unused-vars": [
"error",
{
vars: "all",
args: "all",
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
caughtErrors: "all",
},
],
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{
vars: "all",
args: "all",
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
caughtErrors: "all",
},
],

// TODO ({} used as anonymous / generic object type)
// "@typescript-eslint/ban-types": 0,

// TODO (many any!!)
// "@typescript-eslint/no-explicit-any": 0,

// TODO (missing return types on functions)
"@typescript-eslint/explicit-module-boundary-types": 0,
// "@typescript-eslint/explicit-module-boundary-types": [
// "error",
// {
// allowArgumentsExplicitlyTypedAsAny: true,
// allowDirectConstAssertionInArrowFunctions: true,
// allowedNames: [],
// allowHigherOrderFunctions: true,
// allowTypedFunctionExpressions: true,
// },
// ],

// "@typescript-eslint/explicit-function-return-type": 0,
// "@typescript-eslint/explicit-function-return-type": [
// "error",
// {
// allowExpressions: true,
// allowTypedFunctionExpressions: true,
// },
// ],

"prettier/prettier": "error",
},
// overrides: [
// {
// files: ["*.ts", "*.tsx"],
// rules: {
// "@typescript-eslint/explicit-function-return-type": [
// "error",
// {
// allowExpressions: true,
// },
// ],
// },
// },
// ],
};
12 changes: 12 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.vscode/*
.history/*
.github/*
.git/*
dist/*
docs/*
misc/*
node_modules/*
tools/*
tsconfigs/*

src/*
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
semi: true,
trailingComma: "all",
singleQuote: false,
printWidth: 120,
tabWidth: 4,
};
Loading

0 comments on commit 830881a

Please sign in to comment.