1.5.0 • Published 5 years ago
js-lints v1.5.0
JS-lints
Intro
- This package is an opinionated list of defaults for linting JavaScript and other files.
- ESLINT getting started
- List of ESLINT rules.
Setup
- Add package to you project
yarn add js-lints --devScripts
- 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
- Targets all files ending in
eslint:fixtargets the same files and configuration but attempts to auto-fixlint:jsalias foreslintlint:js:fixalias foreslint:fix
Addons
eslint-plugin-compat
eslint-plugin-eslint-comments
eslint-plugin-filenames
- Adds eslint rules to ensure consistent filenames for your JavaScript files.
- This plugin is not actively maintained.