Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@vue/cli-plugin-eslint
Advanced tools
@vue/cli-plugin-eslint is a Vue CLI plugin that adds ESLint support to your Vue.js projects. It helps in maintaining code quality and consistency by integrating ESLint, a popular linting tool for JavaScript, into the Vue development workflow.
Linting on Save
This feature enables linting of your code every time you save a file. It helps catch errors and enforce coding standards in real-time.
module.exports = {
lintOnSave: true
};
Custom ESLint Configuration
This feature allows you to customize the ESLint configuration to fit your project's specific needs. You can add custom rules, plugins, and settings.
module.exports = {
lintOnSave: true,
configureWebpack: {
module: {
rules: [
{
enforce: 'pre',
test: /\.js$/,
loader: 'eslint-loader',
exclude: /node_modules/
}
]
}
}
};
Linting Scripts
This feature adds a linting script to your package.json file, enabling you to run ESLint checks via the command line. This is useful for integrating linting into your CI/CD pipeline.
{
"scripts": {
"lint": "vue-cli-service lint"
}
}
ESLint is a widely-used linting tool for JavaScript. It can be used independently of Vue CLI and offers extensive customization options. While @vue/cli-plugin-eslint integrates ESLint into Vue projects seamlessly, ESLint itself can be used in any JavaScript project.
eslint-plugin-vue is a plugin for ESLint that provides linting rules specific to Vue.js. It can be used alongside ESLint to enforce Vue-specific coding standards. While @vue/cli-plugin-eslint includes this plugin by default, eslint-plugin-vue can be added to any ESLint configuration.
vue-eslint-parser is a parser for ESLint that allows it to lint Vue.js template files. It works with eslint-plugin-vue to provide comprehensive linting for Vue components. This parser is included in @vue/cli-plugin-eslint but can also be used independently.
eslint plugin for vue-cli
vue-cli-service lint
Usage: vue-cli-service lint [options] [...files]
Options:
--format [formatter] specify formatter (default: codeframe)
--no-fix do not fix errors
--max-errors specify number of errors to make build failed (default: 0)
--max-warnings specify number of warnings to make build failed (default: Infinity)
Lints and fixes files. If no specific files are given, it lints all files in src
and test
.
Other ESLint CLI options are also supported.
ESLint can be configured via .eslintrc
or the eslintConfig
field in package.json
.
Lint-on-save during development with eslint-loader
is enabled by default. It can be disabled with the lintOnSave
option in vue.config.js
:
module.exports = {
lintOnSave: false
}
vue add @vue/eslint
config.module.rule('eslint')
config.module.rule('eslint').use('eslint-loader')
3.0.0-beta.16 (2018-06-08)
window.yourLib.default
, and in the CommonJS build as
const yourLib = require('yourLib').default
. If you don't have named exports
and want to retain the previous behavior, you can configure webpack to use
output.libraryExport: 'default'
in vue.config.js
.file-icon
for the configurations is removedicon
option changed and is now working differently: you can either use a material icon code or a custom image (see Public static files in the UI Plugin docs).icon
option which works exactly the sameFAQs
eslint plugin for vue-cli
The npm package @vue/cli-plugin-eslint receives a total of 356,959 weekly downloads. As such, @vue/cli-plugin-eslint popularity was classified as popular.
We found that @vue/cli-plugin-eslint demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.