eslint-config-ipfs

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

ESLint Shareable Config for IPFS project. Current stable version: 8.0.0. Release cadence: irregular, with major version bumps for breaking changes. Provides a curated set of ESLint rules tailored for JavaScript/TypeScript libraries in the IPFS ecosystem. Differentiators: built on eslint-config-love (replacing deprecated eslint-config-standard-with-typescript), enforces consistent type imports, and integrates seamlessly with AEgir build tool. Supports both .js and .ts files with separate rule sets. Requires Node >=16 and optional TypeScript peer dependency.

error Error: Cannot find module 'eslint-config-ipfs'
cause Package not installed or not listed in devDependencies.
fix
Run npm install --save-dev eslint-config-ipfs.
error ESLint couldn't find the config 'ipfs'
cause The config name is incorrect or missing in extends.
fix
Ensure your .eslintrc has "extends": "ipfs" (without the 'eslint-config-' prefix).
error Parsing error: Cannot read file 'tsconfig.json'
cause TypeScript parser requires tsconfig.json, but none is present or configured.
fix
Create a tsconfig.json file in your project root. Alternatively, set parserOptions.project: false in your ESLint overrides for TS files.
error Definition for rule '@typescript-eslint/consistent-type-imports' was not found
cause The required eslint-plugin-@typescript-eslint is missing or outdated.
fix
Install/update: npm install --save-dev @typescript-eslint/eslint-plugin.
breaking v7.0.0 replaced eslint-config-standard-with-typescript with eslint-config-love. This may cause new rule violations.
fix Run eslint --fix to auto-fix new rules. Review any remaining errors manually.
breaking v8.0.0 enforces consistent type import style (e.g., import type vs inline type).
fix Run eslint --fix to automatically update imports to match new rule.
deprecated eslint-config-standard-with-typescript is deprecated and replaced by eslint-config-love.
fix Update to v7+ which uses eslint-config-love. If on v6, migrate to v7 or adopt eslint-config-love directly.
gotcha The package name for extending is 'ipfs', not 'eslint-config-ipfs'. Wrong name causes ESLint to fail loading config.
fix Use extends: 'ipfs' in your ESLint config.
gotcha If not using AEgir, you must manually install TypeScript and satisfy all peer dependencies (e.g., eslint-plugin-*).
fix Run `npm install typescript` and check for missing plugin warnings. Consider using AEgir to avoid this.
npm install eslint-config-ipfs
yarn add eslint-config-ipfs
pnpm add eslint-config-ipfs

Basic setup to use eslint-config-ipfs in any project. Install as devDependency, create .eslintrc with extends key, then lint.

// 1. Install
npm install --save-dev eslint-config-ipfs

// 2. Create .eslintrc.json
{
  "extends": "ipfs"
}

// 3. Run ESLint
npx eslint .