A shareable ESLint config.
# Install the shareable config
npm i -save-dev @hmlr/eslint-config
# Install all dependencies (npm 5+)
npx install-peerdeps --dev @hmlr/eslint-config
Add the config to the extends
property of your .eslintrc*
file. For more information, see using a shareable config on eslint.org
{
"extends": "@hmlr/eslint-config"
}
{
"extends": "@hmlr/eslint-config/react"
}
{
"extends": "@hmlr/eslint-config/node"
}
If you don't have ESLint set up already, you can add one or both of the following scripts to your package.json
, changing directories, extensions and parameters as necessary:
{
"scripts": {
"eslint": "eslint --ext js,jsx,ts,tsx src",
"eslint:fix": "eslint --ext js,jsx,ts,tsx --fix src",
}
}
In addition to linting your code with ESLint, we also recommend installing Prettier to help with code formatting.
It is suggested that you avoid modifying any of the default options in order to maintain consistency. To learn why, see the philosophy on options from Prettier.
npm i -save-dev prettier
prettier --write 'src/**/*.{js,jsx,ts,tsx,css,scss,less,json,html}'
We use SemVer for versioning. For the versions available, see the tags on this repository.
We welcome contribution from the community. If you want to contribute to this project, please review the code of conduct and contribution guidelines.
- Andrew Hosgood (Primary maintainer)
This software is provided "as-is" without warranty. Support is provided on a "best endeavours" basis by the maintainers and open source community.
If you are a civil servant you can sign up to the UK Government Digital Slack workspace to contact the maintainers listed above and the community of people using this project in the #govuk-design-system channel.
Otherwise, please see the contribution guidelines for how to raise a bug report or feature request.