1.5.0 • Published 3 years ago

js-lints v1.5.0

Weekly downloads
1
License
MIT
Repository
-
Last release
3 years ago

JS-lints

Intro

Setup

  • Add package to you project
yarn add js-lints --dev

Scripts

  • Add scripts to package.json
    "scripts": {
        "eslint": "eslint ./**/*.{js,json,html,php,vue,md} -c .eslintrc.js --no-eslintrc",
        "eslint:fix": "yarn eslint --fix",
        "lint:js": "yarn eslint",
        "lint:js:fix": "yarn eslint:fix"
    }
  • eslint: This is the main script.
    • Targets all files ending in js,json,html,php,vue,md,yml,yaml
    • Sets default configuration: .eslintrc.js
  • eslint:fix targets the same files and configuration but attempts to auto-fix
  • lint:js alias for eslint
  • lint:js:fix alias for eslint:fix

Addons

eslint-plugin-compat

eslint-plugin-eslint-comments

eslint-plugin-filenames

eslint-plugin-html

eslint-plugin-jest

eslint-plugin-jsdoc

eslint-plugin-json

eslint-plugin-markdown

eslint-plugin-no-loops

eslint-plugin-promise

eslint-plugin-vue