{"id":24944,"library":"awesome-lint","title":"awesome-lint","description":"Linter for Awesome lists. Version 2.3.0, requires Node.js >=20. Actively maintained by Sindre Sorhus. Combines general Markdown rules with Awesome-specific rules (badge, ToC, list item format, etc.). Can lint local files or remote URLs via CLI. Integrates with GitHub Actions and pre-commit. Based on remark-lint. Different from generic linters by enforcing the Awesome list conventions, including spell-checking technology terms and community guidelines.","status":"active","version":"2.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/sindresorhus/awesome-lint","tags":["javascript","awesome","lint","linter","markdown","md","remark","remark-lint","cli-app"],"install":[{"cmd":"npm install awesome-lint","lang":"bash","label":"npm"},{"cmd":"yarn add awesome-lint","lang":"bash","label":"yarn"},{"cmd":"pnpm add awesome-lint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Underlying lint engine for Markdown rules","package":"remark-lint","optional":false},{"reason":"Markdown processor used by awesome-lint","package":"remark","optional":false}],"imports":[{"note":"ESM-only since v2.0.0, require() will fail.","wrong":"const awesomeLint = require('awesome-lint')","symbol":"awesomeLint","correct":"import awesomeLint from 'awesome-lint'"},{"note":"Named export since v2.0.0.","wrong":"import report from 'awesome-lint/report'","symbol":"report","correct":"import { report } from 'awesome-lint'"},{"note":"Named export, not default.","wrong":"import { lint } from 'awesome-lint/lint'","symbol":"lint","correct":"import { lint } from 'awesome-lint'"}],"quickstart":{"code":"import awesomeLint from 'awesome-lint';\n\n// Lint the readme of the current directory\nconst result = await awesomeLint.lint({ cwd: '.' });\nconsole.log(result.messages);\n\n// Or use the report method to get formatted output\nawait awesomeLint.report();\n\n// Lint a remote repository\nawait awesomeLint.report({ url: 'https://github.com/sindresorhus/awesome-something' });","lang":"typescript","description":"Demonstrates importing awesome-lint, linting a local directory, using the report method, and linting a remote URL."},"warnings":[{"fix":"Update Node.js to v20 or later. Use nvm or download from nodejs.org.","message":"Requires Node.js >=20 since v2.0.0","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use import instead of require(). For scripts, add type: module to package.json or rename file to .mjs.","message":"ESM-only since v2.0.0: no CommonJS support","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"No action required, but be aware that they don't fail the lint step by default. Use --error-level to change.","message":"Spell-check violations are warnings, not errors (since v2.3.0)","severity":"gotcha","affected_versions":">=2.3.0"},{"fix":"Use FORCE_COLOR=0 environment variable or other color control.","message":"The CLI option --no-color is removed in v2.0.0","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Clone with full history (git clone --depth=0 or set fetch-depth: 0 in GitHub Actions).","message":"When linting a repository, the local .git folder must be available for git-repo-age rules","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use import awesomeLint from 'awesome-lint' instead of require('awesome-lint').","cause":"awesome-lint v2+ is ESM-only, but you are using require() instead of import.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module"},{"fix":"Use import awesomeLint from 'awesome-lint' then call awesomeLint.lint().","cause":"Importing from 'awesome-lint' yields default export, not an object.","error":"TypeError: (0 , awesomeLint.lint) is not a function"},{"fix":"Run npm install remark to install the peer dependency.","cause":"Missing peer dependency remark when installing awesome-lint.","error":"Error: Cannot find module 'remark'"},{"fix":"Initialize a git repo (git init) or use a remote URL.","cause":"Linting a local directory that is not a git repo.","error":"Error: Git repository not found or not a git repository"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}