{"id":25837,"library":"ko-lints","title":"ko-lint","description":"ko-lint provides linting tools (ESLint, Prettier) for the DTStack/ko ecosystem. Current stable version is 4.0.22. It is a wrapper that enforces consistent lint configurations across ko projects. Key differentiator: tightly integrated with ko-script build system; ships TypeScript types. Release cadence is tied to ko releases. Transitive peer dependency on ko-lint-config.","status":"active","version":"4.0.22","language":"javascript","source_language":"en","source_url":"https://github.com/DTStack/ko","tags":["javascript","ko","ko-script","eslint","prettier","lint","lint tools","typescript"],"install":[{"cmd":"npm install ko-lints","lang":"bash","label":"npm"},{"cmd":"yarn add ko-lints","lang":"bash","label":"yarn"},{"cmd":"pnpm add ko-lints","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for configuration","package":"ko-lint-config","optional":false}],"imports":[{"note":"ESM-only package; CJS require will not work.","wrong":"const lint = require('ko-lints')","symbol":"lint","correct":"import { lint } from 'ko-lints'"},{"note":"Named export, no default export.","symbol":"format","correct":"import { format } from 'ko-lints'"},{"note":"Default export is deprecated; use named exports.","wrong":"import { default } from 'ko-lints'","symbol":"default","correct":"import koLint from 'ko-lints'"}],"quickstart":{"code":"import { lint, format } from 'ko-lints';\nconst files = ['src/**/*.ts'];\nconst lintResults = lint(files);\nconsole.log('Lint issues:', lintResults);\nformat(files, { fix: true });","lang":"typescript","description":"Shows how to import and use lint and format functions."},"warnings":[{"fix":"Use ESM imports (import { lint } from 'ko-lints') or upgrade to Node >=14.","message":"ko-lints v4 is ESM-only; CJS require fails.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Use named exports.","message":"Default export deprecated since v3, removed in v4.","severity":"deprecated","affected_versions":">=4.0.0"},{"fix":"npm install ko-lint-config","message":"ko-lint-config peer dependency must be manually installed.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Change require() to import or upgrade Node.","cause":"CJS require used on ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module /path/node_modules/ko-lints/index.mjs not supported."},{"fix":"npm install ko-lint-config","cause":"Missing peer dependency ko-lint-config.","error":"Module not found: Can't resolve 'ko-lint-config'"},{"fix":"Use named exports like lint, format.","cause":"Using deprecated default import that no longer exports a function.","error":"TypeError: koLint is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}