Add initial project files

This commit is contained in:
Igor Martyniuk
2026-09-01 13:03:41 +03:00
parent 22e111bb44
commit 74cb5b6176
1841 changed files with 242819 additions and 30 deletions
+61
View File
@@ -0,0 +1,61 @@
import prettierConfig from 'eslint-config-prettier';
import reactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';
import globals from 'globals';
import tseslint from 'typescript-eslint';
const cleanGlobals = Object.fromEntries(
Object.entries(globals.browser).map(([key, value]) => [key.trim(), value])
);
export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [...tseslint.configs.recommended, prettierConfig],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: cleanGlobals
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh
},
rules: {
...reactHooks.configs.recommended.rules,
'@typescript-eslint/no-unused-vars': [
'warn',
{
/*
* Check all function arguments for usage
**/
args: 'all',
/*
* Ignore function arguments that start with "_" (e.g., `_arg`)
**/
argsIgnorePattern: '^_',
/*
* Check all caught error variables in try/catch
**/
caughtErrors: 'all',
/*
*Ignore caught errors that start with "_" (e.g., `catch (_err)`)
**/
caughtErrorsIgnorePattern: '^_',
/*
* Ignore unused elements in array destructuring if they start with "_"
**/
destructuredArrayIgnorePattern: '^_',
/*
* Ignore variables declared but not used if they start with "_"
**/
varsIgnorePattern: '^_',
/*
* Ignore unused variables when using object rest spread (e.g., `const { a, ...rest } = obj;`)
**/
ignoreRestSiblings: true
}
]
}
}
);