
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@baiducloud/eslint-config
Advanced tools
Console 控制台前端业务使用的 ESlint 配置,基于v8.21.0引入的新版配置实现,后续的 v9 版本中.eslintrc*将不再支持。
✔ 基于@ecomfe/eslint-config扩展
如果需要添加一个插件,那么这个插件应该被指定为 peerDependency,这是因为插件将在最终用户的项目中被加载,所以最终用户需要自己安装他们需要的插件。之后,在项目的rules目录下创建demo-rule.js规则文件,将需要实现的规则加入到文件中,例如:
// demo-rule.js
export default {
quotes: [2, 'double']
};
然后在index.js中扩展:
import DemoPlugin from 'eslint-plugin-demo';
import DemoRule from './rules/demo-rule';
{
plugins: {
"demo-plugin": DemoPlugin
}
rules: {
...DemoRule
}
}
如果需要添加一个外部的可共享配置,则需要在package.json中将这些包指定为依赖项,然后在index.js的数组中添加一个FlatConfig
在当前项目中执行npm link,然后在目标项目中执行npm link @baiducloud/eslint-config,这样就可以在目标项目中调试当前项目。
npm i -D @baiducloud/eslint-config
如果使用的 npm 版本小于 7.0,需要手动安装 peerDependency
npm i -D eslint
建议使用新版的 flat config system,即:eslint.config.js是唯一的配置文件名称,.eslintrc*等格式的名称,以及 json、yaml 格式的配置文件都将不再支持。
在ESLint 配置扩展:
export default [
{
rules: {
'semi': 'error',
'prefer-const': 'error'
}
}
];
FAQs
eslint config for javascript project
The npm package @baiducloud/eslint-config receives a total of 8 weekly downloads. As such, @baiducloud/eslint-config popularity was classified as not popular.
We found that @baiducloud/eslint-config demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.