Skip to content

Add ls-lint to sfdx projects #2160

Closed
Closed

Description

@AllanOricil

Is your feature request related to a problem? Please describe.
No

What are you trying to do
Standardize the way sfdx projects enforce file/directory naming conventions.

Describe the solution you'd like

  • sfdx projects must be created with ls-lint
  • sfdx projects must have a standard set of ls-lint rules.
  • rules must be overwritten
  • must be called by an sfdx hook (pre commit|push prefarably)
  • include ls-lint in the lint script. I want to run es-lint and ls-lint when typing npm run lint
  • it could be released as a plugin called @salesforce/plugin-ls-lint and later, based on telemetry data, you can decide if it makes sense to add it, or not, in the list of core plugins.

https://ls-lint.org/

You could create a new package that bundles ls-lint with your pre defined set of rules, and then add it in the dev dependencies of sfdx projects.

Benefits:

  • less time reviewing PRs to check if files and directories are following naming conventions
  • ease project onboarding
  • avoid deploying metadata that arent following naming conventions

Describe alternatives you've considered
I can add ls-lint to every sfdx project I work on... but I would have to spend time convincing people about its benefits, and every sfdx project could end up having different set of naming conventions.

Additional context
N/A

still waiting my gift...

Activity

  1. github-actions commented on May 24, 2023

    @github-actions

    Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments.

  2. git2gus commented on May 24, 2023

    @git2gus

    This issue has been linked to a new work item: W-13479253

  3. iowillhoit commented on May 24, 2023

    @iowillhoit
    Contributor

    Thanks for the feature request, it is now in our backlog. Some the folder structure ls-lint config could be created from the metadata registry.

  4. locked and limited conversation to collaborators on Aug 1, 2023
  5. converted this issue into a discussion #2341 on Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIssue or pull request for a new feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions