Skip to content
This repository has been archived by the owner on Feb 1, 2025. It is now read-only.

Latest commit

 

History

History
38 lines (30 loc) · 1.11 KB

LINTER.md

File metadata and controls

38 lines (30 loc) · 1.11 KB

Linter

ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code.

npm install --save-dev eslint eslint-plugin-react eslint-plugin-react-hooks
npm install --save-dev @next/eslint-plugin-next
npm install --save-dev eslint-plugin-import eslint-import-resolver-typescript
npm install --save-dev @typescript-eslint/parser @typescript-eslint/eslint-plugin 
npm install --save-dev prettier eslint-plugin-prettier eslint-config-prettier
npm install --save-dev eslint-plugin-tailwindcss prettier-plugin-tailwindcss

Edit next.config.js:

module.exports = {
  eslint: {
    // Warning: This allows production builds to successfully complete even if
    // your project has ESLint errors.
    ignoreDuringBuilds: true,
  },
}

Find and fix problems in your JavaScript code.

npx eslint ./app
npx eslint --fix ./{app,components,config,context,hooks,lib,queries,store,types}

To format a file in-place.

npx prettier --check "./app/**/*.{ts,tsx}"
npx prettier --write "./{app,components,config,context,hooks,lib,queries,store,types}/**/*.{ts,tsx}"