Skip to content

Commit

Permalink
chore: Use typescript-eslint v6 features (#36)
Browse files Browse the repository at this point in the history
* chore: Use typescript-eslint v6 features

* Remove overrides
  • Loading branch information
lachlancollins authored Feb 3, 2024
1 parent 961e601 commit f0a22b1
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 63 deletions.
22 changes: 11 additions & 11 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
/** @type {import('eslint').Linter.Config} */
const config = {
root: true,
reportUnusedDisableDirectives: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'import'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/stylistic',
'plugin:import/recommended',
'plugin:import/typescript',
'prettier',
Expand All @@ -18,7 +20,7 @@ const config = {
},
parserOptions: {
tsconfigRootDir: __dirname,
project: './tsconfig.json',
project: true,
sourceType: 'module',
ecmaVersion: 2020,
},
Expand All @@ -34,9 +36,14 @@ const config = {
},
},
rules: {
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/consistent-type-definitions': 'off',
'@typescript-eslint/consistent-type-imports': [
'error',
{ prefer: 'type-imports' },
],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-explicit-any': 'off',
Expand Down Expand Up @@ -76,16 +83,9 @@ const config = {

'no-redeclare': 'off',
'no-shadow': 'error',
'no-undef': 'off',
'sort-imports': ['error', { ignoreDeclarationSort: true }],
},
overrides: [
{
files: ['**/*.test.{ts,tsx}'],
rules: {
'@typescript-eslint/no-unnecessary-condition': 'off',
},
},
],
}

module.exports = config
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
"@types/semver": "^7.5.6",
"@types/stream-to-array": "^2.3.3",
"@types/v8flags": "^3.1.3",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
Expand Down
100 changes: 50 additions & 50 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f0a22b1

Please sign in to comment.