Agile Digital's standard ESLint config
yarn add --dev eslint-config-agile-digital \
eslint-config-typed-fp \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser \
eslint \
eslint-plugin-functional \
eslint-plugin-total-functions \
eslint-plugin-jest \
eslint-plugin-prettier \
eslint-plugin-sonarjs \
eslint-plugin-import \
eslint-plugin-react \
eslint-plugin-react-hooks \
eslint-plugin-jsx-a11y \
typescript
- Turn on TypeScript's strict mode and noUncheckedIndexedAccess option.
- Set up ESLint + TypeScript.
- Update your
.eslintrc.js
:
module.exports = {
+ parser: "@typescript-eslint/parser",
parserOptions: {
+ project: "./tsconfig.json",
+ ecmaVersion: 2018,
+ sourceType: "module"
},
extends: [
+ "agile-digital",
+ "agile-digital/react", // In addition to the above if this is a React project
...
],
plugins: [
+ "jest",
+ "sonarjs",
+ "functional",
+ "@typescript-eslint",
+ "prettier",
+ "total-functions",
+ "import",
+ "react",
+ "react-hooks",
+ "jsx-a11y",
...
],
rules: {
...
}
};