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

eslint-config-hypothesis

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-hypothesis

A base ESLint configuration for Hypothesis projects

  • 3.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
740
increased by3.21%
Maintainers
0
Weekly downloads
 
Created
Source

eslint-config-hypothesis

A shareable ESLint configuration for Hypothesis frontend projects.

To use it:

  1. Add eslint-config-hypothesis as a dependency to your project
  2. Add the config's peer dependencies (see peerDependencies in package.json) to your project's dependencies. Some of them are required only for some entry points.
  3. Add an ESLint config file to the repository which extends the desired "hypothesis" config. For example, a eslint.config.js file with the following content:
    import hypothesisBase from 'eslint-config-hypothesis/base';
    import hypothesisTS from 'eslint-config-hypothesis/ts';
    import hypothesisJSX from 'eslint-config-hypothesis/jsx';
    
    export default [
     ...hypothesisBase,
     ...hypothesisTS, // Optionally add this if the project uses TypeScript
     ...hypothesisJSX, // Optionally add this if the project uses JSX
     {
       // Other project config
     },
    ];
    

Rule notes

  • In /base entry point, all recommended rules from @eslint/js are enabled and the config assumes that you are using mocha for tests
  • In /jsx entry point, all react.recommended, react.jsx-runtime, react-hooks and jsx-a11y.recommended rules are enabled, assuming React/Preact is used for any interactive UI
  • In /ts entry point, all typescript-eslint.recommended rules are enabled
  • All rules are configured to produce errors and not warnings. This is based on the principle that an issue is either worth fixing or should be ignored, and warnings just add noise
  • Code formatting rules that are obsoleted by automated formatters are disabled. You should use Prettier to auto-format code.

FAQs

Package last updated on 18 Oct 2024

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