{"id":15821965,"url":"https://github.com/alii/eslint-plugin-firebase-functions","last_synced_at":"2025-07-08T12:41:05.871Z","repository":{"id":43192142,"uuid":"460215712","full_name":"alii/eslint-plugin-firebase-functions","owner":"alii","description":"eslint-plugin-firebase-functions","archived":false,"fork":false,"pushed_at":"2022-03-14T10:12:16.000Z","size":1010,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-06T07:42:31.409Z","etag":null,"topics":["eslint","firebase","plugin"],"latest_commit_sha":null,"homepage":"https://npm.im/eslint-plugin-firebase-functions","language":"TypeScript","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/alii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"patreon":"alistairsmith","github":"alii"}},"created_at":"2022-02-16T23:43:20.000Z","updated_at":"2023-09-08T18:31:49.000Z","dependencies_parsed_at":"2022-09-11T06:51:39.613Z","dependency_job_id":null,"html_url":"https://github.com/alii/eslint-plugin-firebase-functions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alii%2Feslint-plugin-firebase-functions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alii%2Feslint-plugin-firebase-functions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alii%2Feslint-plugin-firebase-functions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alii%2Feslint-plugin-firebase-functions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alii","download_url":"https://codeload.github.com/alii/eslint-plugin-firebase-functions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233641229,"owners_count":18707118,"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":["eslint","firebase","plugin"],"created_at":"2024-10-05T07:42:09.234Z","updated_at":"2025-01-12T17:48:39.710Z","avatar_url":"https://github.com/alii.png","language":"TypeScript","funding_links":["https://patreon.com/alistairsmith","https://github.com/sponsors/alii"],"categories":[],"sub_categories":[],"readme":"# eslint-plugin-firebase-functions\n\nAn eslint plugin that provides utilty rules for working with firebase functions.\n\n### Install\n\n```sh\nyarn add eslint-plugin-firebase-functions --dev\n```\n\nAnd add the plugin to your `.eslintrc.js` and make sure you enable the rules you want to use:\n\n```js\nmodule.exports = {\n\tplugins: ['firebase-functions'],\n\trules: {\n\t\t// Example enabling a rule\n\t\t'firebase-functions/\u003crule\u003e': 'error',\n\t},\n};\n```\n\n### Rules:\n\n\u003cdetails\u003e\n\u003csummary\u003e\n\u003ccode\u003esafe-function-exports\u003c/code\u003e —\nEnsures that firebase functions defined in a file are exported inline as a named export\n\u003c/summary\u003e\n\n```ts\nimport * as functions from 'firebase-functions';\n\n/////////////////////\n// Incorrect usage //\n/////////////////////\n\nconst bad = functions\n\t.runWith({timeoutSeconds: 2000})\n\t.https.onRequest((req, res) =\u003e {\n\t\t//\n\t});\n\nconst bad2 = functions.https.onRequest((req, res) =\u003e {\n\t//\n});\n\n// Fails because not inline\nexport {bad};\n\n///////////////////\n// Correct usage //\n///////////////////\n\nexport const good = functions\n\t.runWith({timeoutSeconds: 2000})\n\t.https.onRequest((req, res) =\u003e {\n\t\t//\n\t});\n\nexport const good2 = functions.https.onRequest((req, res) =\u003e {\n\t//\n});\n```\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falii%2Feslint-plugin-firebase-functions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falii%2Feslint-plugin-firebase-functions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falii%2Feslint-plugin-firebase-functions/lists"}