Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: revamped config and added sub-configs #26

Closed

Conversation

JoshuaKGoldberg
Copy link

@JoshuaKGoldberg JoshuaKGoldberg commented Oct 4, 2022

Fixes #25.

Does what #25 suggests and extends from @typescript-eslint/eslint-plugin's recommended config. I then also added sub-configs specific to use cases:

Composable configs is a good practice allowing applications that don't meet all those use cases to not pull in rules they don't care about.

A consuming repo might include them with an ESLint config like:

{
  // ...
  "extends": [
    "@grafana/eslint-config",
    "@grafana/eslint-config/emotion",
    "@grafana/eslint-config/jest",
    "@grafana/eslint-config/jsx",
    "@grafana/eslint-config/lodash",
    "@grafana/eslint-config/react"
  ],
  // ...
}

Finally, this wipes all the rule settings out index.js, then adds back any rule settings that change the default value.

See grafana/grafana#56240 for an example of pulling this in.

@CLAassistant
Copy link

CLAassistant commented Oct 4, 2022

CLA assistant check
All committers have signed the CLA.

@JoshuaKGoldberg
Copy link
Author

Closing this to keep my PR queue small. LMK if you'd like any help with this!

@JoshuaKGoldberg JoshuaKGoldberg deleted the revamp-configs branch May 2, 2023 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Spruce Up ESLint Config
2 participants