{"id":26877,"library":"danger-plugin-eslint","title":"danger-plugin-eslint","description":"A Danger plugin to run ESLint on changed files in PRs. Current stable version is 1.0.0, released in December 2017. This plugin automatically runs ESLint on modified files using the project's ESLint config and reports linting errors as Danger messages. It integrates with Danger's PR workflow to enforce code quality. The plugin is ESM-only and requires Danger JS. It is a niche tool for teams using Danger and ESLint in CI. Differentiators: simple setup, zero-config use of project's own ESLint config. Note: no longer actively maintained; last release was 2017.","status":"maintenance","version":"0.1.1","language":"javascript","source_language":"en","source_url":"https://github.com/danpalmer/danger-plugin-eslint","tags":["javascript","danger","danger-plugin","eslint","typescript"],"install":[{"cmd":"npm install danger-plugin-eslint","lang":"bash","label":"npm"},{"cmd":"yarn add danger-plugin-eslint","lang":"bash","label":"yarn"},{"cmd":"pnpm add danger-plugin-eslint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for Danger plugin integration","package":"danger","optional":false},{"reason":"peer dependency for running ESLint analysis","package":"eslint","optional":false}],"imports":[{"note":"Package is ESM-only; CommonJS require will fail.","wrong":"const eslint = require('danger-plugin-eslint')","symbol":"default","correct":"import eslint from 'danger-plugin-eslint'"},{"note":"Default export is a function; named import does not exist.","wrong":"import { eslint } from 'danger-plugin-eslint'","symbol":"eslint","correct":"import eslint from 'danger-plugin-eslint'\neslint({ extensions: ['.js', '.ts'], configFile: '.eslintrc.json' })"},{"note":"The default export is a function, not a class. Do not use 'new'.","wrong":"new eslint()","symbol":"eslint()","correct":"import eslint from 'danger-plugin-eslint'\neslint()"}],"quickstart":{"code":"// dangerfile.js\nimport { danger, warn, fail, markdown } from 'danger'\nimport eslint from 'danger-plugin-eslint'\n\neslint({\n  extensions: ['.js', '.jsx'],\n  configFile: '.eslintrc.json',\n  basePath: process.cwd()\n})","lang":"javascript","description":"Shows minimal usage of the eslint() function with optional configuration."},"warnings":[{"fix":"Upgrade Node to >=8.0.0","message":"Node 6 support removed in v1.0.0","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Consider using danger-plugin-eslint-files or implementing custom ESLint integration.","message":"Package is no longer actively maintained; last release was 2017.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Ensure an ESLint config file exists in the project root.","message":"Function expects ESLint config file to be present; otherwise it fails silently.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Add 'type':'module' to package.json or use .mjs extension for dangerfile.","cause":"Package is ESM-only but used in CommonJS project without 'type:module' in package.json.","error":"SyntaxError: Cannot use import statement outside a module"},{"fix":"Use 'import eslint from \"danger-plugin-eslint\"' and then call eslint() directly.","cause":"Using default import as an object and then trying to call eslint as method.","error":"eslint is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}