1.2.0 • Published 4 years ago

@puthnith/eslint-config-dust v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@puthnith/eslint-config-dust

npm version

The simplest ESLint configuration integrated with Prettier

Peer Dependencies

This package requires typescript (^3.x) and eslint (^7.x).

Setup

  1. Install this package and its dependencies
npm i --save-dev typescript eslint @puthnith/eslint-config-dust
  1. Add it to your .eslintrc.json or package.json
{ "extends": "@puthnith/dust" }
{ "eslintConfig": { "extends": "@puthnith/dust" } }

Vscode

If you use vscode, you may want to fix the code on save. This requires two extensions, microsoft/vscode-eslint and prettier/prettier-vscode. After you have the extensions, you can add the below configuration to your global or local settings (.vscode/settings.json).

{
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }
}

If you use prettier, you may want to config in the settings.

{
  "prettier.printWidth": 120,
  "prettier.semi": false,
  "prettier.singleQuote": false,
  "prettier.tabWidth": 2,
  "prettier.trailingComma": "all"
}

If you don't want to pollute your settings, you can add this to your project, package.json or .prettierrc.

{
  "prettier": {
    "printWidth": 120,
    "semi": false,
    "singleQuote": false,
    "tabWidth": 2,
    "trailingComma": "all"
  }
}

Check out puthnith/hello-node for a project template using this package.