🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@selleo/eslint-config-react

Package Overview
Dependencies
Maintainers
7
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@selleo/eslint-config-react

ESLint config which combines recommended, import, react-app and react-native plugins

1.0.0
latest
Source
npm
Version published
Weekly downloads
13
8.33%
Maintainers
7
Weekly downloads
 
Created
Source

eslint-config-react

npm version

Internal Selleo config

Installation

yarn add eslint @selleo/eslint-config-react --dev

Usage

Add to your eslint config (.eslintrc):

{
  "extends": ["@selleo/react"]
}

Overview

Extends

Our config is extended with those configs:

  • eslint:recommended
  • react-app
  • prettier
  • plugin:react/recommended

Rules

Apart from the basic rules from the configs, we also use these additional rules:

 {
  'linebreak-style': ['error', 'unix'],
  'object-curly-spacing': ['error', 'always'],
  'react/no-unused-prop-types': 'error',
  'react/prefer-stateless-function': 'off',
  'react/prop-types': ['error', { skipUndeclared: true }],
  indent: "off",
  quotes: ['error', 'single', { avoidEscape: true }],
  semi: ['warn', 'never'],
  'no-unused-vars': [
    'error',
    {
      argsIgnorePattern: '^_',
      varsIgnorePattern: '^_',
    },
  ],
  'comma-dangle': [
    'error',
    {
      arrays: 'always-multiline',
      exports: 'always-multiline',
      functions: 'ignore',
      imports: 'always-multiline',
      objects: 'always-multiline',
    },
  ],
  'react/jsx-sort-props': [
    'error',
    {
      callbacksLast: false,
      shorthandFirst: false,
      ignoreCase: false,
    },
  ],
  'prettier/prettier': [
    'error',
    {
      bracketSpacing: true,
      jsxBracketSameLine: false,
      parser: 'flow',
      printWidth: 100,
      singleQuote: true,
      semi: false,
      trailingComma: 'all',
    },
  ],
}

Plugins and envs

Plugins:

  • import
  • react
  • prettier

Envs:

env: {
  browser: true,
  es6: true,
  jest: true,
  node: true,
}

Keywords

eslint

FAQs

Package last updated on 23 Jul 2018

Did you know?

Socket

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