@jkx5/eslint-config-js-vue2
v0.0.9
Published
ESLinter configuration for JavaScript Vue.js (version 2) projects
Downloads
3
Readme
eslint-config-js-vue2
npm i -D eslint @jkx5/eslint-config-js-vue2
Shared ESLint configuration for JavaScript projects
This ESLint configuration deactivates all formatting rules of ESLint and makes sure that Prettier is used for code beautifying.
Integrate into new project
- Install this package as devDependency
# with Yarn
$ yarn add -D @jkx5/eslint-config-js-vue2
# with npm
$ npm i -D @jkx5/eslint-config-js-vue2
# with pnpm
$ pnpm add -D @jkx5/eslint-config-js-vue2
- Install peer dependencies of this package in your project as devDependencies
Therefore, you can make use of the tool install-peerdeps:
# with Yarn
$ yarn dlx install-peerdeps --dev @jkx5/eslint-config-js-vue2
# with npm
$ npx install-peerdeps --dev @jkx5/eslint-config-js-vue2
#with pnpm
$ pnpm dlx install-peerdeps --dev @jkx5/eslint-config-js-vue2
Instead, you can do this manually by adding all entries part of the peerDependencies
property (see package.json
).
- Use ESLint config in your project
Create a .eslintrc.js
file in project root with the following content:
module.exports = {
extends: ["@jkx5/eslint-config-js-vue2"],
};
4. Update package.json
Add npm commands to the scripts
section in package.json
file
{
"eslint:check": "eslint \"src/**/*.{js,vue}\"",
"eslint:fix": "eslint \"src/**/*.{js,vue}\" --fix"
}