Socket
Socket
Sign inDemoInstall

eslint-config-vast-react

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-config-vast-react

ESLint shareable config for React and react-a11y to be used with eslint-config-vast


Version published
Maintainers
1
Created

Readme

Source

eslint-config-vast-react

ESLint shareable config for React and react-a11y to be used with eslint-config-vast

NPM version

Installation

npm install --save-dev eslint-config-vast-react eslint-plugin-react eslint-plugin-jsx-a11y

Usage

Create .eslintrc file in the root of your project with the following config:

{
  "extends": ["eslint-config-vast", "eslint-config-vast-react"],
}

You'll probably need to add another config file in the root folder of the client-side code (e.g. app/client/.eslintrc):

{
    "env": {
        "browser": true
    },
    "parserOptions": {
        "sourceType": "module", // if using Babel
        "ecmaVersion": 8 // if using Babel
    },
    "globals": {
            "SOME_GLOBAL": false
    },
    "rules": {
        // Your overrides...
    }
}

Note: You don't need to use babel-eslint ("parser": "babel-eslint") if you are using ES2015 (ES6), ES2016 (ES7) or ES2017 (ES8).

ESLint actually supports ES2015/ES2016/ES2017, JSX, and object rest/spread by default now.

At the moment, you'll need it if you use stuff like class properties, decorators, async/await, types.

Setting up ESLint

To set up ESLint on your project, run:

npm install eslint --save-dev

Add "eslint" to "scripts" in package.json:

"scripts": {
    "eslint": "eslint app tests '*.js' --ext .js --ext .jsx"
}

...and then you can run:

npm run eslint

License

MIT © 2016 Vast.com, Inc.

Keywords

FAQs

Last updated on 27 Oct 2016

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