You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+66-13Lines changed: 66 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,11 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Overview
6
6
7
-
This is an ESLint configuration package (`@hs-web-team/eslint-config-node`) for HubSpot Marketing WebTeam projects. It provides shared ESLint rules and Prettier configuration for both backend Node.js projects and browser/React applications.
7
+
This is a configuration package (`@hs-web-team/eslint-config-node`) for HubSpot Marketing WebTeam projects. It provides shared configurations for:
8
+
-**ESLint** rules for Node.js and browser/React projects
9
+
-**Prettier** formatting configuration
10
+
-**Stylelint** rules for SCSS/CSS linting
11
+
-**Cypress** E2E testing configuration
8
12
9
13
## Key Commands
10
14
@@ -66,27 +70,76 @@ When testing changes to this package in downstream projects, you'll typically:
66
70
- Arrow parens: avoid, LF line endings, single attribute per line
67
71
- Override for YAML files: uses double quotes instead of single
68
72
73
+
### Stylelint Configuration
74
+
-**`.stylelintrc.json`**: Shared Stylelint configuration for SCSS/CSS linting
75
+
- Extends `stylelint-config-standard-scss` for standard SCSS linting rules
76
+
- Customized rules for HubSpot projects:
77
+
- Disables strict class name patterns and variable naming patterns
78
+
- Allows zero units (e.g., `0px`), redundant longhand properties, and duplicate selectors
79
+
- Configures SCSS-specific rules to ignore common directives (`@function`, `@if`, `@mixin`, etc.)
80
+
- Enforces lowercase keywords with camelCase for SVG keywords
81
+
- Sets media feature range notation to "context" with warning severity
82
+
- Consuming projects extend this via `.stylelintrc.json`: `{ "extends": "@hs-web-team/eslint-config-node/.stylelintrc.json" }`
83
+
- Documentation: `examples/stylelint-usage.md`
84
+
85
+
### Cypress Configuration
86
+
-**`cypress.config.cjs`**: Shared Cypress configuration for E2E testing
87
+
- Uses CommonJS (`require`) syntax
88
+
- Core settings:
89
+
- Disables Chrome web security for cross-origin testing
90
+
- Timeouts: 20s default command, page load, and response timeouts
91
+
- Viewport: 1920x1080
92
+
- Retries: 1 retry in run mode, 0 in open mode
93
+
- Screenshots on failure enabled, video disabled by default
94
+
- Uses **esbuild** preprocessor for fast bundling (much faster than webpack)
95
+
- Includes Cucumber preprocessor setup with native esbuild support
96
+
- Native TypeScript support via esbuild (no additional loader needed)
97
+
-`@badeball/cypress-cucumber-preprocessor`, `@bahmutov/cypress-esbuild-preprocessor`, `esbuild`, and `js-yaml` are all bundled — consumers only need to install `cypress`
98
+
- Spec pattern: `cypress/e2e/*.cy.js`
99
+
- Exported utilities:
100
+
-`config`: Main Cypress configuration object
101
+
-`envs`: Environment constants (DEV, QA, PROD)
102
+
-`getDevBaseUrl()`: Reads baseUrl from `hubspot.config.yml` DEV portal
103
+
-`getBaseUrls()`: Reads URLs from `.ci/config.yml` for multiple environments
104
+
- HubSpot-specific: Designed to work with HubSpot CMS projects using `hubspot.config.yml`
105
+
- Documentation: `examples/cypress-usage.md`
106
+
69
107
### Package Details
70
108
-**Type**: ESM module (`"type": "module"`)
71
-
-**Node requirement**: >= 22
109
+
-**Node requirement**: >= 24
72
110
-**Exports**:
73
-
- Main export (`.`): `index.js` - Node.js configuration
0 commit comments