https://github.com/agoda-com/eslint-config-agoda
Agoda's ESLint configuration
https://github.com/agoda-com/eslint-config-agoda
agoda eslint eslint-config eslint-rules javascript linter-config linting-rules typescript
Last synced: 5 months ago
JSON representation
Agoda's ESLint configuration
- Host: GitHub
- URL: https://github.com/agoda-com/eslint-config-agoda
- Owner: agoda-com
- License: mit
- Created: 2019-10-28T17:07:05.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-01-13T22:06:58.000Z (6 months ago)
- Last Synced: 2025-02-01T14:12:50.104Z (5 months ago)
- Topics: agoda, eslint, eslint-config, eslint-rules, javascript, linter-config, linting-rules, typescript
- Language: JavaScript
- Size: 1.1 MB
- Stars: 9
- Watchers: 11
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/eslint-config-agoda)

[](https://github.com/semantic-release/semantic-release)
[](http://commitizen.github.io/cz-cli/)
[](https://dependabot.com/)# eslint-config-agoda
This package contains Agoda's ESLint configuration that can be shared and
extended.## Installation
```sh
# yarn users
yarn add -D eslint-config-agoda# npm users
npm install --save-dev eslint-config-agoda# pnpm users
pnpm add -D eslint-config-agoda
```You will also need to have all peer dependencies installed on your project. To
do so, please run:```sh
# will use yarn/npm depending on detected configuration.
npx install-peerdeps --dev eslint-config-agoda
```## Usage
Modify your `.eslintrc` configuration file, to extend from Agoda's config:
```json
"extends": "agoda"
```Example `.eslintrc` file for Typescript environment:
```json
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"extends": ["agoda"],
"rules": {}
}
```### Command line
Setup following script in `package.json` to enable linting via CLI.
```json
"lint": "eslint --ext .ts,.tsx --ignore-path .gitignore ./packages/",
```Above example is using packages directory (like it would be done for a
monorepo), so should be replaced by `./src/` in case of regular codebase### Visual Studio Code
You can enable linting to run in background and check currently opened files by
setting following configuration:workspace settings `.vscode/settings.json`
```json
"eslint.validate": [
{
"language": "typescript",
"autoFix": true
},
{
"language": "typescriptreact",
"autoFix": true
}
],
"eslint.options": {
"extensions": [".ts", ".tsx"]
},
"typescript.tsdk": "node_modules\\typescript\\lib","eslint.alwaysShowStatus": true,
"eslint.autoFixOnSave": true,
"editor.formatOnSave": false,
"javascript.format.enable": false
```## Typescript
Note that this config is created with typescript in mind, so remember to use
`project` key to facilitate type-based rules as well.