Socket
Book a DemoInstallSign in
Socket

@homebound/eslint-plugin

Package Overview
Dependencies
Maintainers
40
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@homebound/eslint-plugin

Custom rules for homebound projects

1.3.1
latest
npmnpm
Version published
Weekly downloads
0
Maintainers
40
Weekly downloads
 
Created
Source

eslint-plugin-homebound-rules

custom rules for homebound projects

Installation

You'll first need to install ESLint:

yarn add -D eslint

Next, install @homebound/eslint-plugin:

yarn add -D @homebound/eslint-plugin

Usage

Add homebound-rules to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": ["@homebound"]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "@homebound/no-b-add-column": 2
    }
}

Adding Rules

Name                                 Description
no-b-add-columnwe should be using the custom addColumn for indexing purposes, rather than the MigrationBuilder's addColumn
no-cyanaudit-in-migrationsPrevents running cyanaudit logic in migrations
prevent-test-file-imports-in-app-codePrevents importing test code in application logic

This repository followed this tutorial to initialize.

TL;DR:

Init

  • yarn yo eslint
  • Add a: Rule
  • Name: homebound
  • Publish: ESLint Plugin
  • ID: Name it, such as no-b-add-column
  • Description: Short sentence. This will show up in a lot of default places: Documentation Headers, Errors, etc.

Next Steps

  • Find your new doc in docs/rules/your-rule.md
  • Link to the doc in README.md
  • Add some tests via test/lib/rules/your-rule.js
  • Finally, visit something like astexplorer.net to dive into the AST and start writing your rule.
    • under the "Transforms" tab on the top you may hit babel-eslintto quickly test a tool in the UI. Add pass/fail code to the top left, and iterate on your rule in the bottom left. The bottom right will show the ESLint output of your rule. Use the Top Right to explore the AST (I suggest turning on Methods, and turning off Location Data and Type Keys)

Supported Rules

Keywords

eslint

FAQs

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.