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

ESLint linebreak-style errors #221

Open
johnpduane opened this issue Oct 21, 2020 · 1 comment
Open

ESLint linebreak-style errors #221

johnpduane opened this issue Oct 21, 2020 · 1 comment

Comments

@johnpduane
Copy link

I have a team experimenting with this repo and we are using a mix of Windows and Macs for development. If the Windows users touch any files, they get a linebreak-style error during the build portion of an npm run serve, for example:

image

There are straight-forward work-arounds but I think this issue should be addressed in your default branch as I assume this could be a blocker for newer users. Here are a few options to consider:

  1. Disable the lint rule by adding 'linebreak-style': 'off', to the repo's .eslintrc.js
  2. Add a .gitattributes file in the root of the repository per this guidance from github.
  3. Add a .editorconfig to the root of the repository to set end_of_line, see airbnb/javascript/.editorconfig for an example.
  4. Add instructions to your README for how to configure popular editors to set the end of line character you expect. For instance, for VSCode configure setting: "files.eol": "\n".

If you'd like me to submit a PR using any of these suggestions, I'm happy to do so.

@harm-meijer
Copy link
Contributor

@johnpduane I'm leaning towards not using linter as a code formatter at all and remove all formatting rules from the linter (airbnb). Add prettier rules for code formatting but don't enforce them. The team working on the project can set format on save and external contributors code can be formatted on merge.

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

No branches or pull requests

2 participants