eslint-config-agoda

raw JSON →
4.6.1 verified Sat Apr 25 auth: no javascript

Agoda's ESLint shareable configuration for JavaScript and TypeScript projects, currently at v4.6.1. Follows semantic versioning with occasional beta releases. Differentiators: opinionated rules tailored for Agoda's codebase, integrates with React, Jest, and TypeScript via peer dependencies. The upcoming v5.0.0 will remove eslint-config-airbnb base, breaking existing configurations.

error Error: Cannot find module 'eslint-config-agoda'
cause Package not installed or missing peer dependencies
fix
Run npm install eslint-config-agoda --save-dev and install all peer deps.
error Configuration for rule 'import/order' is invalid
cause Incompatible version of eslint-plugin-import
fix
Install eslint-plugin-import@^2.26.0 as peer dependency.
error ESLint couldn't find the config 'eslint-config-agoda/react'
cause Typo or wrong path
fix
Use 'eslint-config-agoda/react' instead of 'eslint-config-agoda/lib/react'.
breaking v5.0.0 removes eslint-config-airbnb base, causing all Airbnb rules to be lost.
fix Port any reliant rules manually to the new config base.
deprecated The package previously extended 'eslint-config-airbnb'; this is removed in v5.
fix If using v5, do not rely on Airbnb rules; apply them separately if needed.
gotcha All peer dependencies must be installed manually; npm does not install them automatically.
fix Install all listed peer dependencies using the same command as shown in quickstart.
gotcha Using 'extends' with shorthand names like 'agoda' fails because the package is not resolved.
fix Always use the full package name 'eslint-config-agoda'.
gotcha The config may override parserOptions.project; ensure tsconfig.json is present at the root.
fix Set parserOptions.project in your .eslintrc to point to your tsconfig.
npm install eslint-config-agoda
yarn add eslint-config-agoda
pnpm add eslint-config-agoda

Install all peer dependencies and configure .eslintrc.json with agoda configs for TypeScript, React, and Jest.

npm install --save-dev eslint eslint-config-agoda eslint-plugin-jest eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y @typescript-eslint/parser eslint-plugin-react-hooks @typescript-eslint/eslint-plugin

// .eslintrc.json
{
  "extends": [
    "eslint-config-agoda",
    "eslint-config-agoda/react",
    "eslint-config-agoda/typescript",
    "eslint-config-agoda/jest"
  ],
  "parserOptions": {
    "project": "./tsconfig.json"
  }
}