@percolate/eslint-plugin
Percolate's ESlint rules and configs
Last updated 6 months ago by prclt-frontend .
CPAL-1.0 · Repository · Original npm · Tarball · package.json
$ cnpm install @percolate/eslint-plugin 
SYNC missed versions from official npm registry.

@percolate/eslint-plugin

Percolate ESlint configs/rules optimized for TypeScript.

Installation

$ yarn add @percolate/eslint-plugin --dev

Usage

Node

// .eslintrc.js
module.exports = {
    extends: ['plugin:@percolate/base', 'plugin:@percolate/node'],
    rules: {
        // configure rule
        '@percolate/import-blacklist': [
            'error',
            [
                {
                    import: 'underscore',
                    reason: 'Use lodash instead',
                },
            ],
        ],
    },
}

React

React, be sure to leverage the following config:

// .eslintrc.js
module.exports = {
    extends: ['plugin:@percolate/base', 'plugin:@percolate/react'],
}

eslint-plugin-import

The rule import/no-unresolved is on by default which means eslint-plugin-import has to be configured. plugin:@percolate/node configures eslint-import-resolver-node automatically.

Webpack

If you're using Webpack, you'll need to yarn add eslint-import-resolver-webpack --dev and configure it:

// .eslintrc.js
module.exports = {
    extends: ['plugin:@percolate/base', 'plugin:@percolate/react'],
    settings: {
        'import/resolver': {
            'eslint-import-resolver-webpack': {
                config: 'webpack.dev.config.js',
            },
        },
    },
}

Supported Configs

Supported Rules


See root README.md

Current Tags

  • 1.1.5                                ...           latest (6 months ago)

9 Versions

  • 1.1.5                                ...           6 months ago
  • 1.1.4                                ...           6 months ago
  • 1.1.3                                ...           6 months ago
  • 1.1.2                                ...           6 months ago
  • 1.1.1                                ...           7 months ago
  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 0.1.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |