{"id":19500,"library":"eslint-config-codely","title":"Codely ESLint & Prettier Config","description":"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.","status":"active","version":"4.5.0","language":"javascript","source_language":"en","source_url":"https://github.com/CodelyTV/eslint-config-codely","tags":["javascript","typescript","ecmascript","eslint","eslintconfig","lint","config","prettier"],"install":[{"cmd":"npm install eslint-config-codely","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-codely","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-codely","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for using ESLint configs","package":"eslint","optional":true},{"reason":"peer dependency required for TypeScript config presets","package":"typescript","optional":true}],"imports":[{"note":"Package is ESM-only. Requires ESLint flat config. Default export is an object with .js, .ts, .full, .course properties.","wrong":"const eslintConfigCodely = require('eslint-config-codely');","symbol":"default (eslintConfigCodely)","correct":"import eslintConfigCodely from 'eslint-config-codely';"},{"note":"Access presets as properties of the default import. Do not named-import 'ts'.","wrong":"import { ts } from 'eslint-config-codely';","symbol":"eslintConfigCodely.ts","correct":"import eslintConfigCodely from 'eslint-config-codely';\nexport default [...eslintConfigCodely.ts, { /* your config */ }];"},{"note":"Full preset includes JS, TS, and extra opinionated rules. Same import pattern.","wrong":"import { full } from 'eslint-config-codely';","symbol":"eslintConfigCodely.full","correct":"import eslintConfigCodely from 'eslint-config-codely';\nexport default [...eslintConfigCodely.full, { /* your config */ }];"},{"note":"Course preset is same as full but with narrower print width for video recording.","wrong":"import { course } from 'eslint-config-codely';","symbol":"eslintConfigCodely.course","correct":"import eslintConfigCodely from 'eslint-config-codely';\nexport default [...eslintConfigCodely.course, { /* your config */ }];"}],"quickstart":{"code":"// Install\nnpm install --save-dev eslint-config-codely\n\n// Create eslint.config.js\nimport eslintConfigCodely from 'eslint-config-codely';\n\nexport default [\n  ...eslintConfigCodely.ts,\n  // ...eslintConfigCodely.full,\n  {\n    rules: {\n      // override rules\n    }\n  }\n];\n\n// Ensure tsconfig.json has \"strict\": true for some rules\n// Run: npx eslint .","lang":"javascript","description":"Shows installation and basic usage with the TypeScript preset in flat config format."},"warnings":[{"fix":"Use eslint.config.js with the flat config format as shown in the quickstart.","message":"Requires ESLint flat config (>=9.0.0). Legacy .eslintrc formats are not supported.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Use import or set \"type\": \"module\" in package.json; if using CommonJS, use dynamic import: const eslintConfigCodely = await import('eslint-config-codely');","message":"Package is ESM-only. Import using 'import' syntax or dynamic import(); require() fails.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Stay updated with releases; override deprecated rules as needed.","message":"Some rules from @typescript-eslint/recommended-requiring-type-checking may be deprecated in future. Check changelog for rule removals.","severity":"deprecated","affected_versions":">=4.0.0"},{"fix":"Set \"strict\": true in tsconfig.json.","message":"TypeScript strict mode must be enabled in tsconfig.json for some rules to work correctly.","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Override codely/folder-naming-convention rule in your config if needed.","message":"Folder naming conventions (plugin codely) may conflict with existing project structure.","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Use import type { ... } from 'module' to prevent false positives.","message":"The 'unused-imports' plugin auto-fixes can remove imports used only for types; ensure type imports are explicit (import type).","severity":"gotcha","affected_versions":">=4.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Replace require() with import or use dynamic import().","cause":"Using require() to import the ESM-only package.","error":"ReferenceError: require is not defined in ES module scope"},{"fix":"Ensure package is installed: npm install --save-dev eslint-config-codely, and use eslint.config.js flat config.","cause":"Package not installed or used with legacy .eslintrc format.","error":"Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'eslint-config-codely'"},{"fix":"Rename file to eslint.config.js and use the flat config format with export default.","cause":"Using export syntax in .eslintrc file instead of flat config.","error":"ESLint configuration is invalid: 'export default' is not a valid configuration for legacy format"},{"fix":"Ensure tsconfig.json has strict: true and parserOptions.project points to tsconfig.json.","cause":"Missing or incorrect tsconfig.json path; strict mode not set.","error":"Parsing error: 'parserOptions.project' has been set for @typescript-eslint/parser."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}