From 51e48c0f0ad197b7e9e447219f1174caf32953ac Mon Sep 17 00:00:00 2001 From: DimaDemchenko Date: Tue, 9 Jan 2024 18:06:31 +0200 Subject: [PATCH] added new rule in eslint --- .eslintrc.cjs | 8 +++++++- src/App.tsx | 1 - vite.config.ts | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 5992ed8..b8b3fd9 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -3,7 +3,7 @@ module.exports = { env: { browser: true, es2020: true }, extends: [ 'eslint:recommended', - 'plugin:@typescript-eslint/strict-type-checked', + 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', 'plugin:prettier/recommended', ], @@ -15,5 +15,11 @@ module.exports = { 'warn', { allowConstantExport: true }, ], + 'prettier/prettier': [ + 'error', + { + endOfLine: 'auto', + }, + ], }, } diff --git a/src/App.tsx b/src/App.tsx index afe48ac..dde37c8 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,7 +1,6 @@ import { useState } from 'react' import reactLogo from './assets/react.svg' import viteLogo from '/vite.svg' -import './App.css' function App() { const [count, setCount] = useState(0) diff --git a/vite.config.ts b/vite.config.ts index 5a33944..36f7f4e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,5 +1,5 @@ -import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' +import { defineConfig } from 'vite' // https://vitejs.dev/config/ export default defineConfig({