youzan/felint

Name: felint

Owner: ??

Description: A smart way to eslint and stylelint for front end

Created: 2016-04-18 08:52:13.0

Updated: 2018-05-20 15:10:56.0

Pushed: 2017-07-19 06:16:15.0

Homepage: http://youzan.github.io/felint/

Size: 191

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

youzan

A smart way to eslint stylelint and git hooks for front end

npm version downloads PRs Welcome

NPM

?????Felint

felint ?????? eslint?stylelint?git hook ??????????

felint ????????????

  1. ??? eslint/stylelint ???????? react ???vue ???es5 ?? es6 ????????????
  2. ?? eslint/stylelint ?????????? node_modules ?
  3. ?? git ????????????????
???? felint
install -g felint
??????
???

??????????

nt init

felint ???????????????????????

elintrc        // ?????? felint init ?????????????????????????
elint          // felint config???
slintrc.json   // eslint ?????????js???????????????
slintignore    // eslint ignore????
tylelintrc.js  // stylelint ?????????css???????????????
tylelintignore // stylelint ignore????

???felint ????????? git hook?????? git commit ??????????????????????????????????

???

??????????? git ??

???

??????????????????????????????

nt init

??????????????????????????????? git hook ??????

????????? felint ?????????????????????????????????? felint init ???

??felint????
1. felint init
nt init -p planname

name:
???????

?? felint init ????felint??.felintrc??? felint config git???? ? ??????https://github.com/youzan/felint-config????.felintrc?????????????????????? .felint ?????

???????????felint ?????????????????????? git hook???????????

???????????felint-config??

2. felint use
nt use [options]

ons:
value]: ??????????????
alue: ??????????????

??????????????felint-config??

?????

 project
|_ B page(es5 page source fold)
|_ C page(es6 page source fold)

?????B?C?????????????? ????:

 project
nt init -p es5
 page fold
nt use -p es6

felint use????c page fold????????????????C page fold???????????????????

3. felint hooks

?????????????????felint init ????????????

?????? felint use / felint hooks ?????????????????????? felint init (????????????????)?????? ?????? ? ??? ?????????????? felint hooks ?????

??.felintrc??

.felintrc????felint-config?git????????????????????????????????????????

e.g.


configReg   // ???????felint-config????
plan        // ???????????????????es5/es6/vue/react?
ruleExtends // ??????????????????

1. configRep

????????????felint-config??????fork????????felint-config??????? felint-config ? readme ?????.felintrc???configRep??????????? felint-config ?????

???????? felint init ???

2. plan

?????????felint init -p value?????????????????default??

3. ruleExtends

??????????stylelint????eslint???????????????????????.eslintrc.json?.stylelintrc.js???????????felint init??????????????????????????????? ????????felint-config?rules??????????????merge???????????

e.g.


"plan": "es6",
".eslintrc_es6.json": {
    "rules": {
        "no-console": 0
    }
}

felint???init?use????????.eslintrc.json????????felint-config???rules/.eslintrc_es6.json????.felintrc??.eslintrc_es6.json???

??felint??

felint?????felint init???????????????????felint?????????????????

??????

????? MIT???????????????


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.