Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-ddd/eslint-config

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-ddd/eslint-config

ESLint config for TypeScript or React DDD projects

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
63
decreased by-52.63%
Maintainers
1
Weekly downloads
 
Created
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 29 Apr 2022

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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc