Node.js project naming conventions for files & folders

后端 未结 7 1665
清酒与你
清酒与你 2020-12-04 04:41

What are the naming conventions for files and folders in a large Node.js project?

Should I capitalize, camelCase, or under-score?

Ie. is this considered vali

7条回答
  •  不知归路
    2020-12-04 05:21

    Node.js doesn't enforce any file naming conventions (except index.js). And the Javascript language in general doesn't either. You can find dozens of threads here which suggest camelCase, hyphens and underscores, any of which work perfectly well. So its up to you. Choose one and stick with it.

提交回复
热议问题