@fireworkweb/eslint-config
Custom eslint config for Firework projects
Last updated 2 months ago by gabrielboliveira .
MIT · Bugs · Original npm · Tarball · package.json
$ cnpm install @fireworkweb/eslint-config 
SYNC missed versions from official npm registry.

@fireworkweb/eslint-config

Eslint rule configs for Javascript and Vue.js projects.

Installation

# With yarn
yarn add -D @fireworkweb/eslint-config

# With npm
npm install --dev  @fireworkweb/eslint-config

Usage

Currently there are two configs available: js for pure javascript projects, vue for Vue.js projects and react for React projects. The vue and react configs already includes the js config.

After installing, create a .eslintrc.js file and add this to your config (add only one):

module.exports = {
    extends: [
        // for javascript project
        '@fireworkweb/eslint-config/js',
        // for vue project
        '@fireworkweb/eslint-config/vue',
        // for react project
        '@fireworkweb/eslint-config/react',
    ],
};

Custom Rules

You can customize any rules (js, vue), react) as this example:

module.exports = {
    extends: [
        '@fireworkweb/eslint-config/js',
    ],
    rules: {
        'no-console': 'off',
    },
};

You can also (and probably will) add any specific global variable:

// for vue project
module.exports = {
    extends: [
        '@fireworkweb/eslint-config/vue',
    ],
    globals: {
        Vue: true, // if you set window.Vue
        _: true, // lodash/underscore
        Nova: true, // Laravel Nova
    },
};

License

MIT.

Current Tags

  • 1.0.0                                ...           latest (2 months ago)

1 Versions

  • 1.0.0                                ...           2 months ago
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 12
Dependencies (6)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |