danger / General

What's the advised way to run ESLint on changes/diff only

What's the advised way to run ESLint on changes/diff only

danger/General · March 19, 2018 · 9:01pm

What's the advised way to run ESLint on changes/diff only

danger / GeneralMarch 19, 2018 · 9:01pm
I am trying to run danger-plugin-eslint on a test project but I'm getting some issues.
const {danger, warn, fail} = require('danger') const { default: eslint } = require('danger-plugin-eslint'); // No PR is too small to include a description of why you made a change if (danger.github.pr.body.length < 10) { warn('Please include a description of your PR changes.'); } eslint();
rush@rushpod: ~/codacy-test [chore/bugs] 1 » node modules/.bin/danger pr https://github.com/Rush/codacy-test/pull/1 Starting Danger PR on Rush/codacy-test#1 Error: TypeError: Cannot read property 'messages' of undefined at /home/rush/codacy-test/nodemodules/danger-plugin-eslint/dist/index.js:27:27 at Generator.next (<anonymous>) at fulfilled (/home/rush/codacy-test/nodemodules/danger-plugin-eslint/dist/index.js:4:58) at <anonymous> at process.tickCallback (internal/process/next_tick.js:188:7) ## Failures index.js line 3 – 'fs' is not defined. (no-undef) - index.js line 3 – Expected error to be handled. (handle-callback-err) - index.js line 4 – Expected indentation of 4 spaces but found 2. (indent) - index.js line 5 – Missing semicolon. (semi) - Fatal error linting package.json with eslint. - Fatal error linting package-lock.json with eslint. - node` failed. ## Warnings Please include a description of your PR changes. - index.js line 1 – Unexpected console statement. (no-console) - index.js line 4 – Unexpected console statement. (no-console) ## Markdowns ### Log
Check codacy by Rush · Pull Request #1 · Rush/codacy-test
https://github.com/Rush/codacy-test/pull/1

March 19, 2018 · 9:39pm

I'd recommend raising this on the eslint plugin repo 👍🏾

  • reply
  • like

Are there any others ways to use ESLint with Danger? That plugin seems not being maintained all that much.

  • reply
  • like

March 20, 2018 · 8:32am

I need a proper ESLint plugin!

  • reply
  • like

I've been thinking about doing something like the Jest plugin, where you let users output a JSON of the results and then feed a formatted version of those JSON results to the comment

  • reply
  • like

Makes sense

  • reply
  • like
Your message here...

*bold*_italic_`code````codeblock```