https://github.com/lydanne/eslint-plugin-weapp
一个微信小程序的eslint插件,进行最基础的语法检查和一些小程序开发的时候比较坑的写法检查。
https://github.com/lydanne/eslint-plugin-weapp
eslint eslint-plugin example plugin
Last synced: 11 months ago
JSON representation
一个微信小程序的eslint插件,进行最基础的语法检查和一些小程序开发的时候比较坑的写法检查。
- Host: GitHub
- URL: https://github.com/lydanne/eslint-plugin-weapp
- Owner: Lydanne
- Created: 2023-10-19T08:48:49.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-19T12:20:07.000Z (over 2 years ago)
- Last Synced: 2025-03-03T03:44:09.216Z (11 months ago)
- Topics: eslint, eslint-plugin, example, plugin
- Language: JavaScript
- Homepage:
- Size: 47.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# eslint-plugin-weapp2
a weapp eslint
## Installation
You'll first need to install [ESLint](https://eslint.org/):
```sh
npm i eslint --save-dev
```
Next, install `eslint-plugin-weapp2`:
```sh
npm install eslint eslint-plugin-weapp2 --save-dev
# pnpm install eslint eslint-plugin-weapp2 --save-dev
```
## Usage
Add `weapp` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
```json
{
"extends": ["eslint:recommended", "plugin:weapp2/recommended"]
}
```
## Rules
💼 Configurations enabled in.\
✅ Set in the `recommended` configuration.\
🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).
| Name | Description | 💼 | 🔧 |
| :----------------------------------- | :--------------------------------- | :-- | :-- |
| [component](docs/rules/component.md) | 检查组件的 properties 属性是否规范 | ✅ | 🔧 |