
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
vue-prettier-plugin
Advanced tools
VuePrettierPlugin 是一个用于在 Vue2 项目中自动格式化代码的 Webpack 插件。该插件不需要依赖vscode中的prettier插件,添加该插件后即可在运行时根据配置项格式化文件。
使用 npm 进行安装:
npm install vue-prettier-plugin --save-dev
在你的 vue.config.js 文件中引入和使用插件:
const VuePrettierPlugin = require('vue-prettier-plugin');
module.exports = {
// ...其他配置
configureWebpack: {
plugins: [
new VuePrettierPlugin(
{
// Prettier 格式化选项
printWidth: 100,
tabWidth: 4,
// ...其他选项
},
'src/',//格式化文件路径,默认 src/
),
],
},
};
option(Object):Prettier 格式化选项,具体配置参考 Prettier 文档。watchOptions(Object):监视选项,用于指定需要监视的目录和文件。watchDirs(Array|string,默认为 'src/'):需要监视的目录路径,可以是字符串或字符串数组。vue-loader 和 vue-template-compiler。star! github地址:vue-prettier-pluginVuePrettierPlugin is a Webpack plugin designed to automatically format code in Vue2 projects. This plugin does not require the prettier extension found in vscode. Once added, it enables runtime code formatting based on the configuration settings.
Install using npm:
npm install vue-prettier-plugin --save-dev
Import and use the plugin in your vue.config.js file:
const VuePrettierPlugin = require('vue-prettier-plugin');
module.exports = {
// ...other configurations
configureWebpack: {
plugins: [
new VuePrettierPlugin(
{
// Prettier formatting options
printWidth: 100,
tabWidth: 4,
// ...other options
},
'src/',//Format file path, default src/
),
],
},
};
option (Object): Prettier formatting options, refer to the Prettier documentation for specific configuration.watchOptions (Object): Watch options for specifying directories and files to monitor.watchDirs (Array|string, default is 'src/'): Directories to be watched, can be a string or an array of strings.vue-loader and vue-template-compiler installed.star! GitHub repository link: vue-prettier-pluginFAQs
vue
We found that vue-prettier-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.