kfu-24-teacher/eslint.config.js

40 lines
998 B
JavaScript
Raw Permalink Normal View History

2024-11-09 19:15:21 +03:00
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
}
},
2024-12-07 14:14:21 +03:00
{
files: ['stubs/api/**/*'],
rules: {
'@typescript-eslint/no-require-imports': 'off'
}
},
2024-11-09 19:15:21 +03:00
pluginPrettier
];