Skip to content

Elmar101/Eslint-React-Webpack

Repository files navigation

React Webpack Eslint Typescript Project

use pnpm

npm init @eslint/config@latest | pnpm create @eslint/config@latest | yarn create @eslint/config | bun create @eslint/config@latest

check file => pnpm dlx eslint project-dir/yourfile.js | npx eslint --config eslint.config.mjs project-dir/yourfile.js | npx eslint -c eslint.config.mjs project-dir/yourfile.js

EX: npx eslint --config eslint.config.mjs src/App.tsx | pnpm dlx eslint src/App.tsx | yarn dlx eslint src/App.tsx | bun dlx eslint src/App.tsx

You can also manually set up ESLint in your project.

npm install --save-dev eslint @eslint/js | pnpm add --save-dev eslint @eslint/js | yarn add --dev eslint @eslint/js | bun add --dev eslint @eslint/js

Create JavaScript configuration file

touch eslint.config.js

Add configuration to the eslint.config.js file. Refer to the Configure ESLint documentation to learn how to add rules, custom configurations, plugins, and more.

eslint.config.js add follow code

import js from "@eslint/js";

export default [ js.configs.recommended,

{ rules: { "no-unused-vars": "warn", "no-undef": "warn" } } ];

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors