1 Star 0 Fork 0

杭州邻商网络科技股份有限公司 / lint

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
The current repository's web page is accessible only to members.If you need to make it public, please ask the entrprise owner 马伟 to submit the application.
Clone or Download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

lint

使用

  1. 安装 @lensung/lint
npm install --save-dev @lensung/lint
# or
yarn add @lensung/lint -D
  1. 将在根目录下自动生成一下文件 .eslintrc.json/.prettierrc.json/.lintstagedrc.json/.husky/.commitlintrc.json (注意如果已有相应文件不会覆盖)

  2. 可修改规则

in .eslintrc.json

{
  "extends": "./node_modules/@lensung/lint/src/eslint.js",
  "rules": {}
}

可选择使用 eslint strict 规则,将启用 airbnb 严格规则约束。

{
  "extends": "./node_modules/@lensung/lint/src/eslint.strict.js",
  "rules": {}
}

in .lintstagedrc.json

{
  "*.{less,sass,scss,md,json,yml}": ["prettier --write", "git add"],
  "*.{js,jsx,html}": ["prettier --write", "eslint --fix", "git add"],
  "*.ts?(x)": [
    "prettier --parser=typescript --write",
    "eslint --fix",
    "git add"
  ]
}

注意

Mac os 可能不执行 lint, 请执行以下命令:

chmod ug+x .husky/*
chmod ug+x .git/hooks/*

CHANGELOG

CHANGELOG

LICENSE

MIT

Repository Comments ( 0 )

Sign in to post a comment

About

Lint Sharable Configurations and Rules expand collapse
JavaScript and 2 more languages
MIT
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
JavaScript
1
https://gitee.com/lensung/lint.git
git@gitee.com:lensung/lint.git
lensung
lint
lint
main

Search

103111 552b83b3 1850385 103110 ed87a847 1850385