diff --git a/.eslintrc.js b/.eslintrc.js index 79157ae..688d08b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,4 +1,4 @@ -/** @type {import('eslint').ESLint.ConfigData} */ +/** @type {import('eslint').ESLint.ConfigData & { parserOptions: import('eslint').ESLint.ConfigData['parserOptions'] & import('@typescript-eslint/parser').ParserOptions } } */ module.exports = { env: { 'jest/globals': true, @@ -11,6 +11,9 @@ module.exports = { 'plugin:prettier/recommended', ], ignorePatterns: ['coverage', 'lib', 'node_modules'], + parserOptions: { + project: './tsconfig.eslint.json', + }, rules: { '@typescript-eslint/consistent-type-definitions': ['error', 'type'], 'jest/consistent-test-it': ['error', { fn: 'test' }], diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json new file mode 100644 index 0000000..1a8f93a --- /dev/null +++ b/tsconfig.eslint.json @@ -0,0 +1,7 @@ +{ + "compilerOptions": { + "rootDir": "." + }, + "extends": "./tsconfig.json", + "include": [".", "./.eslintrc.js", "./.releaserc.js", "./jest.config.ts"] +} diff --git a/tsconfig.json b/tsconfig.json index 986aa5e..fa2d6ca 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,6 +11,6 @@ "target": "es5", "types": ["jest", "node"] }, - "include": ["src/**/*", "./.eslintrc.js", "./.releaserc.js", "./jest.config.ts"], + "include": ["src/**/*"], "exclude": ["node_modules"] }