{"id":22409019,"url":"https://github.com/hubspotwebteam/wt-eslint-node","last_synced_at":"2026-02-04T17:10:38.636Z","repository":{"id":38308220,"uuid":"486217733","full_name":"HubSpotWebTeam/wt-eslint-node","owner":"HubSpotWebTeam","description":"ESLint rules for Node.js applications","archived":false,"fork":false,"pushed_at":"2024-11-19T20:56:06.000Z","size":156,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-21T13:49:13.517Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HubSpotWebTeam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-04-27T14:05:53.000Z","updated_at":"2022-04-27T14:14:48.000Z","dependencies_parsed_at":"2024-04-11T13:51:08.390Z","dependency_job_id":"707ec183-e2d7-4a68-86d3-abf48523e47d","html_url":"https://github.com/HubSpotWebTeam/wt-eslint-node","commit_stats":{"total_commits":24,"total_committers":2,"mean_commits":12.0,"dds":0.125,"last_synced_commit":"3178ad52a21a7cbe05dff0b47cc270aa74b4edc5"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpotWebTeam%2Fwt-eslint-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpotWebTeam%2Fwt-eslint-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpotWebTeam%2Fwt-eslint-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HubSpotWebTeam%2Fwt-eslint-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HubSpotWebTeam","download_url":"https://codeload.github.com/HubSpotWebTeam/wt-eslint-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228295622,"owners_count":17897596,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-05T12:06:21.574Z","updated_at":"2026-02-04T17:10:38.630Z","avatar_url":"https://github.com/HubSpotWebTeam.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hubspot Marketing WebTeam ESLint Configuration\n\nThis package provides ESLint rules and configurations for **Hubspot Marketing WebTeam** projects, supporting both Node.js backend and browser/React applications.\n\n\u003c!-- index-start --\u003e\n\n## Index\n\n- [Node.js Setup](#nodejs-setup)\n- [Browser/React Setup](#browserreact-setup)\n- [Where to use it](#where-to-use-it)\n- [Using the Prettier Scripts](#using-the-prettier-scripts)\n\u003c!-- index-end --\u003e\n\n## Node.js Setup\n\n1. Install as dev dependency\n\n    ```sh\n    npm i -D @hs-web-team/eslint-config-node@latest\n    ```\n\n2. Add to `eslint.config.js` in project root directory\n\n    ```typescript\n    import wtConfig from '@hs-web-team/eslint-config-node';\n\n    export default [\n      ...wtConfig,\n    ];\n    ```\n\n3. Extend the eslint on a project basis by adding rules to `eslint.config.js` e.g.\n\n    ```typescript\n    import wtConfig from '@hs-web-team/eslint-config-node';\n\n    export default [\n      // Add project-specific ignores here\n      {\n        ignores: ['dist/**'],\n      },\n      // Add project-specific rules here\n      {\n        rules: {\n          'no-console': 'error',\n        },\n      },\n      ...wtConfig, // This will include the shared rules from @hs-web-team/eslint-config-node\n    ];\n    ```\n\n## Browser/React Setup\n\n1. Install as dev dependency\n\n    ```sh\n    npm i -D @hs-web-team/eslint-config-node@latest\n    ```\n\n2. Add to `eslint.config.js` in project root directory\n\n    ```typescript\n    import wtBrowserConfig from '@hs-web-team/eslint-config-node/browser';\n\n    export default [\n      ...wtBrowserConfig,\n    ];\n    ```\n\n3. The browser configuration includes:\n   - ESLint recommended rules for JavaScript\n   - TypeScript support with typescript-eslint\n   - React support with eslint-plugin-react\n   - React Hooks rules with eslint-plugin-react-hooks\n   - Accessibility rules with eslint-plugin-jsx-a11y\n   - Browser globals (window, document, etc.) and custom globals (jQuery, $, Invoca)\n\nFor detailed browser configuration documentation and migration guides, see [examples/browser-usage.md](./examples/browser-usage.md).\n\n## Where to use it\n\nThis package provides two configurations:\n\n- **Node.js configuration** (default export): For backend Node.js projects\n- **Browser configuration** (`/browser` export): For browser-based projects including React applications\n\nChoose the appropriate configuration based on your project type.\n\n## Using the Prettier Scripts\n\nThis package includes a utility script to automatically add Prettier configuration to your project.\n\n1. Run the script:\n\n    ```sh\n    node ./node_modules/@hs-web-team/eslint-config-node/bin/add-prettier-scripts.js\n    ```\n\n2. The script will:\n\n   - Add `prettier:check` and `prettier:write` scripts to your package.json\n   - Install Prettier as a dev dependency if not already installed\n   - Create a `.prettierrc.js` file with shared config\n   - Create a `.prettierignore` file with sensible defaults\n\n3. After installation, you can use the following commands:\n\n   - `npm run prettier:check` - Check files for formatting issues\n   - `npm run prettier:write` - Automatically fix formatting issues\n\n## Migration from v1 to v2\n\nSee [MIGRATION-V2.md](./docs/MIGRATION-V2.md)\n\n## Migration from v2 to v3\n\nSee [MIGRATION-V3.md](./docs/MIGRATION-V3.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubspotwebteam%2Fwt-eslint-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhubspotwebteam%2Fwt-eslint-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhubspotwebteam%2Fwt-eslint-node/lists"}