
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
eslint-config-zls
Advanced tools
npm install --save-dev eslint babel-eslint vue-eslint-parser eslint-plugin-vue eslint-config-zls
如果是使用 vue-cli 创建的旧项目,请先移除掉现有的 eslint 相关依赖再重新安装:
npm remove @vue/cli-plugin-eslint eslint babel-eslint eslint-plugin-vue
npm install @vue/cli-plugin-eslint@next eslint babel-eslint vue-eslint-parser eslint-plugin-vue eslint-config-zls
在你的项目的根目录下创建一个 .eslintrc.js
文件,并将以下内容复制进去:
module.exports = {
extends: [
'zls',
'zls/vue',
],
rules: {
// 自定义规则
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
},
};
根目录下创建一个 .eslintignore
文件,并将需要忽略的文件路径填进去,如:
/test/
/dist/
/*.test.js
eslint ^7.11.0
babel-eslint ^10.1.0
vue-eslint-parser ^7.1.1
eslint-plugin-vue ^6.2.2
需要安装的扩展:
ESLint https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
Prettier https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
Prettier-eslint https://marketplace.visualstudio.com/items?itemName=rvest.vs-code-prettier-eslint
Vetur https://marketplace.visualstudio.com/items?itemName=octref.vetur
打开 VsCode 的配置文件 settings.json
填入以下配置:
{
"[vue]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
},
"editor.formatOnSave": true,
}
FAQs
Unknown package
The npm package eslint-config-zls receives a total of 0 weekly downloads. As such, eslint-config-zls popularity was classified as not popular.
We found that eslint-config-zls 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.