-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REQ] add /* eslint-disable */ to JS/TypeScript files #3814
Comments
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
I don’t think this is necessary or helpful. You are responsible for the linting you are doing, @AshSuzuki. If you feel that the linting done on the generated code is to much, just add your own |
I think it's helpful, but unnecessary. @bodograumann, As I mentioned in |
@AshSuzuki You talked about Another solution would be to put the generated api client into a separate npm package. Then it would be included in |
I would really like this to be added for the very same reason mentioned by @AshSuzuki . The files in question already have I will be more than happy to submit a PR. |
Yeah, I know there's several options to prevent from linting. (Sorry about late reply) Thanks. I didn't realized these files already has |
It looks like #4110 made this change, so now we're just waiting for the next release to include it. |
Fixed in #4110 |
For me,
I would need to write |
Do you want to file a PR to change this? |
Can I help with this? I'm new to the project but I'm happy to make a PR if someone points me in the right direction. I'm guessing I just change the same |
@mikeewheaton yes, you need to change the mustache files and run „mvn clean package“, then run bin/typescript-axios-petstore-all.sh and |
@bodograumann's comment on 802 makes a good point about how adding To me, this is really a problem with Create React App's configuration making it difficult to ignore folders. I'm going to try the solution in #2339 again. 🤞 |
@macjohnny it is only fixed for typescript-fetch and not for typescript-axios. Why only for fetch? |
@rubeonline feel free to file a PR, contributions are welcome. |
@macjohnny What do I need to change to add this for typescript-axios as well? |
Is your feature request related to a problem? Please describe.
I'm using open-api-generator with create-react-app / typescript.
I generated dead simple API by below command:
openapi-generator generate -i openapi.yml -g typescript-axios -o ./src/api-client
Then, executed
yarn start
command, It shows warning:I feel these generated codes shouldn't be lint-ed.
Describe the solution you'd like
Just add
/* eslint-disable */
to top of the generated.js/.ts
files.Additional context
Currently, Create React App(CRA) doesn't follow .eslintignore.
facebook/create-react-app#2339
CRA & eslint is one of the most popular tools to develop JS/TS frontend.
I feel this feature is reasonable.
The text was updated successfully, but these errors were encountered: