Detalhes do pacote

eslint-plugin-tribou

tribou2.9kMIT2.0.1

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

config, eslint, eslintconfig, tribou

readme (leia-me)

eslint-plugin-tribou

npm version CircleCI Project Status: Active - The project has reached a stable, usable state and is being actively developed.

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

Quick Start

NOTE: If you're migrating from eslint-config-tribou and want to maintain compatibility, see the Legacy Configuration.

npm install --save-dev \
    eslint-plugin-tribou \
    babel-eslint \
    eslint

Then add the following to your .eslintrc:

{
  "extends": [
    "plugin:tribou/recommended"
  ],
  "plugins": [
    "tribou"
  ]
}

Or add an .eslintrc.yml:

extends:
  - plugin:tribou/recommended

plugins:
  - tribou

# Wow, that was easier... 😉

Flow

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:

{
  ...
  "settings": {
    "flowtype": {
      "onlyFilesWithFlowAnnotation": true
    }
  }
}

Or in your .eslintrc.yml:

...
settings:
  flowtype:
    onlyFilesWithFlowAnnotation: true

Prettier Usage

Like using prettier? You can ignore rules that affect prettier styles with eslint-config-prettier

Install:

npm install --save-dev eslint-config-prettier

And add the configs to your .eslintrc.yml:

extends:
  - plugin:tribou/recommended
  - prettier
  - prettier/flowtype
  - prettier/react

plugins:
  - tribou

Legacy Configuration

In order to apply the rules equivalent to eslint-config-tribou@^3.0.0, install v0.3.0 instead:

npm install --save-dev \
    eslint-plugin-tribou@^0.3.0 \
    babel-eslint@^8.0.0 \
    eslint@^4.0.0

changelog (log de mudanças)

Change Log

All notable changes to this project will be documented in this file.

2.0.0 - 2018-05-25

Maintenance

  • BREAKING: Major dependency upgrades
  • Fixed affected tests which included changes to prefer-destructuring and function-paren-newline

1.3.2 - 2018-05-25

Maintenance

  • Non-major dependency upgrades

1.3.0 - 2017-10-02

Maintenance

  • Non-major dependency upgrades

1.2.0 - 2017-08-20

Added

  • Add support for eslint v4

    Maintenance

  • Dependency upgrades.

1.1.0 - 2017-07-16

Changed

  • Removed react/prefer-stateless-function restriction
  • Added warning when using React.Component to suggest React.PureComponent with Flow covariant instructions.

    Maintenance

  • Dependency upgrades.
  • CircleCI auto-versioning script.

1.0.5 - 2017-06-22

Fixed

  • Remove yarn package.engine restriction.

1.0.4 - 2017-06-17

Maintenance

  • Dependency upgrades.

1.0.3 - 2017-06-17

Maintenance

  • CircleCI migration to v2.0 and include node v8 in tests.

1.0.2 - 2017-06-03

Maintenance

  • Add flow-typed definitions and add flow tests.

1.0.1 - 2017-06-02

Maintenance

  • Add CHANGELOG and update README.

1.0.0 - 2017-06-02

Changed

  • arrow-body-style: Relaxed rules to use 'as-needed' which allows one-line lambdas, simpler stateless React components, easier currying, and return shorthand for object literals.
  • arrow-parens: Relaxed rules to use 'as-needed' which allows omitting parenthesis if only one argument.

0.3.0 - 2018-05-25 (Legacy config)

Fixed

  • BREAKING change via JSX indentation bug in one of the minor/patch deps from v0.2.5. JSX indentation should be correct now especially if using eslint v4.

    Added

  • Add support for eslint v4

0.2.5 - 2017-07-13 (Legacy config)

Fixed

  • Remove yarn package.engine restriction.

0.2.0 - 2017-05-31 (Legacy config)

Added

  • Added existing eslint-config-tribou@^3.1.0 rules to provide a backwards-compatible migration path coming from that project.