Skip to content

🚀 Feature: Add an on-by-default "Config" plugin #2181

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Feature Request Checklist

  • I am using the latest published version of all Flint packages.
  • I have searched for related issues and found none that matched my issue.

Overview

Splitting out of #2152:

I personally prefer the idea of the Knip-style config hint 😁 Not sure how annoying it could make composing configs though. If it were up to me, I'd do it and revert later if it's too annoying.

Originally posted by @barrymichaeldoyle in #2086 (comment)

Flint right now doesn't have a real way to lint just the Flint config (flint.config.*) file. But there are quite a few things we would want to lint for users:

Quoting #2152 (comment):

Yeah. This isn't the first time -and I don't think will be even close to the last- where we've discussed having some kind of linting for the Flint config. Which is tricky as a whole because (thinking out loud):

  1. We have a lot of points we'd want to enable, such as this one
  2. Each of those points is effectively a lint rule: they have syntax to detect, a range to report, and fixes/suggestions
  3. We basically want to have a dedicated Flint Config plugin...
  4. ...but don't want to ask users to always configure that in their config file

Proposal: how about making a Flint config that's always-on, but can be configured?

defineConfig({
  configLintingPropertyNameTBD: {
    // configuring the rule like any other
    configurationRedundancy: { someOption: true },
    someOtherRuleToBeDisabled: false,
  },

  ignore: [ /* ... */ ],
  use: [ /* ... */ ],
});

...and this "redundant configuration" point can be one of those rules?

Additional Info

❤️‍🔥

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: in discussionNot yet ready for implementation or a pull requesttype: featureNew enhancement or request 🚀

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions