add first services
This commit is contained in:
32
.eslintrc.cjs
Normal file
32
.eslintrc.cjs
Normal file
@ -0,0 +1,32 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: { browser: true, es2021: true, jest: true },
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'plugin:react/recommended',
|
||||
'plugin:react-hooks/recommended',
|
||||
'plugin:jsx-a11y/recommended',
|
||||
'prettier', // Важно: prettier должен быть последним
|
||||
],
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
sourceType: 'module',
|
||||
project: './tsconfig.json', // Для правил, требующих информацию о типах
|
||||
},
|
||||
plugins: ['react', '@typescript-eslint', 'jsx-a11y'],
|
||||
settings: {
|
||||
react: {
|
||||
version: 'detect', // Автоматически определять версию React
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
// Отключаем правило, которое не нужно с новым JSX-трансформером
|
||||
'react/react-in-jsx-scope': 'off',
|
||||
// Мы используем TypeScript, поэтому prop-types не нужны
|
||||
'react/prop-types': 'off',
|
||||
// Пример кастомного правила: требовать явное указание возвращаемого типа функции
|
||||
'@typescript-eslint/explicit-function-return-type': 'warn',
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user