You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 24, 2020. It is now read-only.
This fails on Windows (tested on Win10) with the same error in various JS files when using 'npm run test':
C:...\react-mindmap\src\utils\subnodesToHTML.js
1:50 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
2:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
3:3 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
The testing examples describes running:
git clone https://github.com/learn-anything/react-mindmap
cd react-mindmap
npm install && npm run test
This fails on Windows (tested on Win10) with the same error in various JS files when using 'npm run test':
C:...\react-mindmap\src\utils\subnodesToHTML.js
1:50 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
2:1 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
3:3 error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style
Solutions discussed in Stackoverflow:
https://stackoverflow.com/questions/39114446/how-can-i-write-a-eslint-rule-for-linebreak-style-changing-depending-on-windo/
Personally, I resolved by changing .eslintrc.js to:
rules: {
'react/jsx-uses-vars': 'error',
'react/jsx-uses-react': 'error',
"linebreak-style": 0
},
This just ignores line endings which I assume would be appriopriate for all OSs?
The text was updated successfully, but these errors were encountered: