Skip to content

Conversation

kellymears
Copy link
Contributor

  • updates babel-eslint to @babel/eslint-parser.
  • @roots/sage: exports @roots/sage/eslint-config for use in theme.

@retlehs next sage release will need to have eslint configuration updated to:

module.exports = {
  root: true,
  extends: ['@roots/sage/eslint-config'],
};

I think this is the way to go. by exporting a base config further changes to the base will not need to be manually tracked by theme consumers. everything remains fully overridable so there is really very little trade off outside of a reduction of transparency. I think that's a good trade for most people using Sage (and for us as maintainers).

Dependencies

  • add: @babel/eslint-parser
  • remove: babel-eslint
  • remove: prettier from default @roots/bud-eslint.

@kellymears kellymears added this to the 5.1.0 milestone Dec 28, 2021
@kellymears kellymears self-assigned this Dec 28, 2021
@github-actions github-actions bot added @roots/bud-eslint @roots/sage dependencies Pull requests that update a dependency file labels Dec 28, 2021
@knowler
Copy link
Member

knowler commented Dec 29, 2021

Since we’ve extracted the ESLint config for Sage, should we get rid of the file over there and then use the eslintConfig field in package.json? Should we do the same for Stylelint as well? And Prettier?

@kellymears
Copy link
Contributor Author

@knowler i haven't tested with the package.json field but that makes sense to me. the only reason to keep the eslint config is to give people a base to extend from.

not really sure how extendable configs work in prettier and stylelint but those seem like good ideas to me.

@kellymears kellymears merged commit 89e48ee into next Dec 29, 2021
@kellymears kellymears deleted the eslint-parser branch December 29, 2021 22:23
This was referenced Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file @roots/bud-eslint @roots/sage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants