Skip to content

1.13.x breaks eslint-plugin-html/eslint-plugin-prettier #4759

@nappy

Description

@nappy

Upgrading prettier from ~1.12.1 to ^1.13.6 causes eslint-plugin-html to break.
I add this issue here, because I think this violates semver.

Environments:

  • Prettier Version: 1.13.6
  • Running Prettier via: eslint-plugin-prettier
  • Runtime: Node v10.5.0 Yarn 1.7.0 Npm 6.1.0
  • Operating System: Windows
    eslint@^5.0.1
    eslint-plugin-html@^4.0.5
    eslint-plugin-prettier@^2.6.1
    prettier@^1.13.6

Steps to reproduce:
Add plugins html and prettier to .eslintrc
Add an html file to your project
Run eslint **/*.{js,html}

Expected behavior: (1.12.1)
yarn run v1.7.0
$ eslint **/*.{js,html}
Done in 5.89s.

Actual behavior: (1.13.6)
yarn run v1.7.0
$ eslint **/*.{js,html}
No parser could be inferred for file: C:\Code\eslint-html\assets\index.html
Error: No parser could be inferred for file: C:\Code\eslint-html\assets\index.html
at normalize (C:\Code\eslint-html\node_modules\prettier\index.js:7058:15)
at formatWithCursor (C:\Code\eslint-html\node_modules\prettier\index.js:10378:12)
at C:\Code\eslint-html\node_modules\prettier\index.js:31217:15
at Object.format (C:\Code\eslint-html\node_modules\prettier\index.js:31236:12)
at Program (C:\Code\eslint-html\node_modules\eslint-plugin-prettier\eslint-plugin-prettier.js:412:45)
at listeners.(anonymous function).forEach.listener (C:\Code\eslint-html\node_modules\eslint\lib\util\safe-emitter.js:45:58)
at Array.forEach ()
at Object.emit (C:\Code\eslint-html\node_modules\eslint\lib\util\safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (C:\Code\eslint-html\node_modules\eslint\lib\util\node-event-generator.js:251:26)
at NodeEventGenerator.applySelectors (C:\Code\eslint-html\node_modules\eslint\lib\util\node-event-generator.js:280:22)
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.scope:externalThis is not an issue with Prettier, it’s an issue with external software, like an editor integration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions