-
Notifications
You must be signed in to change notification settings - Fork 108
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
Integrate prettier #832
Integrate prettier #832
Conversation
- with a cheeky change to tab
Good work! A few things though:
Could we see if any of Prettier's config might tidy this up? E.g. https://prettier.io/docs/en/options.html#bracket-line |
Cheers @andymantell - absolutely with you on So setting the following in the Prettier config sort this. module.exports = {
bracketSameLine: true,
htmlWhitespaceSensitivity: "ignore",
}; However, seems like that raises a small risk of issues with HTML whitespace. The rediculous-looking version provides consistency of HTML whitespace. My angle would be to go with the suggested settings above. I don't personally think whitespace rendering issues are common now outside of JSX but would be interested on other opinions. I'll push up a version with the config for a gander at how that would look. |
Actually I'll see if backstop agrees with me before saying that. |
This is a somewhat nuclear operation to completely reformat based on Prettier's defaults.
This enforces tabs across both CSS and JS. Some reading suggests that tabs are more accessible for developers who use assistive tech. There are some thoughts on that here:
There's nothing touching Nunjucks files at present.
JS (Eslint)
airbnb-base
(changed fromairbnb-base/legacy
thenprettier/recommended
CSS (Stylelint)
Other files
Formats all other files that fall outside of the prettier ignore, namely
node_modules/*
dist/*
tests/backstop/*
.github/*
coverage/*
This includes previously untouched files such as:
jest.config.js
,gulpfile.js
etc)tests/
folder