Pega front-end ESLint configuration.
npm install @pega/eslint-configPegasystems front-end ESLint configuration.
Install ESLint, the Pega config, and the required ESLint plugins.
``shell`
npm i -D eslint @pega/eslint-config @typescript-eslint/eslint-plugin eslint-plugin-import eslint-plugin-jest eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-sonarjs
Extend from the Pega configuration in your ESLint configuration file.
`json`
{
"extends": ["@pega"]
}
Run ESLint to check all .js, .mjs, .cts, .jsx, .ts, .mts, .cts, and .tsx files in the current directory.
`shell`
npx eslint .
Install the VS Code extension, and update your .vscode/settings.json to enable your editor to run ESLint for you automatically.
`json``
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}