Skip to content

Commit

Permalink
fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Sep 29, 2023
1 parent e487c13 commit a9181b4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 61 deletions.
72 changes: 23 additions & 49 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,26 @@
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"standard"
],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"env": { "node": true },
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"project": "./tsconfig.eslint.json",
"createDefaultProgram": true
},
"rules": {
"no-console": "off",
"@typescript-eslint/indent": ["error", 2],
"semi": ["error", "never"],
"import/export": "off" // this errors on multiple exports (overload interfaces)
},
"overrides": [
{
"files": ["*.d.ts","*.test-d.ts"],
"rules": {
"no-use-before-define": "off",
"no-redeclare": "off",
"@typescript-eslint/no-explicit-any": "off"
}
"plugins": ["@typescript-eslint"],
"extends": ["eslint:recommended", "standard"],
"overrides": [
{
"files": ["types/*.test-d.ts", "types/*.d.ts"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.eslint.json"]
},
{
"files": ["*.test-d.ts"],
"rules": {
"no-unused-expressions": "off",
"@typescript-eslint/no-var-requires": "off",
"no-unused-vars": "off",
"n/handle-callback-err": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-misused-promises": ["error", {
"checksVoidReturn": false
}]
},
"globals": {
"NodeJS": "readonly"
}
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"rules": {
"no-unused-expressions": "off",
"no-use-before-define": "off",
"no-redeclare": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-unused-vars": "off"
}
]
}
}
]
}
21 changes: 9 additions & 12 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{
"compilerOptions": {
"target": "es6",
"lib": [ "es2015", "ES2018" ],
"module": "commonjs",
"noEmit": true,
"strict": true
},
"include": [
"types/*.test-d.ts",
"types/*.d.ts"
]
}
"compilerOptions": {
"target": "es6",
"lib": ["ES2015", "ES2018"],
"module": "commonjs",
"noEmit": true,
"strict": true
},
"include": ["types/*.test-d.ts", "types/*.d.ts"]
}

0 comments on commit a9181b4

Please sign in to comment.