eslint-config-niieani

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

A modern TypeScript-only ESLint configuration package extending Airbnb's base config with additional rules for promises, unicorn, import sorting, and Jest. Version 1.2.10 requires ESLint >=7.32.0 and Node.js >=12.22.12. It ships TypeScript types and is part of the scaffold monorepo. Designed for Beemo-configured projects, it uses tabs over spaces, prefers named exports, and automatically detects tsconfig.json. Optional presets for browser, Node, and React are available.

error Error: Failed to load config 'niieani' to extend from.
cause eslint-config-niieani is not installed or not in node_modules.
fix
Run npm install --save-dev eslint-config-niieani.
error Error: Cannot find module 'eslint-config-airbnb-base'
cause airbnb-base is a dependency of eslint-config-niieani but may not be automatically installed with npm versions below 7.
fix
Run npm install --save-dev eslint-config-airbnb-base or use npm >=7 for automatic peer dependency resolution.
error Parsing error: Cannot read file 'tsconfig.json'.
cause The config tries to automatically set parserOptions.project based on root tsconfig.json, but it doesn't exist.
fix
Create a tsconfig.json in your project root, or override parserOptions in your ESLint config.
error Error: Failed to load config 'niieani/node' to extend from.
cause The preset name is incorrect or the config is not properly referenced.
fix
Use 'niieani/node' (not 'eslint-config-niieani/node') in the extends array.
gotcha The config requires source files to be located in a 'src' folder. Moving source files elsewhere will cause rules to not apply or produce errors.
fix Place all source files under a 'src/' directory.
gotcha Test files must end with '*.test.{ts,tsx}' and be inside 'tests' or '__tests__' folders for Jest-specific rules to apply.
fix Name test files accordingly and place them in the correct directory.
gotcha The config uses tabs over spaces for accessibility. If your project uses spaces, this will cause formatting conflicts.
fix Either adopt tabs or override the 'indent' rule in your ESLint config.
gotcha The config relies on TypeScript for parsing; files must be in a TypeScript-supported format (.ts, .tsx). JavaScript files (.js, .jsx) are not parsed.
fix Ensure all source files are TypeScript or override the parser.
breaking Peer dependency eslint >=7.32.0 is required. Older versions are not supported.
fix Upgrade ESLint to version >=7.32.0.
npm install eslint-config-niieani
yarn add eslint-config-niieani
pnpm add eslint-config-niieani

Shows how to install and configure eslint-config-niieani in an ESLint project.

// Install the config and its peer dependency
// npm install --save-dev eslint eslint-config-niieani

// .eslintrc.js
module.exports = {
  root: true,
  extends: [
    'niieani',
    // Add presets as needed, e.g.
    // 'niieani/react',
  ],
  // Override rules if necessary
  rules: {
    'import/prefer-default-export': 'off', // Already off in config
    // ...
  }
};