-
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:Resolved typescript fixes for components
- Loading branch information
1 parent
387dae4
commit e79373d
Showing
60 changed files
with
5,159 additions
and
3,802 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
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 |
---|---|---|
@@ -0,0 +1,100 @@ | ||
import globals from 'globals'; | ||
import tseslint from 'typescript-eslint'; | ||
import eslintConfigPrettier from 'eslint-config-prettier'; | ||
import reactPlugin from 'eslint-plugin-react'; | ||
import reactHooksPlugin from 'eslint-plugin-react-hooks'; | ||
import importPlugin from 'eslint-plugin-import'; | ||
|
||
export default tseslint.config( | ||
{ | ||
files: ['src/**/*.ts', 'src/**/*.tsx'], | ||
ignores: ['**/node_modules/**', 'build/**', 'dist/**'], | ||
languageOptions: { | ||
parser: tseslint.parser, | ||
parserOptions: { | ||
project: './tsconfig.json', | ||
ecmaVersion: 2022, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
globals: { | ||
...globals.browser, | ||
...globals.node, | ||
...globals.jest, | ||
}, | ||
}, | ||
plugins: { | ||
'@typescript-eslint': tseslint.plugin, | ||
react: reactPlugin, | ||
'react-hooks': reactHooksPlugin, | ||
import: importPlugin, | ||
}, | ||
rules: { | ||
// TypeScript rules | ||
'@typescript-eslint/no-explicit-any': 'error', | ||
'@typescript-eslint/explicit-module-boundary-types': 'error', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
argsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
}, | ||
], | ||
'@typescript-eslint/no-floating-promises': 'error', | ||
'@typescript-eslint/no-misused-promises': 'error', | ||
'@typescript-eslint/await-thenable': 'error', | ||
'@typescript-eslint/no-unnecessary-type-assertion': 'error', | ||
'@typescript-eslint/no-non-null-assertion': 'error', | ||
|
||
// Import rules | ||
'import/no-unresolved': 'error', | ||
'import/named': 'error', | ||
'import/namespace': 'error', | ||
'import/default': 'error', | ||
'import/export': 'error', | ||
'import/order': [ | ||
'error', | ||
{ | ||
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'], | ||
pathGroups: [ | ||
{ | ||
pattern: '@/**', | ||
group: 'internal', | ||
}, | ||
], | ||
'newlines-between': 'always', | ||
alphabetize: { | ||
order: 'asc', | ||
}, | ||
}, | ||
], | ||
'import/no-cycle': 'error', | ||
'import/no-self-import': 'error', | ||
'import/no-useless-path-segments': 'error', | ||
|
||
// React rules | ||
'react/react-in-jsx-scope': 'off', | ||
'react/prop-types': 'off', | ||
'react-hooks/rules-of-hooks': 'error', | ||
'react-hooks/exhaustive-deps': 'warn', | ||
|
||
// General rules | ||
'no-console': ['warn', { allow: ['error'] }], | ||
'no-debugger': 'error', | ||
'no-alert': 'error', | ||
'max-len': [ | ||
'error', | ||
{ | ||
code: 100, | ||
ignoreUrls: true, | ||
ignoreStrings: true, | ||
ignoreTemplateLiterals: true, | ||
ignoreRegExpLiterals: true, | ||
}, | ||
], | ||
}, | ||
}, | ||
eslintConfigPrettier | ||
); |
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.