项目作者: tribou

项目描述 :
Start with JS Standard Style but push towards better readability, git-awareness, and include React, ES6, and FlowType best practices
高级语言: JavaScript
项目地址: git://github.com/tribou/eslint-config-tribou.git
创建时间: 2016-04-24T02:10:05Z
项目社区:https://github.com/tribou/eslint-config-tribou

开源协议:MIT License

下载


eslint-config-tribou

npm
version
Build
Status
Project Status: Moved to https://github.com/tribou/eslint-plugin-tribou –
The project has been moved to a new location, and the version at that location
should be considered
authoritative.
to eslint-plugin-tribou
bitHound
Code

Start with JS Standard Style but push towards better readability,
git-awareness, vim-usability, and React and ES6 best practices.

This project has moved to

eslint-plugin-tribou

For backwards-compatibility to >= v3, use eslint-plugin-tribou@^0.2.0. To get
the latest rules for a new project, install eslint-plugin-tribou@latest.

Quick Start

  1. npm install --save-dev \
  2. eslint-config-tribou@^3.0.0 \
  3. babel-eslint@^7.1.0 \
  4. eslint@^3.9.1 \
  5. eslint-config-airbnb@^15.0.1 \
  6. eslint-config-standard@^10.2.1 \
  7. eslint-plugin-flowtype@^2.25.0 \
  8. eslint-plugin-import@^2.1.0 \
  9. eslint-plugin-jsx-a11y@^5.0.3 \
  10. eslint-plugin-promise@^3.3.1 \
  11. eslint-plugin-react@^7.0.1 \
  12. eslint-plugin-standard@^3.0.1

Then add the following to your .eslintrc:

  1. {
  2. "extends": [
  3. "tribou"
  4. ]
  5. }

Or add an .eslintrc.yml:

  1. extends:
  2. - tribou
  3. # Wow, that was easier... 😉

By default, Flow typing is required for an entire project since
eslint-plugin-flowtype will require the \\ @flow annotation to be set at
the top of every file and subsequently check for all other flow annotation
requirements in that file. This allows new projects to enforce Flow typing on
every file from the start.

If you do not wish to use Flow typing on every file (or at all) in a project,
this config can still enforce all of its other standards (including Flow
linting on files that do have the // @flow annotation). To disable this
“universal” Flow typing requirement in your .eslintrc:

  1. {
  2. "extends": [
  3. "tribou"
  4. ],
  5. "settings": {
  6. "flowtype": {
  7. "onlyFilesWithFlowAnnotation": true
  8. }
  9. }
  10. }

Or in your .eslintrc.yml:

  1. extends:
  2. - tribou
  3. settings:
  4. flowtype:
  5. onlyFilesWithFlowAnnotation: true