Skip to content

Commit

Permalink
fix: force tsconfigRootDir to __dirname
Browse files Browse the repository at this point in the history
  • Loading branch information
skarab42 committed Jul 13, 2022
1 parent adfb718 commit 222492a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 31 deletions.
31 changes: 31 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
root: true,
env: { es2022: true, node: true, browser: false },
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./tsconfig.json', './tsconfig.*.json'],
},
plugins: ['@typescript-eslint', 'unicorn'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:@typescript-eslint/strict',
'plugin:import/recommended',
'plugin:import/typescript',
'prettier',
],
rules: {
'no-alert': 'error',
'no-console': 'warn',
'no-debugger': 'warn',
'@typescript-eslint/prefer-ts-expect-error': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
},
settings: {
'import/resolver': {
node: { extensions: ['.ts', '.js', '.cjs', '.mjs'] },
},
},
};
31 changes: 0 additions & 31 deletions .eslintrc.json

This file was deleted.

10 changes: 10 additions & 0 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.default.json",
"compilerOptions": {
"noEmit": true,
"module": "commonjs",
"target": "es2020",
"lib": ["es2020"]
},
"include": [".eslintrc.cjs"]
}

0 comments on commit 222492a

Please sign in to comment.