@pega/eslint-config
v0.16.2
Published
Pega front-end ESLint configuration.
Downloads
3,702
Readme
@pega/eslint-config
Pegasystems front-end ESLint configuration.
Installation
Install ESLint, the Pega config, and the required ESLint plugins.
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
Setting up your config
Extend from the Pega configuration in your ESLint configuration file.
{
"extends": ["@pega"]
}
Running ESLint
Run ESLint to check all .js
, .mjs
, .cts
, .jsx
, .ts
, .mts
, .cts
, and .tsx
files in the current directory.
npx eslint .
VS Code integration
Install the VS Code extension, and update your .vscode/settings.json
to enable your editor to run ESLint for you automatically.
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}