46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
JavaScript
import js from '@eslint/js';
|
|
import react from 'eslint-plugin-react';
|
|
import reactJsxRuntime from 'eslint-plugin-react/jsx-runtime';
|
|
import typescript from '@typescript-eslint/eslint-plugin';
|
|
import prettier from 'eslint-plugin-prettier';
|
|
import tsParser from '@typescript-eslint/parser';
|
|
|
|
export default [
|
|
{
|
|
root: true,
|
|
languageOptions: {
|
|
parser: tsParser,
|
|
parserOptions: {
|
|
project: './tsconfig.json'
|
|
}
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: 'detect'
|
|
}
|
|
},
|
|
plugins: {
|
|
react,
|
|
prettier,
|
|
'@typescript-eslint': typescript
|
|
},
|
|
rules: {
|
|
...js.configs.recommended.rules,
|
|
...react.configs.recommended.rules,
|
|
...reactJsxRuntime.configs.recommended.rules,
|
|
...typescript.configs.recommended.rules,
|
|
...prettier.configs.recommended.rules,
|
|
|
|
'prettier/prettier': ['error', { singleQuote: true, endOfLine: 'auto' }],
|
|
'arrow-body-style': 'off',
|
|
'prefer-arrow-callback': 'off'
|
|
},
|
|
ignores: ['craco.config.ts'],
|
|
environment: {
|
|
browser: true,
|
|
es2021: true,
|
|
jest: true
|
|
}
|
|
}
|
|
];
|