Codely ESLint & Prettier Config

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

Opinionated ESLint and Prettier configuration from CodelyTV, currently at v4.5.0 (February 2025). Released under Semantic Versioning with active maintenance. Provides flat config presets for JavaScript, TypeScript, and a full opinionated set including import sorting, unused import removal, and DDD-convention folder naming rules. Requires eslint >=9.0.0 flat config and TypeScript strict mode for some rules. Differentiated by its Codely-specific folder naming conventions and all-in-one approach combining recommended rules, import plugins, and Prettier integration.

error ReferenceError: require is not defined in ES module scope
cause Using require() to import the ESM-only package.
fix
Replace require() with import or use dynamic import().
error Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'eslint-config-codely'
cause Package not installed or used with legacy .eslintrc format.
fix
Ensure package is installed: npm install --save-dev eslint-config-codely, and use eslint.config.js flat config.
error ESLint configuration is invalid: 'export default' is not a valid configuration for legacy format
cause Using export syntax in .eslintrc file instead of flat config.
fix
Rename file to eslint.config.js and use the flat config format with export default.
error Parsing error: 'parserOptions.project' has been set for @typescript-eslint/parser.
cause Missing or incorrect tsconfig.json path; strict mode not set.
fix
Ensure tsconfig.json has strict: true and parserOptions.project points to tsconfig.json.
breaking Requires ESLint flat config (>=9.0.0). Legacy .eslintrc formats are not supported.
fix Use eslint.config.js with the flat config format as shown in the quickstart.
breaking Package is ESM-only. Import using 'import' syntax or dynamic import(); require() fails.
fix Use import or set "type": "module" in package.json; if using CommonJS, use dynamic import: const eslintConfigCodely = await import('eslint-config-codely');
deprecated Some rules from @typescript-eslint/recommended-requiring-type-checking may be deprecated in future. Check changelog for rule removals.
fix Stay updated with releases; override deprecated rules as needed.
gotcha TypeScript strict mode must be enabled in tsconfig.json for some rules to work correctly.
fix Set "strict": true in tsconfig.json.
gotcha Folder naming conventions (plugin codely) may conflict with existing project structure.
fix Override codely/folder-naming-convention rule in your config if needed.
gotcha The 'unused-imports' plugin auto-fixes can remove imports used only for types; ensure type imports are explicit (import type).
fix Use import type { ... } from 'module' to prevent false positives.
npm install eslint-config-codely
yarn add eslint-config-codely
pnpm add eslint-config-codely

Shows installation and basic usage with the TypeScript preset in flat config format.

// Install
npm install --save-dev eslint-config-codely

// Create eslint.config.js
import eslintConfigCodely from 'eslint-config-codely';

export default [
  ...eslintConfigCodely.ts,
  // ...eslintConfigCodely.full,
  {
    rules: {
      // override rules
    }
  }
];

// Ensure tsconfig.json has "strict": true for some rules
// Run: npx eslint .