You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@react-ddd/eslint-config

Package Overview
Dependencies
10
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-ddd/eslint-config

ESLint config for TypeScript or React DDD projects


Version published
Maintainers
1
Created

Readme

Source

@react-ddd/eslint-config

This package is a draconian eslint-config largely based on airbnb and airbnb-typescript. It does NOT use Prettier, instead relying on only one tool to handle code formatting.

Differences from airbnb and airbnb-typescript

react/function-component-definition

Use arrow functions for all components

react/jsx-props-no-spreading

Disable

react/require-default-props

Disable, as we use TypeScript and type the props

@typescript-eslint/comma-dangle

Only in .tsx files Ignore for generics, so that you can have a single unconstrained generic for components:

const GenericComponent<T,> = (...) => {}

@typescript-eslint/brace-style

Disable ignoring single line. ALL braces are required, no single line if's!

@typescript-eslint/consistent-type-imports

Force TypeScript 3.8 style type imports for all types

@typescript-eslint/no-unused-expressions

Error, except for short circuit and ternary

Testing specific rules

There are specific rules for *.spec.tsx? files to accomodate jest-gwt style testing:

rules: {
  'max-len': [
    'error',
    {
      code: 100,
      ignoreUrls: true,
      ignoreRegExpLiterals: true,
      ignorePattern,
    },
  ],
  'react/no-this-in-sfc': 'off',
  camelcase: 'off',
  '@typescript-eslint/naming-convention': 'off',
  'prefer-arrow-callback': 'off',
  'func-names': 'off',
  '@typescript-eslint/no-use-before-define': 'off',
  'no-param-reassign': 'off',
}

Keywords

FAQs

Package last updated on 18 Dec 2023

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc