danielstjules / jsinspect

Detect copy-pasted and structurally similar code
MIT License
3.56k stars 128 forks source link

[feature request] support suffix other than .js or .jsx #84

Open JillShu opened 5 years ago

JillShu commented 5 years ago

Hi Thanks for creating this brilliant tool. Our project is trying to use this tool, however we want to apply it to a script language defined by our own. It's syntax is a subset of JavaScript so the tool works well on the texts. The only problem is that we are using a suffix defined by ourself. Is it possible to let JsInspect accept an argument to include certain type of files? Thanks

jaydenseric commented 4 years ago

.mjs is the file extension for native ESM, which is supported in Node.js v13.2+. Even adding it to the hardcoded list of extensions prior to making the list configurable would be great.

ray-holland-es commented 2 years ago

you can do jsinspect some_path/**/*.random_file_extension