Before running "npm start" ensure you "npm installl typescript --save-dev".
Eslint doesn't work for me. The lint command fails with.
> eslint './src/**/*.{ts,tsx}'
Oops! Something went wrong! :(
ESLint: 5.16.0.
No files matching the pattern "'./src/**/*.{ts,tsx}'" were found.
Please check for typing mistakes in the pattern.
Both my .eslintignore and .eslintrc.json are identical copy and paste. I used "npx create-react-app eslint-integration-typescript-example"
It works fine with standard javascript and I managed to get that to work as shown in this repo github.com/gruckion/eslint-integra... EDIT < doesn't work here either
If you are having the same issue I was the cause is;
"lint":"eslint './src/**/*.{ts,tsx}'",
In order to get this to work, I had to remove the single quotes.
I am not sure why the single quote approach doesn't work for me. I read over the documentation and found it is called "glob" notation and it depends on the console your using (I am using git bash).
Placing your glob in double quotes will use nodes glob format. If you want to test it and don't want to globally install eslint use;
npx eslint './src/**/*.{ts,tsx}'
This works fine for me. with and without double or single quotes.
Before running "npm start" ensure you "npm installl typescript --save-dev".
Eslint doesn't work for me. The lint command fails with.
Both my .eslintignore and .eslintrc.json are identical copy and paste. I used "npx create-react-app eslint-integration-typescript-example"
I can see that the file does have linting suggestions in the UI. But "npm run lint" doesn't work
Would really appreciate some guidance. This is the third guide I've tried to follow, each time with a fresh "CRA"
It works fine with standard javascript and I managed to get that to work as shown in this repo github.com/gruckion/eslint-integra... EDIT < doesn't work here either
The currently broken repo is here, github.com/gruckion/eslint-integra....
If you are having the same issue I was the cause is;
In order to get this to work, I had to remove the single quotes.
I am not sure why the single quote approach doesn't work for me. I read over the documentation and found it is called "glob" notation and it depends on the console your using (I am using git bash).
Placing your glob in double quotes will use nodes glob format. If you want to test it and don't want to globally install eslint use;
npx eslint './src/**/*.{ts,tsx}'
This works fine for me. with and without double or single quotes.
eslint.org/docs/user-guide/command...
If anyone has any idea why I can't run the script from my package.json with single quotes I would love to know.
It's an oddity of the operating system, I bet you were working with a windows 10 machine.
I got the exact same error, this is what I did.
lint: "eslint \"./src/*/.{ts,tsx}\""
stackoverflow.com/questions/481043...
thank you. It works in Win10 Pro now.