59 lines
1.4 KiB
JavaScript
59 lines
1.4 KiB
JavaScript
import globals from 'globals'
|
|
import pluginJs from '@eslint/js'
|
|
import tseslint from 'typescript-eslint'
|
|
import pluginReact from 'eslint-plugin-react'
|
|
import stylistic from '@stylistic/eslint-plugin'
|
|
|
|
export default [
|
|
{
|
|
settings: {
|
|
react: {
|
|
version: 'detect',
|
|
},
|
|
'import/resolver': {
|
|
node: {
|
|
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
|
|
{ languageOptions: { globals: globals.browser } },
|
|
{
|
|
ignores: ['stubs/', 'bro.config.js'],
|
|
},
|
|
pluginJs.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
pluginReact.configs.flat.recommended,
|
|
{
|
|
plugins: {
|
|
'@stylistic': stylistic,
|
|
},
|
|
rules: {
|
|
'no-unused-vars': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'warn',
|
|
{
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
caughtErrorsIgnorePattern: '^_',
|
|
},
|
|
],
|
|
'sort-imports': [
|
|
'error',
|
|
{
|
|
ignoreCase: false,
|
|
ignoreDeclarationSort: true,
|
|
ignoreMemberSort: true,
|
|
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
|
|
allowSeparatedGroups: true,
|
|
},
|
|
],
|
|
semi: ['error', 'never'],
|
|
'@stylistic/indent': ['error', 2],
|
|
},
|
|
},
|
|
]
|
|
|