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 --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
- Targets all files ending in
-
eslint:fix
targets the same files and configuration but attempts to auto-fix -
lint:js
alias foreslint
-
lint:js:fix
alias 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.