-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need both .eslintrc
and .prettierrc
?
Should we also add the .editorconfig
? https://github.com/guardian/configs/blob/main/.editorconfig
export { default as BodyImage } from './components/bodyImage'; | ||
export { default as FigCaption } from './components/figCaption'; | ||
export { default as Img } from './components/img'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this going to work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the same file further up, we're already doing export { Role } from './image';
so export { Img } from './components/img';
should work the same.
To be honest, I've never really got my head around how and where eslint and prettier overlap. I'm used to having the two different config files though and the
I think this makes sense. We could perhaps bring this in in a different PR to try to limit the noice from this one |
Glad I'm not the only one struggling to grasp the distinction between Prettier and ESLint 😆 I think it should be set up so that prettier runs after ESLint, possibly triggered by it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🆒
What does this change?
Well, this mushroomed.
Originally a PR to add linting it grew into adding additional config packages to get linting to work and then I had to do that thing where you have to solve all the linting errors causing a cascade of changes.
What linting errors were there?
Most changes were classic things like single quotes vs. double or spacing but the recommended configuration for @guardian repos also has things like no default exports which caused errors here too
I also updated the
scripts
section ofpackage.json
, giving: