This repository contains a shared eslint config used across Apify. It contains both JS and TS configs.
First install the packages as development dependencies:
npm install --save-dev @apify/eslint-config eslint typescript-eslint
Add eslint.config.js
file, here's an example configuration for a TypeScript project using ESM:
import apify from '@apify/eslint-config';
export default [
...apify,
{
languageOptions: {
sourceType: 'module',
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
];