{"id":40799,"library":"danger-plugin-code-lint","title":"danger-plugin-code-lint","description":"A Danger plugin for linting JavaScript/TypeScript and CSS/SCSS files in CI/CD pipelines. Version 1.4.0, stable but low release cadence. Integrates with ESLint and Stylelint to provide inline code review warnings on pull requests, leveraging Danger's message infrastructure. Lightweight alternative to full linting CI steps when combined with Danger.","status":"maintenance","version":"1.4.0","language":"javascript","source_language":"en","source_url":"https://github.com/the-marolie/danger-plugin-code-lint","tags":["javascript","lint","dangerjs","ci/cd","js","scss","css"],"install":[{"cmd":"npm install danger-plugin-code-lint","lang":"bash","label":"npm"},{"cmd":"yarn add danger-plugin-code-lint","lang":"bash","label":"yarn"},{"cmd":"pnpm add danger-plugin-code-lint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for Danger runtime","package":"danger","optional":false},{"reason":"peer dependency for JS/TS linting","package":"eslint","optional":true},{"reason":"peer dependency for CSS/SCSS linting","package":"stylelint","optional":true}],"imports":[{"note":"ESM-only. No default export; must import and call as function.","wrong":"const plugin = require('danger-plugin-code-lint')","symbol":"default","correct":"import plugin from 'danger-plugin-code-lint'"},{"note":"Named export for the main function.","wrong":"","symbol":"lint","correct":"import { lint } from 'danger-plugin-code-lint'"},{"note":"TypeScript only; use type import to avoid runtime errors.","wrong":"import { LintOptions } from 'danger-plugin-code-lint' (will fail at runtime if used as value)","symbol":"LintOptions","correct":"import type { LintOptions } from 'danger-plugin-code-lint'"}],"quickstart":{"code":"import { danger, fail } from 'danger'\nimport lint from 'danger-plugin-code-lint'\n\nexport default async () => {\n  await lint({\n    eslint: {\n      extensions: ['js', 'jsx', 'ts', 'tsx'],\n      configFile: '.eslintrc.json',\n    },\n    stylelint: {\n      extensions: ['css', 'scss'],\n      configFile: '.stylelintrc.json',\n    },\n  })\n}","lang":"typescript","description":"Shows how to import and configure the plugin with ESLint and Stylelint options in a Dangerfile."},"warnings":[{"fix":"Upgrade Danger to >=7.0.0","message":"Requires Danger version 7+","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Install eslint and/or stylelint in your project","message":"ESLint and Stylelint must be installed separately as peer dependencies","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use import lint from 'danger-plugin-code-lint' then call lint(options)","message":"Default import is not a function directly; it returns an object with a lint method","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.4.0':19 'altern':45 'cadenc':24 'ci':49 'ci/cd':16,58 'code':4,33 'combin':52 'css':61 'css/scss':13 'danger':2,7,40,54 'danger-plugin-code-lint':1 'dangerj':57 'eslint':27 'file':14 'full':47 'infrastructur':43 'inlin':32 'integr':25 'javascript':55 'javascript/typescript':11 'js':59 'leverag':39 'lightweight':44 'lint':5,10,48,56 'low':22 'messag':42 'pipelin':17 'plugin':3,8 'provid':31 'pull':37 'releas':23 'request':38 'review':34 'scss':60 'stabl':20 'step':50 'stylelint':29 'version':18 'warn':35","created_at":"2026-06-04T18:49:19.100528+00:00","updated_at":"2026-06-04T18:49:19.100528+00:00","problems":[{"fix":"Run npm install --save-dev eslint","cause":"ESLint not installed as a peer dependency","error":"Error: Cannot find module 'eslint'"},{"fix":"Use import lint from 'danger-plugin-code-lint' and invoke lint(options)","cause":"Incorrect import pattern; default export is an object","error":"TypeError: lint is not a function"},{"fix":"Run npm install --save-dev danger-plugin-code-lint","cause":"Package not installed in node_modules","error":"danger.js: Plugin 'danger-plugin-code-lint' not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/the-marolie/danger-plugin-code-lint#readme","github":"https://github.com/the-marolie/danger-plugin-code-lint","docs":null,"changelog":null,"pypi":null,"npm":"danger-plugin-code-lint","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}