Skip to content

Commit

Permalink
Fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
riccjohn committed Feb 22, 2025
1 parent 797ca0e commit 25f335a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 21 deletions.
51 changes: 31 additions & 20 deletions eslint.config.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,35 @@
import { defineConfig } from 'eslint-define-config'
import tseslint from '@typescript-eslint/eslint-plugin'
import tsParser from '@typescript-eslint/parser'
import prettier from 'eslint-plugin-prettier'
import eslintConfigPrettier from 'eslint-config-prettier'

export default defineConfig({
overrides: [
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
export default [
{
ignores: ['dist/*', 'node_modules/*', 'build/*', 'coverage/*'],
},
{
files: ['*.ts', '*.tsx'],
languageOptions: {
parser: tsParser,
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
window: 'readonly',
document: 'readonly',
console: 'readonly',
module: 'readonly',
process: 'readonly',
},
},
],
env: {
node: true,
browser: true,
plugins: {
'@typescript-eslint': tseslint,
prettier: prettier,
},
rules: {
...tseslint.configs.recommended.rules, // TypeScript rules
...eslintConfigPrettier.rules, // Prettier rules
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
},
},
})
]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"lint-staged": {
"*.{js,jsx,ts,tsx,json,md}": [
"prettier --write",
"eslint --fix",
"pnpm lint --fix",
"pnpm test:ci"
]
},
Expand Down
1 change: 1 addition & 0 deletions setupTests.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { afterAll, afterEach, beforeAll, expect, test } from 'vitest'

0 comments on commit 25f335a

Please sign in to comment.