2.0.7 • Published 10 months ago
@estarossa/eslint-quicksetup v2.0.7
Eslint quicksetup
eslint-quicksetup is an Eslint configuration for Nextjs selected by me, after getting tired of copying my preferred eslint rules each new project I decided to just group them as a package and maintain them better.
Installation
You can install eslint-quicksetup using your preferred package manager:
npm install -D @estarossa/eslint-quicksetupor
yarn add -D @estarossa/eslint-quicksetupor
pnpm add -D @estarossa/eslint-quicksetupUsage
Create a file named .eslintrc.js in your root folder and copy the following configuration.
// @ts-check
/** @type {import("eslint").Linter.Config} */
module.exports = {
extends: [require.resolve('@estarossa/eslint-quicksetup/config')],
parserOptions: {
project: './tsconfig.json',
},
};Integration
eslint-quicksetup can be seamlessly integrated with Vscode, Although you may need to setup its settings:
- Create a folder names
.vscodein your workspace root. - Create a file inside it named
settings.json Paste the following settings:
{ "[css]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[javascript]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" }, "[javascriptreact]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" }, "[typescript]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" }, "[typescriptreact]": { "editor.defaultFormatter": "dbaeumer.vscode-eslint" }, "eslint.validate": [ "javascript", "javascriptreact", "typescript", "typescriptreact" ] }
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
eslint-quicksetup is licensed under the MIT License.
Happy coding!