eslint-config-landr

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

LANDR's shareable ESLint configuration for JavaScript and TypeScript projects. Current stable version is 2.0.0, released with peer dependencies eslint >=8 and prettier >=3. Extends eslint-config-prettier and eslint-plugin-prettier to show formatting issues as ESLint errors. Supports framework-specific configs for React and test files. Requires TypeScript parser for JS/TS linting, with typescript as a peer dependency. Includes rules for import ordering with TypeScript path patterns and Lingui i18n.

error Error: Failed to load plugin '@typescript-eslint' declared in 'eslint-config-landr'
cause Missing @typescript-eslint plugins as dependencies
fix
Install @typescript-eslint/parser and @typescript-eslint/eslint-plugin.
error Error: Cannot find module 'prettier'
cause prettier not installed
fix
Add prettier as a devDependency.
error Error: ESLint configuration in .eslintrc.js is invalid: "landr" is not a valid configuration
cause Extension shorthand not recognized
fix
Ensure eslint-config-landr is installed and correctly listed in extends.
breaking Version 2.0.0 requires eslint >=8 and prettier >=3. Older versions may not work.
fix Update eslint and prettier to compatible versions.
gotcha TypeScript parser is used even for JS files; typescript must be installed as a peer dependency.
fix Install typescript as a devDependency.
gotcha Prettier configuration is expected from a .prettierrc.js file in the project root; if missing, default prettier options are used.
fix Create a .prettierrc.js file or use prettier-config-landr.
npm install eslint-config-landr
yarn add eslint-config-landr
pnpm add eslint-config-landr

Shows how to install and configure eslint-config-landr base config with required peer dependencies.

// .eslintrc.js
module.exports = {
  extends: ['landr'],
};

// Install peer dependencies
yarn add -D eslint-config-landr eslint prettier typescript eslint-plugin-prettier eslint-config-prettier @typescript-eslint/parser @typescript-eslint/eslint-plugin