Skip to content

Commit

Permalink
chore(typescript): use extra eslint configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonGolms committed Nov 18, 2023
1 parent 327cf5e commit 7ab72e3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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' }],
Expand Down
7 changes: 7 additions & 0 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"rootDir": "."
},
"extends": "./tsconfig.json",
"include": [".", "./.eslintrc.js", "./.releaserc.js", "./jest.config.ts"]
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"target": "es5",
"types": ["jest", "node"]
},
"include": ["src/**/*", "./.eslintrc.js", "./.releaserc.js", "./jest.config.ts"],
"include": ["src/**/*"],
"exclude": ["node_modules"]
}

0 comments on commit 7ab72e3

Please sign in to comment.