You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.2 KiB
JavaScript
50 lines
1.2 KiB
JavaScript
import js from '@eslint/js';
|
|
import globals from 'globals';
|
|
import react from 'eslint-plugin-react';
|
|
import reactHooks from 'eslint-plugin-react-hooks';
|
|
import jsxA11y from 'eslint-plugin-jsx-a11y';
|
|
import tsPlugin from '@typescript-eslint/eslint-plugin';
|
|
import tsParser from '@typescript-eslint/parser';
|
|
import eslintConfigPrettier from 'eslint-config-prettier';
|
|
|
|
export default [
|
|
{
|
|
ignores: ['dist/**', 'node_modules/**'],
|
|
},
|
|
js.configs.recommended,
|
|
{
|
|
files: ['**/*.{ts,tsx}'],
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
parserOptions: {
|
|
ecmaVersion: 'latest',
|
|
sourceType: 'module',
|
|
},
|
|
globals: {
|
|
...globals.browser,
|
|
},
|
|
},
|
|
plugins: {
|
|
'@typescript-eslint': tsPlugin,
|
|
react,
|
|
'react-hooks': reactHooks,
|
|
'jsx-a11y': jsxA11y,
|
|
},
|
|
rules: {
|
|
...tsPlugin.configs.recommended.rules,
|
|
...react.configs.recommended.rules,
|
|
...react.configs['jsx-runtime'].rules,
|
|
...reactHooks.configs.recommended.rules,
|
|
...jsxA11y.configs.recommended.rules,
|
|
'react/prop-types': 'off',
|
|
'no-undef': 'off',
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: 'detect',
|
|
},
|
|
},
|
|
},
|
|
eslintConfigPrettier,
|
|
];
|