{"id":19982422,"url":"https://github.com/netlify/eslint-config-node","last_synced_at":"2025-05-04T05:32:24.229Z","repository":{"id":36981354,"uuid":"304722170","full_name":"netlify/eslint-config-node","owner":"netlify","description":"ESLint, Prettier and Editorconfig shared by Netlify's Node.js projects","archived":false,"fork":false,"pushed_at":"2025-04-30T18:46:04.000Z","size":2368,"stargazers_count":21,"open_issues_count":18,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-30T19:43:29.915Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netlify.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-10-16T19:35:23.000Z","updated_at":"2025-04-17T09:18:35.000Z","dependencies_parsed_at":"2023-02-12T19:46:08.531Z","dependency_job_id":"43775e3e-d8e4-4fe1-ba49-5963c784f179","html_url":"https://github.com/netlify/eslint-config-node","commit_stats":{"total_commits":589,"total_committers":16,"mean_commits":36.8125,"dds":0.5517826825127334,"last_synced_commit":"0604ca9893899c34892426666c2e30ed2984ac7d"},"previous_names":[],"tags_count":116,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Feslint-config-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Feslint-config-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Feslint-config-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlify%2Feslint-config-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netlify","download_url":"https://codeload.github.com/netlify/eslint-config-node/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251774809,"owners_count":21641728,"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-11-13T04:11:13.336Z","updated_at":"2025-05-04T05:32:23.906Z","avatar_url":"https://github.com/netlify.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build](https://github.com/netlify/eslint-config-node/workflows/Build/badge.svg)](https://github.com/netlify/node-eslint-config/actions)\n[![Node](https://img.shields.io/node/v/@netlify/eslint-config-node.svg?logo=node.js)](https://www.npmjs.com/package/@netlify/node-eslint-config)\n\nLinting and formatting configuration shared by Netlify Node.js repositories:\n\n- [ESLint](https://eslint.org/)\n- [Prettier](https://prettier.io/)\n- [Editorconfig](https://editorconfig.org/)\n- `.gitattributes`\n- `.husky/`\n\n## How to add to a new Node.js repository\n\nIf you're creating a new repository, you can use the\n[following GitHub template](https://github.com/netlify/node-template). Otherwise, please follow those steps:\n\n- Add a `.eslintrc.cjs` file to the root of the project. Individual `rules` and `overrides` can be tweaked for the\n  specific project.\n\n```js\n// Use '@netlify/eslint-config-node/esm' if the repository is using pure ES modules\nconst { overrides } = require('@netlify/eslint-config-node')\n\nmodule.exports = {\n  extends: '@netlify/eslint-config-node',\n  rules: {},\n  overrides: [...overrides],\n}\n```\n\n- Add the following `.prettierrc.json` to the root of the project:\n\n```json\n\"@netlify/eslint-config-node/.prettierrc.json\"\n```\n\n- Copy the `commitlint.config.cjs`, `.editorconfig` and `.gitattributes` files to the root of the project.\n- Add the following properties to the `package.json`. Please replace the `config` globbing expressions to match the\n  files where the source JavaScript/Markdown/HTML/JSON/YAML files are located. `npm run format` should also be run\n  during `npm test` and `npm run format:ci` during CI\n  ([example](https://github.com/netlify/cli/blob/main/.github/workflows/main.yml)).\n\n```json\n{\n  \"scripts\": {\n    \"format\": \"run-s format:check-fix:*\",\n    \"format:ci\": \"run-s format:check:*\",\n    \"format:check-fix:lint\": \"run-e format:check:lint format:fix:lint\",\n    \"format:check:lint\": \"cross-env-shell eslint $npm_package_config_eslint\",\n    \"format:fix:lint\": \"cross-env-shell eslint --fix $npm_package_config_eslint\",\n    \"format:check-fix:prettier\": \"run-e format:check:prettier format:fix:prettier\",\n    \"format:check:prettier\": \"cross-env-shell prettier --check $npm_package_config_prettier\",\n    \"format:fix:prettier\": \"cross-env-shell prettier --write $npm_package_config_prettier\"\n  },\n  \"config\": {\n    \"eslint\": \"--ignore-path .gitignore --cache --format=codeframe --max-warnings=0 \\\"{src,scripts,tests,.github}/**/*.{cjs,mjs,js,md,html}\\\" \\\"*.{cjs,mjs,js,md,html}\\\" \\\".*.{cjs,mjs,js,md,html}\\\"\",\n    \"prettier\": \"--ignore-path .gitignore --loglevel=warn \\\"{src,scripts,tests,.github}/**/*.{cjs,mjs,js,md,yml,json,html}\\\" \\\"*.{cjs,mjs,js,yml,json,html}\\\" \\\".*.{cjs,mjs,js,yml,json,html}\\\" \\\"!package-lock.json\\\"\"\n  }\n}\n```\n\n- Add `.eslintcache` to the `.gitignore`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlify%2Feslint-config-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetlify%2Feslint-config-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlify%2Feslint-config-node/lists"}