Skip to content

Commit

Permalink
Add cjs as a JavaScript file extension
Browse files Browse the repository at this point in the history
CJS is (was?) used for CommonJS modules in Node. It's not recommended now (nodejs/modules#293) but Node docs mention it (https://nodejs.org/docs/latest/api/modules.html#file-modules), so presumably some code out there uses it. Also Standard JS' pre-commit hook definition applies to such files with `files` rather than `type` (due to lack of identify support): https://github.com/standard/standard/blob/master/.pre-commit-hooks.yaml .
  • Loading branch information
adamchainz authored Feb 3, 2022
1 parent 1e14175 commit 8a2d676
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions identify/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
'cc': {'text', 'c++'},
'cfg': {'text'},
'chs': {'text', 'c2hs'},
'cjs': {'text', 'javascript'},
'clj': {'text', 'clojure'},
'cljc': {'text', 'clojure'},
'cljs': {'text', 'clojure', 'clojurescript'},
Expand Down

0 comments on commit 8a2d676

Please sign in to comment.