{"id":50311065,"url":"https://github.com/salesforcecli/eslint-plugin-sf-plugin","last_synced_at":"2026-05-28T21:01:08.861Z","repository":{"id":37205919,"uuid":"501409558","full_name":"salesforcecli/eslint-plugin-sf-plugin","owner":"salesforcecli","description":"eslint rules for sf plugins","archived":false,"fork":false,"pushed_at":"2026-03-24T16:29:36.000Z","size":3214,"stargazers_count":4,"open_issues_count":8,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-03-25T21:26:44.266Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/salesforcecli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-06-08T21:00:56.000Z","updated_at":"2025-11-19T18:12:50.000Z","dependencies_parsed_at":"2023-09-24T06:23:45.989Z","dependency_job_id":"485460c0-0273-45d1-8b08-ca6cb386deec","html_url":"https://github.com/salesforcecli/eslint-plugin-sf-plugin","commit_stats":{"total_commits":621,"total_committers":14,"mean_commits":"44.357142857142854","dds":0.4782608695652174,"last_synced_commit":"a237add919fcd0ccfbc76b27b8724bdbc373ff08"},"previous_names":[],"tags_count":127,"template":false,"template_full_name":null,"purl":"pkg:github/salesforcecli/eslint-plugin-sf-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforcecli%2Feslint-plugin-sf-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforcecli%2Feslint-plugin-sf-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforcecli%2Feslint-plugin-sf-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforcecli%2Feslint-plugin-sf-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salesforcecli","download_url":"https://codeload.github.com/salesforcecli/eslint-plugin-sf-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforcecli%2Feslint-plugin-sf-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33626142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-05-28T21:01:03.242Z","updated_at":"2026-05-28T21:01:08.855Z","avatar_url":"https://github.com/salesforcecli.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-plugin-sf-plugin\n\nHelpful eslint rules for sf plugins.\n\n## Use these rules in a sf plugin\n\n`yarn add --dev eslint-plugin-sf-plugin`\n\nThen, in your plugin's `.eslintrc.js`, add `\"plugin:sf-plugin/recommended\"` to your `extends` property.\n\nexample:\n\n```js\nmodule.exports = {\n  extends: ['eslint-config-salesforce-typescript', 'eslint-config-salesforce-license', 'plugin:sf-plugin/recommended'],\n};\n```\n\nTo override how an individual rules behaves, add the plugin name and change the its `rules` value.\n\n```js\nplugins: ['sf-plugin'],\nrules: {\n  'sf-plugin/no-hardcoded-messages': 'error'\n}\n```\n\n## Use these rules to migrate a plugin based on sfdxCommand to use sfCommand\n\n\u003e These eslint rules are experimental and cause significant code changes. Please use with caution and test changes thoroughly\n\n```shell\nyarn add @salesforce/sf-plugins-core\nyarn add --dev eslint-plugin-sf-plugin\n```\n\n[`migration` includes all of the `recommended` rules, so you don't have to include both]\n\n```js\nmodule.exports = {\n  extends: ['eslint-config-salesforce-typescript', 'eslint-config-salesforce-license', 'plugin:sf-plugin/migration'],\n};\n```\n\n## Rules\n\n\u003c!-- begin auto-generated rules list --\u003e\n\n💼 Configurations enabled in.\\\n⚠️ Configurations set to warn in.\\\n🚫 Configurations disabled in.\\\n📚 Set in the `library` configuration.\\\n✈️ Set in the `migration` configuration.\\\n✅ Set in the `recommended` configuration.\\\n🔧 Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).\\\n💡 Manually fixable by [editor suggestions](https://eslint.org/docs/latest/use/core-concepts#rule-suggestions).\n\n| Name                                                                                   | Description                                                                                                                      | 💼      | ⚠️   | 🚫      | 🔧 | 💡 |\n| :------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------- | :------ | :--- | :------ | :- | :- |\n| [command-example](docs/rules/command-example.md)                                       | Ensure commands have a summary, description, and examples                                                                        |         | ✈️ ✅ |         |    |    |\n| [command-summary](docs/rules/command-summary.md)                                       | Ensure commands have a summary                                                                                                   | ✈️ ✅    |      |         | 🔧 |    |\n| [dash-o](docs/rules/dash-o.md)                                                         | Warn on a flag that uses -o                                                                                                      |         | ✈️ ✅ |         |    |    |\n| [encourage-alias-deprecation](docs/rules/encourage-alias-deprecation.md)               | Commands and flags aliases probably want to deprecate their old names to provide more warnings to users                          |         |      |         | 🔧 | 💡 |\n| [esm-message-import](docs/rules/esm-message-import.md)                                 | Looks for the verbose `Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)))` to offer a simpler alternative | 📚 ✈️ ✅ |      |         | 🔧 |    |\n| [flag-case](docs/rules/flag-case.md)                                                   | Enforce lowercase kebab-case flag names                                                                                          | ✈️ ✅    |      |         | 🔧 |    |\n| [flag-cross-references](docs/rules/flag-cross-references.md)                           | Enforce flag cross references for dependOn,exclusive,exactlyOne                                                                  | ✈️ ✅    |      |         |    |    |\n| [flag-min-max-default](docs/rules/flag-min-max-default.md)                             | Enforce that flags with min/max values have a default value                                                                      |         | ✈️ ✅ |         |    |    |\n| [flag-summary](docs/rules/flag-summary.md)                                             | Enforce that flags have a summary property and that longDescription is renamed to description                                    | ✈️ ✅    |      |         | 🔧 |    |\n| [get-connection-with-version](docs/rules/get-connection-with-version.md)               | Calls to getConnection should pass in a version                                                                                  |         | ✈️ ✅ |         |    |    |\n| [id-flag-suggestions](docs/rules/id-flag-suggestions.md)                               | Create better salesforceId flags with length and startsWith properties                                                           |         | ✈️ ✅ |         | 🔧 | 💡 |\n| [no-args-parse-without-strict-false](docs/rules/no-args-parse-without-strict-false.md) | If you parse args/argv, the class should have strict set to false                                                                | ✈️ ✅    |      |         | 🔧 |    |\n| [no-builtin-flags](docs/rules/no-builtin-flags.md)                                     | Handling for sfdxCommand's flags.builtin                                                                                         | ✈️      |      |         | 🔧 |    |\n| [no-classes-in-command-return-type](docs/rules/no-classes-in-command-return-type.md)   | The return type of the run method should not contain a class.                                                                    | ✈️ ✅    |      |         | 🔧 |    |\n| [no-default-and-depends-on-flags](docs/rules/no-default-and-depends-on-flags.md)       | Do not allow creation of a flag with default value and dependsOn                                                                 | ✈️ ✅    |      |         |    |    |\n| [no-depends-on-boolean-flag](docs/rules/no-depends-on-boolean-flag.md)                 | Do not allow flags to depend on boolean flags                                                                                    |         | ✈️ ✅ |         |    |    |\n| [no-deprecated-properties](docs/rules/no-deprecated-properties.md)                     | Removes non-existent properties left over from SfdxCommand                                                                       | ✈️      |      |         | 🔧 |    |\n| [no-duplicate-short-characters](docs/rules/no-duplicate-short-characters.md)           | Prevent duplicate use of short characters or conflicts between aliases and flags                                                 | ✈️ ✅    |      |         |    |    |\n| [no-execcmd-double-quotes](docs/rules/no-execcmd-double-quotes.md)                     | Do not use double quotes in NUT examples.  They will not work on windows                                                         |         |      | 📚 ✈️ ✅ | 🔧 |    |\n| [no-filepath-flags](docs/rules/no-filepath-flags.md)                                   | Change filepath flag to file flag                                                                                                |         |      |         | 🔧 |    |\n| [no-h-short-char](docs/rules/no-h-short-char.md)                                       | Do not allow creation of a flag with short char -h                                                                               | ✈️ ✅    |      |         |    |    |\n| [no-hardcoded-messages-commands](docs/rules/no-hardcoded-messages-commands.md)         | Use loaded messages and separate files for messages                                                                              |         | ✈️ ✅ |         |    |    |\n| [no-hardcoded-messages-flags](docs/rules/no-hardcoded-messages-flags.md)               | Use loaded messages and separate files for messages.  Follow the message naming guidelines                                       |         | ✈️ ✅ |         | 🔧 |    |\n| [no-hyphens-aliases](docs/rules/no-hyphens-aliases.md)                                 | Mark when an alias starts with a hyphen, like -f or --foo                                                                        | ✈️ ✅    |      |         | 🔧 |    |\n| [no-id-flags](docs/rules/no-id-flags.md)                                               | Change Id flag to salesforceId                                                                                                   | ✈️      |      |         | 🔧 |    |\n| [no-json-flag](docs/rules/no-json-flag.md)                                             | Do not allow creation of json flag                                                                                               | ✈️ ✅    |      |         |    |    |\n| [no-messages-load](docs/rules/no-messages-load.md)                                     | Use Messages.loadMessages() instead of Messages.load()                                                                           | 📚 ✈️ ✅ |      |         | 🔧 |    |\n| [no-missing-messages](docs/rules/no-missing-messages.md)                               | Checks core Messages usage for correct usage of named messages and message tokens                                                | 📚 ✈️ ✅ |      |         |    |    |\n| [no-number-flags](docs/rules/no-number-flags.md)                                       | Change number flag to integer                                                                                                    |         |      |         | 🔧 |    |\n| [no-oclif-flags-command-import](docs/rules/no-oclif-flags-command-import.md)           | Change import of flags and Command from oclif to use sf-plugins-core                                                             | ✈️ ✅    |      |         | 🔧 |    |\n| [no-sfdx-command-import](docs/rules/no-sfdx-command-import.md)                         | Change import and base class from SfdxCommand to sfCommand                                                                       | ✈️      |      |         | 🔧 |    |\n| [no-split-examples](docs/rules/no-split-examples.md)                                   | Arrays of messags should use getMessages instead of getMessage followed by EOL splitting                                         | ✈️ ✅    |      |         | 🔧 |    |\n| [no-this-flags](docs/rules/no-this-flags.md)                                           | Fix references to this.org (property on SfdxCommand)                                                                             | ✈️      |      |         | 🔧 | 💡 |\n| [no-this-org](docs/rules/no-this-org.md)                                               | Fix references to this.org (property on SfdxCommand)                                                                             | ✈️      |      |         | 🔧 | 💡 |\n| [no-this-ux](docs/rules/no-this-ux.md)                                                 | SfCommand does not have a ux property                                                                                            | ✈️      |      |         | 🔧 |    |\n| [no-time-flags](docs/rules/no-time-flags.md)                                           | Migrate time flags to Flags.duration                                                                                             | ✈️      |      |         | 🔧 |    |\n| [no-unnecessary-aliases](docs/rules/no-unnecessary-aliases.md)                         | Mark when an alias is unnecessary because its only an order permutation, not really a different name                             | ✈️ ✅    |      |         | 🔧 |    |\n| [no-unnecessary-properties](docs/rules/no-unnecessary-properties.md)                   | Boolean properties are false by default, so they should not be set to false                                                      |         | ✈️ ✅ |         | 🔧 |    |\n| [no-username-properties](docs/rules/no-username-properties.md)                         | Convert requiresUsername and supportusername to username flags                                                                   | ✈️      |      |         | 🔧 |    |\n| [only-extend-SfCommand](docs/rules/only-extend-SfCommand.md)                           | Only allow commands that directly extend SfCommand                                                                               |         | ✈️ ✅ |         |    |    |\n| [read-only-properties](docs/rules/read-only-properties.md)                             | Class-level static properties, like flags or descriptions, should be marked public and read-only                                 |         | ✈️ ✅ |         | 🔧 |    |\n| [run-matches-class-type](docs/rules/run-matches-class-type.md)                         | The return type of the run method should match the Type passed to sfCommand                                                      | ✈️ ✅    |      |         | 🔧 |    |\n| [sfdx-flags-property](docs/rules/sfdx-flags-property.md)                               | Change flag definitions to SfCommand version                                                                                     | ✈️      |      |         | 🔧 |    |\n| [should-parse-flags](docs/rules/should-parse-flags.md)                                 | The run method should call this.parse when there are flags                                                                       | ✈️      |      |         | 🔧 |    |\n| [spread-base-flags](docs/rules/spread-base-flags.md)                                   | When not directly extending SfCommand, the parent's flags must be spread like flags = { ...{{parent}}.{{property}} }             | ✈️      | ✅    |         |    |    |\n| [use-sf-command-flags](docs/rules/use-sf-command-flags.md)                             | Use Flags export from sf-plugins-core                                                                                            | ✈️      |      |         | 🔧 |    |\n\n\u003c!-- end auto-generated rules list --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalesforcecli%2Feslint-plugin-sf-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalesforcecli%2Feslint-plugin-sf-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalesforcecli%2Feslint-plugin-sf-plugin/lists"}