2.0.5 • Published 10 months ago

@estarossa/eslint-quicksetup v2.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

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-quicksetup

or

yarn add -D @estarossa/eslint-quicksetup

or

pnpm add -D @estarossa/eslint-quicksetup

Usage

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:

  1. Create a folder names .vscode in your workspace root.
  2. Create a file inside it named settings.json
  3. 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!