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

@bam.tech/eslint-plugin

Package Overview
Dependencies
Maintainers
12
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bam.tech/eslint-plugin

eslint plugin for bam projects

  • 0.3.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.9K
increased by22.65%
Maintainers
12
Weekly downloads
 
Created
Source

ESLint plugin for BAM

This project is an ESLint plugin that gathers all the rules, plugins and parsers that should be used in any new BAM project.

Quick Setup

Install the plugin and its peer dependencies:

yarn add --dev @bam.tech/eslint-plugin
npx install-peerdeps --dev @bam.tech/eslint-plugin

Then update your .eslintrc config file:

// .eslintrc
{
  "extends": "plugin:@bam.tech/recommended",
  "overrides": [
    {
      "files": ["*.test.tsx"],
      "extends": "plugin:@bam.tech/tests"
    }
  ]
}

Shareable configurations

This plugin exports multiple configurations that can be used in your .eslintrc config file:

NameDescription
@bam.tech/recommendedThe recommended config for all projects
@bam.tech/testsThe recommended config for test files. By default this applies to every file: put it in an overrides to filter on your test files.

These configs need some peer dependencies. You can list them with:

npm info "@bam.tech/esling-plugin" peerDependencies

If you use npm >= 5 you can automatically install them by running:

npx install-peerdeps @bam.tech/eslint-config -D

Eslint rules

This plugin exports some custom rules that you can optionally use in your project:

NameDescription
require-named-effectEnforces the use of named functions inside a useEffect

To use a rule, just declare it in your .eslintrc:

// .eslintrc
{
  "plugins": ["@bam.tech"],
  "rules": {
    "@bam.tech/require-named-effect": "error"
  }
}

Tip: if your config is already extended from a @bam.tech config, you don't need to declare the plugin.

How to customize?

You can still customize your ESLint config by adding other configurations, plugins and rules to your .eslintrc config file.

Contribute

If you find a useful rule that you feel every project at BAM should use, feel free to contribute.

Keywords

FAQs

Package last updated on 05 Jul 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

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc