single VS double quotation 사용 비율 in javascript

Tags:

기존에 javascript quotation은 sigle을 쓰는 것이 일반적이라고 생각했다.

그러나 eslint를 적용하면서 기본값을 double로 사용하는 것을 보고 찾아봤다.

대부분의 javascript 프로젝트들은 single을 많이 사용한다.

프로젝트 single 비율
lodash 99% of quotes
chalk 100% of quotes
react 90% of quotes
request 97% of quotes
commander.js 97% of quotes
moment 90% of quotes
express 92% of quotes
tslib 100% of quotes
debug 97% of quotes

prettier 는 기본적으로 "double"를 선호
gjslint (Google Closure Linter) 는 'single' 를 선호
standard (NPM 패키지) 'single' 선호
jslint 는 기본적으로 "double"를 선호 eslint 는 기본적으로 "double"를 선호
TypeScript Contributors Coding Guidelines"double" 를 선호

참고 https://bytearcher.com/articles/single-or-double-quotes-strings-javascript/