Closed Nijat-Hamid closed 1 year ago
You need to configure ESLint first. To start a configuration from scratch see the documentation: https://eslint.org/docs/latest/user-guide/getting-started
Otherwise, you can get started with the same rules as with CRA here: https://github.com/facebook/create-react-app/tree/main/packages/eslint-config-react-app#usage-outside-of-create-react-app
Hi. I installed Plugin Eslint for Vite 4.0. But it show this error on vs console.
ConfigurationNotFoundError: No ESLint configuration found in C:\Users\Huawei\Desktop\Vite\vite-js-maximorum\src. at CascadingConfigArrayFactory._finalizeConfigArray (C:\Users\Huawei\Desktop\Vite\vite-js-maximorum\node_modules\@eslint\eslintrc\dist\eslintrc.cjs:3977:19) at CascadingConfigArrayFactory.getConfigArrayForFile (C:\Users\Huawei\Desktop\Vite\vite-js-maximorum\node_modules\@eslint\eslintrc\dist\eslintrc.cjs:3768:21) at CLIEngine.isPathIgnored (C:\Users\Huawei\Desktop\Vite\vite-js-maximorum\node_modules\eslint\lib\cli-engine\cli-engine.js:989:18) at ESLint.isPathIgnored (C:\Users\Huawei\Desktop\Vite\vite-js-maximorum\node_modules\eslint\lib\eslint\eslint.js:681:26) at MessagePort. (C:\Users\Huawei\Desktop\Vite\vite-js-maximorum\node_modules\@nabla\vite-plugin-eslint\src\worker.js:14:6)
I need like CRA level Eslint rules. How to configure? I use React+SWC pluging. I dont use typescript yet.
This is my Vite Config file:
import { defineConfig } from 'vite' import react from '@vitejs/plugin-react-swc' import eslintPlugin from "@nabla/vite-plugin-eslint";
// https://vitejs.dev/config/ export default defineConfig({ plugins: [react(),eslintPlugin()], build:{ outDir:'build' }, server: { open: true, }, })