Socket
Socket
Sign inDemoInstall

@fireworkweb/eslint-config

Package Overview
Dependencies
268
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @fireworkweb/eslint-config

Custom eslint config for Firework projects


Version published
Maintainers
2
Created

Readme

Source

@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.

Keywords

FAQs

Last updated on 31 Mar 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc