Optimize regex literals
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-optimize-regex
:
npm install eslint-plugin-optimize-regex --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-optimize-regex
globally.
Add optimize-regex
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"optimize-regex"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"optimize-regex/optimize-regex": "warn"
}
}
If you wish to add a whitelist
or blacklist
array against regexp-tree
'stransforms, you can add them on an objects object:
{
"rules": {
"optimize-regex/optimize-regex": ["warn", {
"blacklist": ["charClassClassrangesMerge"]
}]
}
}
If you want the latter particular settings, you can avoid setting plugins
andrules
and just use:
{
"extends": ["optimize-regex/recommended"]
}
Or without the blacklist:
{
"extends": ["optimize-regex/all"]
}
MIT © Ezinwa Okpoechi
babel-plugin-import 是一个用于按需加载组件代码和样式的 babel 插件(原理) 1.通过yarn add babel-plugin-import 安装babel-plugin-import插件 yarn add babel-plugin-import 2.在webpack.config.js中添加如下代码进行配置antd的按需加载 ['import',{libraryNa
Serverless Optimize Plugin Bundle with Browserify, transpile and minify with Babel automatically to your NodeJS runtime compatible JavaScript. This plugin is a child of the great serverless-optimizer-
eslint-plugin-sql SQL linting rules for ESLint. In its current form, the plugin has been designed and tested to work with Postgres codebase. eslint-plugin-sql Installation Configuration Settings place
eslint-plugin-vue Official ESLint plugin for Vue.js �� Documentation See the official website. ⚓ Versioning Policy This plugin is following Semantic Versioning and ESLint's Semantic Versioning Policy.
eslint-plugin-node Additional ESLint's rules for Node.js �� Install & Usage $ npm install --save-dev eslint eslint-plugin-node Requires Node.js >=8.10.0 Requires ESLint >=5.16.0 Note: It recommends a
eslint-plugin-ember An ESLint plugin that provides a set of rules for Ember applications based on commonly known good practices. ❗️ Requirements ESLint >= 6 Node.js 10.* || 12.* || >= 14 �� Usage 1. I
eslint-plugin-wxml 为 lint 微信小程序 wxml 文件而开发的 eslint 插件,可使用 eslint 来检查微信小程序项目内的 wxml 代码 当开发者使用 VSCode 或者 Webstorm 时可以得到代码错误提示,目前支持的 lint 规则如下: 1. wxml/colon-style-event-binding 强制使用:冒号隔开时间绑定 2. wxml/emp