Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Eslint Fix for prettier/prettier 'Delete ' doesn't work #1417

Open
2 of 3 tasks
aminya opened this issue Mar 14, 2021 · 1 comment
Open
2 of 3 tasks

Eslint Fix for prettier/prettier 'Delete ' doesn't work #1417

aminya opened this issue Mar 14, 2021 · 1 comment
Labels

Comments

@aminya
Copy link
Member

aminya commented Mar 14, 2021

Issue Type

Bug

Issue Description

The remaining part of this issue:
#1249

To fix this, we can throw a notification in the following code to ask the user to run line-ending-selector:convert-to-lf

fixLineEnding = true

Tested in https://github.com/steelbrain/package-deps

Seems to be similar to:
prettier/prettier-vscode#1327

Bug Checklist

  • Restart Atom
  • Verify the eslint CLI gives the proper result, while linter-eslint does not
  • Paste the output of the Linter Eslint: Debug command from the Command Palette below
@aminya aminya added the bug label Mar 14, 2021
@Megajin
Copy link

Megajin commented Jul 6, 2021

To fix the issue for the moment I've used my .prettierrc.js with the option endOfLine: 'auto',.

  • Step 1:
    Add a .prettierrc.js to the root directory of your project.

  • Step 2:
    Modify your .prettierrc.js file and add the following code:

module.exports = {
  ... // other rules,
  endOfLine: 'auto',
  ... // other rules,
};

Enjoy!

Ref: https://prettier.io/docs/en/options.html

Careful with this fix. If you need to enforce 'LF', 'CRLF' or 'CR' line endings, you need to run an automated fix on your files over the cli for the moment.

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

No branches or pull requests

2 participants