Lisk Base ESLint Config

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

An ESLint configuration package for Lisk blockchain projects, extending eslint-config-airbnb-base with custom overrides. Current stable version is 2.0.1, released with updates for ESLint 7 and TypeScript parser support. It is part of the Lisk ecosystem and is actively maintained alongside other Lisk packages. Key differentiators: tailored for blockchain development, integrates with Prettier, and supports TypeScript via peer dependencies. Release cadence follows Lisk SDK updates, roughly semi-annual.

error Error: Cannot find module 'eslint-config-airbnb-base'
cause Missing peer dependency eslint-config-airbnb-base (installed automatically by eslint-config-lisk-base)
fix
Install airbnb-base: npm install --save-dev eslint-config-airbnb-base
error Error: ESLint configuration in .eslintrc.json is invalid: "lisk-base" is not a valid configuration key
cause Using 'extends' inside an object incorrectly; must be an array
fix
Use: {"extends": ["lisk-base"]}
error Parsing error: The keyword 'const' is reserved
cause ESLint not configured for modern JavaScript or TypeScript
fix
Install @typescript-eslint/parser and @typescript-eslint/eslint-plugin as peer deps, and set parserOptions.ecmaVersion in your config
breaking Breaking change from v1 to v2: requires ESLint 7+ and drops support for ESLint 6
fix Upgrade ESLint to ^7.22.0 or higher
deprecated Node.js 12 support ended; Node >=14 is recommended for v2
fix Use Node 14+
gotcha The config extends eslint-config-airbnb-base but overrides some rules. Check for unexpected linting differences
fix Review the overrides in the package's rules (available on GitHub)
npm install eslint-config-lisk-base
yarn add eslint-config-lisk-base
pnpm add eslint-config-lisk-base

Shows basic installation and configuration of eslint-config-lisk-base in a project.

// 1. Install
npm install --save-dev eslint eslint-config-lisk-base eslint-plugin-import

// 2. Create .eslintrc.json
{
  "extends": ["lisk-base"]
}

// 3. Run ESLint
npx eslint src/