🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

@hs-web-team/eslint-config-node

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hs-web-team/eslint-config-node

HubSpot Marketing WebTeam ESLint rules for Node.js

2.1.1
latest
Version published
Weekly downloads
153
0.66%
Maintainers
84
Weekly downloads
 
Created

Hubspot Marketing WebTeam ESLint rules for Node.js

This is a list of ESLint rules that are recommended for use with Hubspot Marketing WebTeam projects.

Index

Setup

  • Install as dev dependency

    npm i -D @hs-web-team/eslint-config-node@latest
    
  • Add to .eslintrc in project root directory

    {
      "extends": "@hs-web-team/eslint-config-node"
    }
    
  • Extend the eslint on a project basis by adding rules to .eslintrc e.g.

    {
      "extends": "@hs-web-team/eslint-config-node",
      "settings": {
        "import/resolver": "webpack"
      }
    }
    

Where to use it

This package is intended to be used as a starting point for ESLint rules for Backend Node.js projects, and not for use in browser environments.

Using the Prettier Scripts

This package includes a utility script to automatically add Prettier configuration to your project.

  • Run the script:

    node ./node_modules/@hs-web-team/eslint-config-node/bin/add-prettier-scripts.js
    
  • The script will:

    • Add prettier:check and prettier:write scripts to your package.json
    • Install Prettier as a dev dependency if not already installed
    • Create a .prettierrc.js file with shared config
    • Create a .prettierignore file with sensible defaults
  • After installation, you can use the following commands:

    • npm run prettier:check - Check files for formatting issues
    • npm run prettier:write - Automatically fix formatting issues

Migration from v1 to v2

See MIGRATION-V2.md

Keywords

FAQs

Package last updated on 25 Apr 2025

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