@govuk-one-login/ipv-trust-and-reuse-eslint-rules
v1.0.10
Published
ESLint rules for the Trust and Reuse Team components
Maintainers
Keywords
Readme
ipv-trust-and-reuse-eslint-rules
Provides a set of standard ESLint rules for the Trust and Reuse Team components. It support ESLint rules for:
- Javascript using the @eslint/js plugin
- Typescript using the typescript-eslint plugin
- Prettier using the eslint-plugin-prettier plugin
- Vitest using the @vitest/eslint-plugin plugin (if vitest is installed in your project)
Installation
From the command line install eslint and the package using. This should be stored as a
devDependenciesand it's recommended to pin the version.npm i --save-dev -E eslint @govuk-one-login/ipv-trust-and-reuse-eslint-rulesCreate the top level file
eslint.config.mjswith the following contents:export { default } from "@govuk-one-login/ipv-trust-and-reuse-eslint-rules";Ensure that your package.json
"scripts"contains an eslint entry, for example:"scripts": { "lint": "eslint . --ext .ts" }(Optional) If you are using
vitestyou must also install@vitest/eslint-plugin.npm i --save-dev -E @vitest/eslint-plugin
Local Development
The module is developed using Javascript and will use the defined eslint rules to test its own code. You can test the module by:
npm ci
npm run lint