Neo Financial ESLint Config

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

eslint-config-neo is the official ESLint configuration package from Neo Financial, currently at v0.12.1. It provides a comprehensive set of rules for TypeScript, React, Jest, and Node.js projects, built on top of @typescript-eslint, eslint-plugin-import, eslint-plugin-unicorn, and Prettier. The package ships multiple config presets (config-backend, config-frontend, config-test) and actively enforces code style like curly braces and no reduce. It requires peer dependencies eslint ^8.34.0, prettier ^3.0.0, and typescript. Compared to alternatives like eslint-config-standard or airbnb, it is tailored for Neo's internal style guide and tightly versioned with their toolchain. Release cadence is irregular with breaking changes tied to ESLint major version bumps.

error Error: Cannot find module 'eslint-config-neo/config-backend'
cause Missing or incorrect path when importing config-backend. The correct path is 'eslint-config-neo/config-backend'.
fix
Verify the config path in your .eslintrc.js: 'eslint-config-neo/config-backend' and ensure the package is installed.
error Error: Failed to load plugin '@typescript-eslint' declared in 'eslint-config-neo': Cannot find module 'eslint'
cause Missing peer dependency: eslint, prettier, or typescript not installed or wrong version.
fix
Run npm install eslint@^8.34.0 prettier@^3.0.0 typescript@^4.0.0 --save-dev.
error Parsing error: Unexpected token type 'TS...'
cause TypeScript parser not configured correctly; missing 'parser: @typescript-eslint/parser' or incompatible TypeScript version.
fix
Ensure TypeScript is >=3.7 and eslint-config-neo is properly extended. Verify tsconfig.json is present.
breaking Drop support for ESLint 5 in v0.5.0.
fix Upgrade ESLint to version 6+ (currently requires ^8.34.0).
breaking Peer dependencies require specific major versions: eslint ^8.34.0, prettier ^3.0.0, typescript >=3.7.
fix Ensure package.json includes these exact peer ranges. Using incompatible versions may cause rule failures.
deprecated Configs like config-backend-next and config-frontend-next are experimental and may change without notice.
fix Use stable config-backend and config-frontend for production. Avoid -next variants.
gotcha The rule 'curly' enforces braces on all if/else statements; shorthand if without braces will error.
fix Always use curly braces on multi-line or single-line if statements. For one-liners, e.g. if (x) doSomething(), rewrite with braces.
gotcha Disables 'no-null' in base config, but null usage still discouraged by style guide.
fix Prefer undefined over null in your codebase despite the rule being disabled.
deprecated Jest rules are enabled by default in config-test; if not using Jest, override or avoid that config.
fix Use config-test only for Jest projects. For other test frameworks, extend base config and add test rules manually.
npm install eslint-config-neo
yarn add eslint-config-neo
pnpm add eslint-config-neo

Extends base, backend, and frontend configs in an ESLint config file. Shows typical project setup.

// .eslintrc.js
module.exports = {
  extends: [
    'eslint-config-neo',
    'eslint-config-neo/config-backend',
    'eslint-config-neo/config-frontend',
  ],
  rules: {
    // Add overrides here
  },
};