项目作者: neo9

项目描述 :
TSLint coding style inspired from ESLint Airbnb Coding style
高级语言: JavaScript
项目地址: git://github.com/neo9/n9-coding-style.git
创建时间: 2019-02-11T13:35:07Z
项目社区:https://github.com/neo9/n9-coding-style

开源协议:

下载


Neo9 coding style

ESLint coding style inspired from Airbnb coding style.

:warning: Drop NodeJS 14 support stating with version 5

Usage

  1. yarn add @neo9/n9-coding-style --dev

Add a .eslintrc.yaml file in the root directory.

  1. extends:
  2. - './node_modules/@neo9/n9-coding-style/.eslintrc.yaml'

Add a lint script to your package.json :

  1. {
  2. ...
  3. "lint": "eslint --config .eslintrc.yaml '{src,test}/**/*.ts'",
  4. ...
  5. }

Example of usage :

Auto fix errors

EsLint can sometimes auto fix errors.
You can use the local binary.

  1. npx eslint --fix '{src,test}/**/*.ts'