29 lines
797 B
JavaScript
29 lines
797 B
JavaScript
import js from '@eslint/js';
|
|
import globals from 'globals';
|
|
import tseslint from 'typescript-eslint';
|
|
import pluginReact from 'eslint-plugin-react';
|
|
import { defineConfig } from 'eslint/config';
|
|
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
|
|
export default defineConfig([
|
|
{
|
|
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
|
|
plugins: { js },
|
|
extends: ['js/recommended'],
|
|
},
|
|
{
|
|
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
|
|
languageOptions: { globals: globals.browser },
|
|
},
|
|
tseslint.configs.recommended,
|
|
pluginReact.configs.flat.recommended,
|
|
{
|
|
files: ['webpack.config.js'],
|
|
languageOptions: { globals: globals.node },
|
|
rules: {
|
|
'@typescript-eslint/no-require-imports': 'off',
|
|
},
|
|
},
|
|
eslintPluginPrettierRecommended,
|
|
]);
|