@agiledigital/eslint-config
v4.2.0
Published
Agile Digital's standard ESLint config
Downloads
325
Keywords
Readme
eslint-config-agile-digital
Agile Digital's standard ESLint config
Installation
yarn add --dev @agiledigital/eslint-config \
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-simple-import-sort \
eslint-plugin-filename-rules \
eslint-plugin-jsdoc \
eslint-plugin-tsdoc \
eslint-plugin-no-secrets \
eslint-plugin-prefer-arrow-functions \
eslint-plugin-react \
eslint-plugin-react-hooks \
eslint-plugin-jsx-a11y \
eslint-plugin-react-refresh \
typescript
Usage
- 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"
+ tsconfigRootDir: __dirname,
},
extends: [
+ "@agiledigital",
+ "@agiledigital/eslint-config/react", // In addition to the above if this is a React project
...
],
rules: {
...
}
};