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

2.1.1 • Public • Published

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

  1. Install as dev dependency

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

    {
      "extends": "@hs-web-team/eslint-config-node"
    }
  3. 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.

  1. Run the script:

    node ./node_modules/@hs-web-team/eslint-config-node/bin/add-prettier-scripts.js
  2. 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
  3. 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

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

    Package Sidebar

    Install

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

    Weekly Downloads

    90

    Version

    2.1.1

    License

    ISC

    Unpacked Size

    8.5 kB

    Total Files

    11

    Last publish

    Collaborators

    • mhewitt
    • rymccarty
    • epayret
    • dmooney
    • leahshearer
    • jcalleja-hubspot
    • lopchannorie
    • kelvinmr
    • rraj_hubspot
    • pwilver
    • dding
    • tstelmach
    • hs_cfrisoli
    • priedle
    • amichelini
    • lbergin
    • nhodgkiss447
    • dharmeshs
    • annagallo-hs
    • lhampson
    • cutlah
    • gwilliamshubspot
    • kelin599
    • cprince
    • aulfich-hs
    • samson.yuwono
    • vickytran
    • denishubspot
    • markelly-hs
    • sgoldenson
    • bpuseyhs
    • mndhlovu
    • snigam
    • andresllinasr
    • ronaldtorresn
    • hayala
    • conor_heffernan
    • sdiaz88
    • kimccarthy
    • sduque
    • stevehealy
    • henryqdineen
    • gsugrue_npm
    • bjacobel
    • ruthfarrell
    • adiazcometa
    • sasharma
    • pstafford
    • bcarolan
    • iogrizovic
    • dgroechel_hs
    • cayre
    • siva_h
    • mahad2
    • ahiremath
    • cwilliford_hubspot
    • cwunder_hubspot
    • conormalone
    • nmansurov
    • cfritz
    • hzahra
    • mbegyn
    • mlamacchia
    • yjgcharriz
    • mariana.sanchez.s
    • damartinez
    • ralo_alo
    • awilks
    • leocifnpm
    • mvalenciahubspot
    • hsneking
    • jgilhs
    • ericsalvi
    • dashdown
    • devcumana
    • scastro_h
    • saortiz
    • valentinavelasquez
    • jhubspot
    • cvillamizar
    • mheim
    • ksierra
    • jpcasanova
    • gimineo
    • kaortiz
    • pgarbrecht
    • bbond007
    • hsdevrel
    • aswebster
    • dramon