@maons/lint

0.6.4 • Public • Published

Lint rules and static code analysis

ESLint and Prettier configuration ready to use in any project.

It includes support for React.js, Tailwindcss and Prettier.

Getting Started

Install

npm install @maons/lint --save-dev

Configuration

ESLint

Add the following to your package.json:

{
  "eslintConfig": {
    "extends": "@maons/lint/.eslintrc.js"
  }
}

or create a .eslintrc.js file with the following content:

module.exports = {
  root: true,
  extends: '@maons/lint/.eslintrc.js',
};

Prettier

Add the following to your package.json:

{
  "prettier": "@maons/lint/.prettierrc.js"
}

Visual Studio Code Integration

Steps to integrate @maons/lint with Visual Studio Code:

  1. Install ESLint and Prettier plugins:
  1. Add the following to your VSCode settings.json:
{
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[typescript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "editor.codeActionsOnSave": {
    "source.fixAll.tslint": true,
    "source.fixAll.eslint": true
  },
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact"
  ]
}

License

Licensed under the MIT license.

(back to top)

Readme

Keywords

none

Package Sidebar

Install

npm i @maons/lint

Weekly Downloads

4

Version

0.6.4

License

MIT

Unpacked Size

12.6 kB

Total Files

6

Last publish

Collaborators

  • rmoral