@defra/lis-infra-eslint-config
v0.6.0
Published
Shared ESLint flat config for the LIS ecosystem
Readme
lis-infra-eslint-config
Shared ESLint flat config for JavaScript/Node.js repos in the LIS ecosystem.
Using Defra's preferred neostandard as a base, this config adds sonarjs rules based on those enforced by the Defra JavaScript Standard from SonarQube.
It also adds requirements for jsdoc, focussed on exported interfaces, to improve maintainability as well as to provide better experience for developers using IDEs and AI coding agents.
Stack: ESM · ESLint flat config (neostandard + sonarjs + jsdoc)
Usage
Install:
npm install --save-dev @defra/lis-infra-eslint-configIn your repo's eslint.config.js:
import lisEslintConfig from '@defra/lis-infra-eslint-config'
export default [
...lisEslintConfig
// repo-specific overrides go here
]Running locally
npm install
npm run lint # eslint (lints this repo's own source using its own config)Project structure
src/
├── index.js # the exported ESLint flat config array
├── sonarjs.js # sonarjs-derived rules, sourced from the Defra JS Sonar profile
└── jsdoc.js # jsdoc rules, requiring docs on exported functions/methodsPatterns
- Config changes here affect every consuming repo — treat this as a shared contract and version deliberately.
- These files are flat config data, not logic, so they aren't unit tested — correctness is checked by this repo's own
npm run lintdogfooding the config.
