eslint-config-freshegg

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

A shared ESLint and Prettier configuration package from FreshEgg UK. Version 1.0.7 supports ESLint 8, Prettier 2, and TypeScript 5. It provides a consistent set of linting and formatting rules for JavaScript and TypeScript projects. Unlike many configs, it includes TypeScript-specific rules and integrates Prettier via eslint-plugin-prettier. The package is designed to be minimal and opinionated, reducing configuration overhead. Updates are infrequent; at v1.0.7, it is considered stable.

error Error: Failed to load plugin 'prettier' declared in 'eslint-config-freshegg'
cause Missing eslint-plugin-prettier dependency.
fix
npm install --save-dev eslint-plugin-prettier
error Error: Cannot find module 'typescript'
cause TypeScript not installed but using TypeScript config.
fix
npm install --save-dev typescript or switch to base config without typescript.
breaking Requires ESLint 8.x; incompatible with ESLint 7 or 9.
fix Use ESLint 8.x or check for v2 release with ESLint 9 support.
gotcha The config enables eslint-plugin-prettier which may cause conflicts if you have separate Prettier config.
fix Disable prettier rules in eslint if using standalone Prettier.
gotcha TypeScript config requires tsconfig.json to be present and referenced in parserOptions.project.
fix Ensure tsconfig.json exists and parserOptions.project points to it.
npm install eslint-config-freshegg
yarn add eslint-config-freshegg
pnpm add eslint-config-freshegg

Shows how to install and configure the ESLint and Prettier config for a TypeScript project.

// Install dependencies
// npm install --save-dev eslint prettier typescript eslint-config-freshegg

// .eslintrc.js
module.exports = {
  extends: ['eslint-config-freshegg'],
  parserOptions: {
    project: './tsconfig.json'
  }
};

// .prettierrc (if needed)
module.exports = require('eslint-config-freshegg/prettier');

// package.json scripts
"lint": "eslint . --ext .js,.ts"