34 lines
886 B
JavaScript
34 lines
886 B
JavaScript
import globals from 'globals';
|
|
import pluginJs from '@eslint/js';
|
|
import tseslint from 'typescript-eslint';
|
|
import pluginReact from 'eslint-plugin-react';
|
|
import pluginPrettier from 'eslint-plugin-prettier/recommended';
|
|
import jsxA11y from 'eslint-plugin-jsx-a11y';
|
|
import hooksPlugin from 'eslint-plugin-react-hooks';
|
|
|
|
/** @type {import('eslint').Linter.Config[]} */
|
|
export default [
|
|
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
|
|
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
|
|
pluginJs.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
{
|
|
settings: {
|
|
react: {
|
|
version: 'detect'
|
|
}
|
|
},
|
|
...pluginReact.configs.flat.recommended
|
|
},
|
|
jsxA11y.flatConfigs.recommended,
|
|
{
|
|
plugins: {
|
|
'react-hooks': hooksPlugin
|
|
},
|
|
rules: {
|
|
...hooksPlugin.configs.recommended.rules
|
|
}
|
|
},
|
|
pluginPrettier
|
|
];
|