Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/stuartzhang/eslint-config-stzhang
A group of ESLint presets for the company.
https://github.com/stuartzhang/eslint-config-stzhang
Last synced: 16 days ago
JSON representation
A group of ESLint presets for the company.
- Host: GitHub
- URL: https://github.com/stuartzhang/eslint-config-stzhang
- Owner: stuartZhang
- License: mit
- Created: 2018-01-05T23:03:55.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-14T06:52:03.000Z (over 1 year ago)
- Last Synced: 2024-11-11T21:54:52.611Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 526 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint-config-stzhang2
【敏行H5程序】与【敏行node程序】`JavaScript`开发规则定制套装,支持`Vue`。
## 安装
`npm i eslint-config-stzhang2 -D`
### `peers`依赖
* eslint: 5.6+
### 项目根目录下的`.eslintrc.js`配置
> 针对`webpack`可编程配置的`node`程序。
#### nodejs 7.x
```javascript
module.exports = {
...
'extends': [
'stzhang2/eslint-config-node7x.js'
],
...
};
```#### nodejs 8.x 或更高
```javascript
module.exports = {
...
'extends': [
'stzhang2/eslint-config-node8x.js'
],
...
};
```### `src`目录下的`.eslintrc.js`配置
#### `javascript` 与 `vue` 规则集
```javascript
module.exports = {
...
'root': true,
'extends': [
'stzhang2/eslint-config-vue.js'
],
...
};
```#### `typescript` 与 `vue` 规则集
```javascript
module.exports = {
...
'root': true,
'extends': [
'stzhang2/eslint-config-vue-ts.js'
],
...
};
```## 手动执行`eslint`
`npm i npx -g`
`npx eslint **/*.* --fix`