Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Support autofix at the very start of blocks #119

Merged
merged 1 commit into from
Oct 8, 2019

Conversation

lydell
Copy link
Contributor

@lydell lydell commented Sep 7, 2019

Previously, if a rule added an autofix at index 0 of a code block, all
code from the start of the markdown file until the start of that code
block would be removed. Now, the autofix is applied as expected.

Fixes lydell/eslint-plugin-simple-import-sort#22

Previously, if a rule added an autofix at index 0 of a code block, all
code from the start of the markdown file until the start of that code
block would be removed. Now, the autofix is applied as expected.

Fixes lydell/eslint-plugin-simple-import-sort#22
@lydell lydell force-pushed the fix-autofix-at-very-start-of-block branch from 407d6d0 to 28f7f42 Compare September 7, 2019 07:39
@lydell
Copy link
Contributor Author

lydell commented Sep 7, 2019

The build seems to have failed on Node.js 9 for reasons not related to this PR:

$ node --version
v9.11.2
$ npm --version
5.6.0
$ nvm --version
0.34.0
install.npm
2.26s$ npm install 
0.62s$ npm test
> [email protected] test /home/travis/build/eslint/eslint-plugin-markdown
> npm run lint && npm run test-cov
> [email protected] lint /home/travis/build/eslint/eslint-plugin-markdown
> eslint Makefile.js lib/**/*.js tests/lib/plugin.js
internal/modules/cjs/loader.js:550
    throw err;
    ^
Error: Cannot find module 'readable-stream'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
    at Function.Module._load (internal/modules/cjs/loader.js:475:25)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)
    at Object.<anonymous> (/home/travis/build/eslint/eslint-plugin-markdown/node_modules/concat-stream/index.js:1:78)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)

@lydell
Copy link
Contributor Author

lydell commented Oct 5, 2019

Anyone wants to review this bugfix?

Copy link
Member

@btmills btmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for fixing this @lydell! I just verified that this will also fix #117. I restarted the Node.js v9 build on Travis. Once that passes, I'll get this merged.

@btmills btmills merged commit dc90961 into eslint:master Oct 8, 2019
@lydell lydell deleted the fix-autofix-at-very-start-of-block branch October 8, 2019 05:30
@lydell
Copy link
Contributor Author

lydell commented Oct 8, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Breaks with eslint-plugin-markdown
2 participants