Coder Social home page Coder Social logo

ESLint CRLF Windows about keen-ui HOT 6 CLOSED

Lewiscowles1986 avatar Lewiscowles1986 commented on June 10, 2024
ESLint CRLF Windows

from keen-ui.

Comments (6)

JosephusPaye avatar JosephusPaye commented on June 10, 2024 1

Thanks for the PR update.

We've got LF specified in the current .editorconfig already.

from keen-ui.

JosephusPaye avatar JosephusPaye commented on June 10, 2024

I'm on Windows too, and use the following to ensure only LF is committed:

git config --global core.autocrlf input

So I can checkout and edit in CRLF but all commits are in LF. Though I've setup all my editors to use LF across the board.

from keen-ui.

Lewiscowles1986 avatar Lewiscowles1986 commented on June 10, 2024

While I understand we can ask Git users to change how git works out of the box, I think you'll always have some people unprepared. That would also take any accidental editor differences between projects and enforce them globally. For me it's not a workable solution.

from keen-ui.

JosephusPaye avatar JosephusPaye commented on June 10, 2024

I think it's possible to do this via a .gitattributes file that enforces it for the repo, without the need for a global config change.

from keen-ui.

Lewiscowles1986 avatar Lewiscowles1986 commented on June 10, 2024

Thanks @JosephusPaye

I've added a .gitattributes file to the repo as part of the PR for this. I still believe the eslint changes are reasonable because the autocrlf behavior is only when checking out and committing.

Perhaps as a follow-up .editorconfig should also be added in a separate PR to ensure not only line-feeds, but other formatting for the project is enforced by supporting IDE's?

from keen-ui.

Lewiscowles1986 avatar Lewiscowles1986 commented on June 10, 2024

Thanks for update. 9dd56b4 looks to me that .gitattributes without .eslintrc edits saves the day.

from keen-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.