Skip to content

Commit

Permalink
fix: eslint config & typescript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
0age committed Dec 6, 2024
1 parent 8db4563 commit 3d3e3c6
Show file tree
Hide file tree
Showing 15 changed files with 1,839 additions and 889 deletions.
28 changes: 28 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended'
],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module'
},
rules: {
'no-console': ['error', { allow: ['warn', 'error'] }],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }]
},
overrides: [
{
files: ['src/types/*.d.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
},
},
],
ignorePatterns: ['frontend/**/*', 'dist/**/*', 'node_modules/**/*'],
}
15 changes: 0 additions & 15 deletions .eslintrc.js

This file was deleted.

33 changes: 0 additions & 33 deletions eslint.config.js

This file was deleted.

38 changes: 38 additions & 0 deletions frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended'
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
jsx: true
},
tsconfigRootDir: __dirname,
project: ['tsconfig.app.json', 'tsconfig.node.json']
},
plugins: [
'react',
'react-refresh',
'@typescript-eslint'
],
settings: {
react: {
version: 'detect'
}
},
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true }
],
'@typescript-eslint/no-explicit-any': 'warn',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off'
}
}
30 changes: 0 additions & 30 deletions frontend/eslint.config.js

This file was deleted.

7 changes: 4 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@
"wagmi": "^2.13.3"
},
"devDependencies": {
"@eslint/js": "^9.15.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"@vitejs/plugin-react": "^4.3.4",
"eslint": "^9.15.0",
"eslint": "^8.56.0",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"globals": "^15.12.0",
"typescript": "~5.6.2",
"typescript-eslint": "^8.15.0",
"vite": "^6.0.1"
}
}
Loading

0 comments on commit 3d3e3c6

Please sign in to comment.