-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refactor, typed enhacement (#27)
- Loading branch information
1 parent
f98db0e
commit 7e95639
Showing
87 changed files
with
715 additions
and
934 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,39 @@ | ||
module.exports = { | ||
root: true, | ||
env: { browser: true, es2020: true, node: true }, | ||
env: { browser: true, es2020: true }, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/recommended-type-checked', | ||
'plugin:react-hooks/recommended', | ||
'plugin:react/jsx-runtime', | ||
'plugin:prettier/recommended', | ||
'plugin:react-query/recommended', | ||
], | ||
ignorePatterns: ['dist', '.eslintrc.cjs'], | ||
ignorePatterns: ['dist', '.eslintrc.cjs'], // Ignore output and config files | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features | ||
sourceType: 'module', // Allows for the use of imports | ||
ecmaVersion: 'latest', // Parse latest ECMAScript features | ||
sourceType: 'module', // Enable import/export syntax | ||
ecmaFeatures: { | ||
jsx: true, // Allows for the parsing of JSX, | ||
jsx: true, // Enable JSX syntax parsing | ||
}, | ||
project: ['./tsconfig.json', './vite.config.ts'], // Use TypeScript project settings for type checking | ||
tsconfigRootDir: __dirname, // Set the root directory for TypeScript config files relative to this file | ||
}, | ||
plugins: ['react-refresh', 'prettier', 'react-query'], | ||
rules: { | ||
'react-refresh/only-export-components': [ | ||
'warn', | ||
{ allowConstantExport: true }, | ||
{ allowConstantExport: true }, // Warn when non-component exports are found | ||
], | ||
'no-use-before-define': 'off', | ||
semi: ['error', 'always'], | ||
'@typescript-eslint/ban-ts-ignore': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-use-before-define': 'off', | ||
'react/no-unescaped-entities': 'off', | ||
'react/react-in-jsx-scope': 'off', | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'warn', | ||
'no-use-before-define': 'off', // TypeScript handles this rule well | ||
semi: ['error', 'always'], // Enforce semicolons at the end of statements | ||
'@typescript-eslint/ban-ts-ignore': 'off', // Allow @ts-ignore (use cautiously) | ||
'@typescript-eslint/no-explicit-any': 'off', // Allow 'any' type (can be tightened later) | ||
'react/no-unescaped-entities': 'off', // Allow unescaped characters in JSX (like `&`) | ||
'react-hooks/rules-of-hooks': 'error', // Enforce React Hooks rules | ||
'react-hooks/exhaustive-deps': 'warn', // Warn about missing dependencies in hooks | ||
'@typescript-eslint/no-unsafe-argument': 'warn', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.