2025-01-14 18:28:30 +03:00
|
|
|
import globals from 'globals'
|
|
|
|
import pluginJs from '@eslint/js'
|
|
|
|
import tseslint from 'typescript-eslint'
|
|
|
|
import pluginReact from 'eslint-plugin-react'
|
2024-10-22 21:29:29 +03:00
|
|
|
import stylistic from '@stylistic/eslint-plugin'
|
|
|
|
|
|
|
|
export default [
|
2025-01-14 18:28:30 +03:00
|
|
|
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
|
2024-10-22 21:29:29 +03:00
|
|
|
{ languageOptions: { globals: globals.browser } },
|
|
|
|
pluginJs.configs.recommended,
|
|
|
|
...tseslint.configs.recommended,
|
|
|
|
pluginReact.configs.flat.recommended,
|
|
|
|
{
|
|
|
|
plugins: {
|
2025-01-14 18:28:30 +03:00
|
|
|
'@stylistic': stylistic,
|
2024-10-22 21:29:29 +03:00
|
|
|
},
|
2025-01-14 18:28:30 +03:00
|
|
|
rules: {
|
|
|
|
'no-unused-vars': 'off',
|
|
|
|
'react/prop-types': 'off',
|
|
|
|
'@typescript-eslint/no-unused-vars': [
|
|
|
|
'warn', // or "error"
|
2024-10-22 21:29:29 +03:00
|
|
|
{
|
2025-01-14 18:28:30 +03:00
|
|
|
argsIgnorePattern: '^_',
|
|
|
|
varsIgnorePattern: '^_',
|
|
|
|
caughtErrorsIgnorePattern: '^_',
|
|
|
|
},
|
2024-10-22 21:29:29 +03:00
|
|
|
],
|
2025-01-14 18:28:30 +03:00
|
|
|
'sort-imports': [
|
|
|
|
'error',
|
|
|
|
{
|
|
|
|
ignoreCase: false,
|
|
|
|
ignoreDeclarationSort: true,
|
|
|
|
ignoreMemberSort: false,
|
|
|
|
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
|
|
|
|
allowSeparatedGroups: true,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
semi: ['error', 'never'],
|
2024-10-22 21:29:29 +03:00
|
|
|
'@stylistic/indent': ['error', 2],
|
|
|
|
},
|
2025-01-14 18:28:30 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
ignores: ['stubs/'],
|
|
|
|
},
|
|
|
|
]
|