Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upHow to defined multiple file extensions #442
Comments
This comment has been minimized.
This comment has been minimized.
|
Ok found the solution. The above command syntax works for running in command line but when running as an npm task, you should declare each file extension separately such as: Inside package.json otherwise it won't work. Is that something we want to document ? If yes I can create a PR. |
dcousens
added
the
question
label
Mar 2, 2016
This comment has been minimized.
This comment has been minimized.
|
Have you tried edit: |
This comment has been minimized.
This comment has been minimized.
|
Actually the bash expansion syntax is {js,jsx,es6} -- try that! On Wednesday, March 2, 2016, Linus Unnebäck notifications@github.com
|
This comment has been minimized.
This comment has been minimized.
|
So actually the solution I though was working is not. If I run "npm run lint", only js and jsx files are expected but es6 are ignored. As you suggested I have tried to configure the lint task as
but still getting the error below. Any ideas ? `➜ app git:(apply-standardjs) ✗ npm run lint
sh: jsx: command not found npm ERR! Darwin 14.5.0 npm ERR! Please include the following file with any support request: |
This comment has been minimized.
This comment has been minimized.
|
@alanrubin use comma instead of pipe, my fault... |
This comment has been minimized.
This comment has been minimized.
|
Works ! It should be I realise that this could be a off topic question but I'm very grateful if you could help, could not find any reference to this anywhere. |
This comment has been minimized.
This comment has been minimized.
|
@alanrubin Try wrapping another set of quotes around the file path:
Otherwise I think bash does expansion for you, but you want to actually pass through the |
alanrubin commentedMar 2, 2016
First thanks for the great package.
Not sure this a newbie question but I'm trying to run standard for different file extensions (js, jsx and es6). I know js and jsx comes configured by default but how do I configure it to run for all those 3 extensions ?
I have tried to run the below command but get an error.
$: standard webpack/**/*(.js|.jsx|.es6)Thanks !