loopbackio / loopback-next

LoopBack makes it easy to build modern API applications that require complex integrations.
https://loopback.io
Other
4.88k stars 1.06k forks source link

Eslint naming convention issue since last upgrade #8383

Closed emulienfou closed 2 years ago

emulienfou commented 2 years ago

Describe the bug

Since full upgrade of all packages yarn upgrade it seems there is an issue with ESLint default Loopback configuration package @loopback/eslint-config.

For the next code auto-generated from lb4 controller command:

@response(200, {
    description: 'Artist model instance',
    content: { 'application/json': { schema: getModelSchemaRef(Artist) } }
  })

I now saw the next ESLint error: ESLint: Object Literal Property nameapplication/jsonmust match one of the following formats: camelCase, UPPER_CASE, PascalCase(@typescript-eslint/naming-convention)

This issue is related to this part of ESLint configuration:

{
        "selector": "property",
        "format": [
          "camelCase",
          "UPPER_CASE",
          "PascalCase"
        ],
        "leadingUnderscore": "allow"
      },

Defining "format": null is fixing the current issue, but I'm pretty sure we do not want to disable the format configuration here!

Logs

Click to expand! ```shell success Saved 574 new dependencies. info Direct dependencies ├─ @aws-sdk/client-s3@3.53.1 ├─ @loopback/authentication-jwt@0.11.1 ├─ @loopback/authentication-passport@4.1.1 ├─ @loopback/authentication@8.1.1 ├─ @loopback/boot@4.1.1 ├─ @loopback/build@8.1.1 ├─ @loopback/core@3.1.1 ├─ @loopback/rest-explorer@4.1.1 ├─ @loopback/rest@11.1.1 ├─ @loopback/testlab@4.1.1 ├─ @tbogard/itunes-search@1.3.5 ├─ @types/passport-facebook@2.1.11 ├─ @types/passport-google-oauth2@0.1.4 ├─ @types/passport-http@0.3.9 ├─ @types/passport-oauth2@1.4.11 ├─ @types/passport-spotify@2.0.1 ├─ @types/random-useragent@0.3.1 ├─ @types/spotify-web-api-node@5.0.7 ├─ discojs@2.0.0 ├─ dotenv@16.0.0 ├─ express-session@1.17.2 ├─ graphql-request@4.0.0 ├─ graphql@16.3.0 ├─ install@0.13.0 ├─ lastfm-typed@2.0.1 ├─ loopback-connector-postgresql@5.5.0 ├─ loopback-connector-rest@4.0.1 ├─ loopback4-command@0.1.0 ├─ loopback4-seeder@0.2.0 ├─ loopback4-slug@0.1.0 ├─ musicbrainz-api@0.7.2 ├─ node-fetch@2.6.1 ├─ passport-facebook@3.0.0 ├─ passport-google-oauth2@0.2.0 ├─ passport-http@0.3.0 ├─ passport-spotify@2.0.0 ├─ podcastdx-client@5.0.0 ├─ podparse@1.5.0 ├─ random-useragent@0.5.0 ├─ setlistfm-js@1.2.0 ├─ songkick-api-node@1.0.4 ├─ soundcloud.ts@0.4.5 ├─ spotify-web-api-node@5.0.2 ├─ tsc-watch@4.6.0 └─ wordpress-api-client@0.4.6 info All dependencies ├─ @ampproject/remapping@2.1.2 ├─ @aws-crypto/crc32c@2.0.0 ├─ @aws-crypto/sha1-browser@2.0.0 ├─ @aws-sdk/chunked-blob-reader-native@3.52.0 ├─ @aws-sdk/chunked-blob-reader@3.52.0 ├─ @aws-sdk/client-s3@3.53.1 ├─ @aws-sdk/client-sso@3.53.0 ├─ @aws-sdk/client-sts@3.53.0 ├─ @aws-sdk/credential-provider-ini@3.53.0 ├─ @aws-sdk/credential-provider-process@3.53.0 ├─ @aws-sdk/eventstream-serde-browser@3.53.0 ├─ @aws-sdk/eventstream-serde-config-resolver@3.53.0 ├─ @aws-sdk/eventstream-serde-node@3.53.0 ├─ @aws-sdk/hash-blob-browser@3.53.0 ├─ @aws-sdk/hash-stream-node@3.53.1 ├─ @aws-sdk/md5-js@3.53.0 ├─ @aws-sdk/middleware-bucket-endpoint@3.53.0 ├─ @aws-sdk/middleware-expect-continue@3.53.0 ├─ @aws-sdk/middleware-flexible-checksums@3.53.0 ├─ @aws-sdk/middleware-header-default@3.53.0 ├─ @aws-sdk/middleware-location-constraint@3.53.0 ├─ @aws-sdk/middleware-sdk-s3@3.53.0 ├─ @aws-sdk/middleware-sdk-sts@3.53.0 ├─ @aws-sdk/middleware-ssec@3.53.0 ├─ @aws-sdk/querystring-parser@3.53.0 ├─ @aws-sdk/service-error-classification@3.53.0 ├─ @aws-sdk/util-stream-browser@3.53.0 ├─ @aws-sdk/util-stream-node@3.53.0 ├─ @aws-sdk/util-waiter@3.53.0 ├─ @aws-sdk/xml-builder@3.52.0 ├─ @babel/compat-data@7.17.0 ├─ @babel/core@7.17.5 ├─ @babel/helper-compilation-targets@7.16.7 ├─ @babel/helper-function-name@7.16.7 ├─ @babel/helper-get-function-arity@7.16.7 ├─ @babel/helper-hoist-variables@7.16.7 ├─ @babel/helper-module-imports@7.16.7 ├─ @babel/helper-module-transforms@7.17.6 ├─ @babel/helper-simple-access@7.16.7 ├─ @babel/helper-validator-option@7.16.7 ├─ @babel/helpers@7.17.2 ├─ @babel/highlight@7.16.10 ├─ @babel/traverse@7.17.3 ├─ @eslint/eslintrc@1.2.0 ├─ @exodus/schemasafe@1.0.0-rc.6 ├─ @hapi/shot@5.0.5 ├─ @hapi/topo@5.1.0 ├─ @hapi/validate@1.1.3 ├─ @humanwhocodes/config-array@0.9.5 ├─ @humanwhocodes/object-schema@1.2.1 ├─ @istanbuljs/load-nyc-config@1.1.0 ├─ @jridgewell/resolve-uri@3.0.5 ├─ @jridgewell/sourcemap-codec@1.4.11 ├─ @jridgewell/trace-mapping@0.3.4 ├─ @loopback/authentication-jwt@0.11.1 ├─ @loopback/authentication-passport@4.1.1 ├─ @loopback/authentication@8.1.1 ├─ @loopback/boot@4.1.1 ├─ @loopback/build@8.1.1 ├─ @loopback/context@4.1.1 ├─ @loopback/core@3.1.1 ├─ @loopback/express@4.1.1 ├─ @loopback/filter@2.1.1 ├─ @loopback/metadata@4.1.1 ├─ @loopback/model-api-builder@3.1.1 ├─ @loopback/openapi-v3@7.1.1 ├─ @loopback/repository-json-schema@5.1.1 ├─ @loopback/rest-explorer@4.1.1 ├─ @loopback/rest@11.1.1 ├─ @loopback/testlab@4.1.1 ├─ @nodelib/fs.scandir@2.1.5 ├─ @nodelib/fs.stat@2.0.5 ├─ @nodelib/fs.walk@1.2.8 ├─ @openapi-contrib/openapi-schema-to-json-schema@3.1.1 ├─ @rgrove/parse-xml@3.0.0 ├─ @sindresorhus/is@4.6.0 ├─ @sinonjs/fake-timers@7.1.2 ├─ @sinonjs/samsam@6.1.1 ├─ @sinonjs/text-encoding@0.7.1 ├─ @szmarczak/http-timer@4.0.6 ├─ @tbogard/itunes-search@1.3.5 ├─ @tool-belt/type-predicates@1.2.0 ├─ @types/bcryptjs@2.4.2 ├─ @types/cacheable-request@6.0.2 ├─ @types/caseless@0.12.2 ├─ @types/connect@3.4.35 ├─ @types/cookiejar@2.1.2 ├─ @types/cors@2.8.12 ├─ @types/fs-extra@9.0.13 ├─ @types/glob@7.2.0 ├─ @types/http-cache-semantics@4.0.1 ├─ @types/inquirer@8.2.0 ├─ @types/keyv@3.1.3 ├─ @types/lodash@4.14.179 ├─ @types/mime@1.3.2 ├─ @types/minimatch@3.0.5 ├─ @types/mocha@9.1.0 ├─ @types/ms@0.7.31 ├─ @types/oauth@0.9.1 ├─ @types/on-finished@2.3.1 ├─ @types/passport-facebook@2.1.11 ├─ @types/passport-google-oauth2@0.1.4 ├─ @types/passport-http@0.3.9 ├─ @types/passport-oauth2@1.4.11 ├─ @types/passport-spotify@2.0.1 ├─ @types/random-useragent@0.3.1 ├─ @types/range-parser@1.2.4 ├─ @types/request-promise-native@1.0.18 ├─ @types/request@2.48.8 ├─ @types/responselike@1.0.0 ├─ @types/serve-static@1.13.10 ├─ @types/shot@4.0.1 ├─ @types/sinon@10.0.11 ├─ @types/sinonjs__fake-timers@8.1.1 ├─ @types/spotify-api@0.0.14 ├─ @types/spotify-web-api-node@5.0.7 ├─ @types/superagent@4.1.15 ├─ @types/supertest@2.0.11 ├─ @types/through@0.0.30 ├─ @types/tough-cookie@4.0.1 ├─ @types/type-is@1.6.3 ├─ @types/uuid@8.3.4 ├─ @typescript-eslint/eslint-plugin@5.14.0 ├─ @typescript-eslint/parser@5.14.0 ├─ @typescript-eslint/type-utils@5.14.0 ├─ @ungap/promise-all-settled@1.1.2 ├─ accept-language@3.0.18 ├─ accepts@1.3.8 ├─ acorn-jsx@5.3.2 ├─ acorn@8.7.0 ├─ agent-base@6.0.2 ├─ aggregate-error@3.1.0 ├─ ajv-errors@3.0.0 ├─ ajv-formats@2.1.1 ├─ ajv-keywords@5.1.0 ├─ ajv@8.10.0 ├─ ansi-colors@4.1.1 ├─ ansi-escapes@4.3.2 ├─ ansi-regex@5.0.1 ├─ anymatch@3.1.2 ├─ append-transform@2.0.0 ├─ archy@1.0.0 ├─ arg@4.1.3 ├─ array-flatten@1.1.1 ├─ array-union@2.1.0 ├─ asap@2.0.6 ├─ asn1@0.2.6 ├─ axios@0.21.4 ├─ balanced-match@1.0.2 ├─ base64-js@1.5.1 ├─ base64url@3.0.1 ├─ bcp47@1.1.2 ├─ bcrypt-pbkdf@1.0.2 ├─ bcryptjs@2.4.3 ├─ binary-extensions@2.2.0 ├─ bl@2.2.1 ├─ bluebird@3.7.2 ├─ bottleneck@2.19.5 ├─ braces@3.0.2 ├─ browser-stdout@1.3.1 ├─ browserslist@4.20.0 ├─ buffer-equal-constant-time@1.0.1 ├─ buffer-from@1.1.2 ├─ buffer-writer@2.0.0 ├─ buffer@5.7.1 ├─ cacheable-lookup@5.0.4 ├─ cacheable-request@7.0.2 ├─ caching-transform@4.0.0 ├─ call-me-maybe@1.0.1 ├─ callsites@3.1.0 ├─ camel-case@4.1.2 ├─ camelcase@5.3.1 ├─ caniuse-lite@1.0.30001314 ├─ change-case@4.1.2 ├─ chardet@0.7.0 ├─ charenc@0.0.2 ├─ chokidar@3.5.3 ├─ cldrjs@0.5.5 ├─ clean-stack@2.2.0 ├─ cli-spinners@2.6.1 ├─ cli-width@3.0.0 ├─ clone-response@1.0.2 ├─ clone@1.0.4 ├─ color-convert@2.0.1 ├─ color-name@1.1.4 ├─ commondir@1.0.1 ├─ concat-map@0.0.1 ├─ constant-case@3.0.4 ├─ content-disposition@0.5.4 ├─ cookie@0.4.1 ├─ cookiejar@2.1.3 ├─ core-util-is@1.0.3 ├─ cors@2.8.5 ├─ create-require@1.1.1 ├─ cross-fetch@3.1.5 ├─ crypt@0.0.2 ├─ dashdash@1.14.1 ├─ decode-uri-component@0.2.0 ├─ decompress-response@6.0.0 ├─ deep-is@0.1.4 ├─ default-require-extensions@3.0.0 ├─ defaults@1.0.3 ├─ defer-to-connect@2.0.1 ├─ delayed-stream@1.0.0 ├─ destroy@1.0.4 ├─ dezalgo@1.0.3 ├─ diff@5.0.0 ├─ dir-glob@3.0.1 ├─ discojs@2.0.0 ├─ doctrine@3.0.0 ├─ dotenv@16.0.0 ├─ ecc-jsbn@0.1.2 ├─ ecdsa-sig-formatter@1.0.11 ├─ ejs@3.1.6 ├─ electron-to-chromium@1.4.77 ├─ emoji-regex@8.0.0 ├─ encoding@0.1.13 ├─ end-of-stream@1.4.4 ├─ es-abstract@1.19.1 ├─ es-to-primitive@1.2.1 ├─ es6-error@4.1.1 ├─ eslint-config-prettier@8.5.0 ├─ eslint-plugin-eslint-plugin@4.1.0 ├─ eslint-plugin-mocha@10.0.3 ├─ eslint-scope@7.1.1 ├─ eslint-visitor-keys@3.3.0 ├─ esprima@4.0.1 ├─ esquery@1.4.0 ├─ event-stream@3.3.4 ├─ execa@4.1.0 ├─ express-session@1.17.2 ├─ external-editor@3.1.0 ├─ extract-files@9.0.0 ├─ extsprintf@1.3.0 ├─ fast-glob@3.2.11 ├─ fast-json-stable-stringify@2.1.0 ├─ fast-levenshtein@2.0.6 ├─ fastq@1.13.0 ├─ figures@3.2.0 ├─ file-entry-cache@6.0.1 ├─ filelist@1.0.2 ├─ fill-range@7.0.1 ├─ finalhandler@1.1.2 ├─ find-cache-dir@3.3.2 ├─ find-up@4.1.0 ├─ flat-cache@3.0.4 ├─ flat@5.0.2 ├─ flatted@3.2.5 ├─ follow-redirects@1.14.9 ├─ formidable@1.2.6 ├─ forwarded@0.2.0 ├─ from@0.1.7 ├─ fromentries@1.3.2 ├─ fs.realpath@1.0.0 ├─ gensync@1.0.0-beta.2 ├─ get-stream@5.2.0 ├─ get-symbol-description@1.0.0 ├─ getpass@0.1.7 ├─ glob-parent@5.1.2 ├─ glob@7.2.0 ├─ globalize@1.7.0 ├─ globals@13.12.1 ├─ globby@11.1.0 ├─ got@11.8.3 ├─ graceful-fs@4.2.9 ├─ graphql-request@4.0.0 ├─ graphql@16.3.0 ├─ growl@1.10.5 ├─ har-schema@2.0.0 ├─ har-validator@5.1.5 ├─ he@1.2.0 ├─ header-case@2.0.4 ├─ hexoid@1.0.0 ├─ html-escaper@2.0.2 ├─ http-cache-semantics@4.1.0 ├─ http-status-codes@2.2.0 ├─ http-status@1.5.0 ├─ http2-client@1.3.5 ├─ http2-wrapper@1.0.3 ├─ https-proxy-agent@5.0.0 ├─ human-signals@1.1.1 ├─ hyperid@3.0.1 ├─ iconv-lite@0.4.24 ├─ ieee754@1.2.1 ├─ import-fresh@3.3.0 ├─ indent-string@4.0.0 ├─ inflection@1.13.2 ├─ inflight@1.0.6 ├─ inquirer@8.2.0 ├─ install@0.13.0 ├─ internal-slot@1.0.3 ├─ invert-kv@3.0.1 ├─ ipaddr.js@1.9.1 ├─ is-bigint@1.0.4 ├─ is-binary-path@2.1.0 ├─ is-boolean-object@1.1.2 ├─ is-buffer@1.1.6 ├─ is-callable@1.2.4 ├─ is-date-object@1.0.5 ├─ is-extglob@2.1.1 ├─ is-fullwidth-code-point@3.0.0 ├─ is-interactive@1.0.0 ├─ is-negative-zero@2.0.2 ├─ is-number-object@1.0.6 ├─ is-number@7.0.0 ├─ is-plain-obj@2.1.0 ├─ is-regex@1.1.4 ├─ is-shared-array-buffer@1.0.1 ├─ is-string@1.0.7 ├─ is-symbol@1.0.4 ├─ is-typed-array@1.1.8 ├─ is-weakref@1.0.2 ├─ is-windows@1.0.2 ├─ isarray@0.0.1 ├─ isexe@2.0.0 ├─ isomorphic-fetch@2.2.1 ├─ istanbul-lib-coverage@3.2.0 ├─ istanbul-lib-hook@3.0.0 ├─ istanbul-lib-instrument@4.0.3 ├─ istanbul-lib-processinfo@2.0.2 ├─ istanbul-lib-source-maps@4.0.1 ├─ istanbul-reports@3.1.4 ├─ jake@10.8.2 ├─ js-tokens@4.0.0 ├─ js2xmlparser@4.0.2 ├─ jsesc@2.5.2 ├─ json-buffer@3.0.1 ├─ json-merge-patch@1.0.2 ├─ json-schema-compare@0.2.2 ├─ json-schema@0.4.0 ├─ json-stable-stringify-without-jsonify@1.0.1 ├─ json-stable-stringify@1.0.1 ├─ json5@2.2.0 ├─ jsonfile@6.1.0 ├─ jsonify@0.0.0 ├─ jsonpath-plus@4.0.0 ├─ jsontoxml@1.0.1 ├─ jsprim@1.4.2 ├─ just-extend@4.2.1 ├─ jwa@1.4.1 ├─ jws@3.2.2 ├─ keyv@4.1.1 ├─ lastfm-typed@2.0.1 ├─ lcid@3.1.1 ├─ locate-path@5.0.0 ├─ lodash.flattendeep@4.4.0 ├─ lodash.get@4.4.2 ├─ lodash.includes@4.3.0 ├─ lodash.isboolean@3.0.3 ├─ lodash.isinteger@4.0.4 ├─ lodash.isnumber@3.0.3 ├─ lodash.isplainobject@4.0.6 ├─ lodash.isstring@4.0.1 ├─ lodash.merge@4.6.2 ├─ lodash.once@4.1.1 ├─ log-symbols@4.1.0 ├─ loopback-connector-postgresql@5.5.0 ├─ loopback-connector-rest@4.0.1 ├─ loopback4-command@0.1.0 ├─ loopback4-seeder@0.2.0 ├─ loopback4-slug@0.1.0 ├─ lower-case@2.0.2 ├─ lru-cache@6.0.0 ├─ make-error@1.3.6 ├─ map-age-cleaner@0.1.3 ├─ map-stream@0.1.0 ├─ md5@2.3.0 ├─ media-typer@0.3.0 ├─ mem@5.1.1 ├─ merge-descriptors@1.0.1 ├─ merge-stream@2.0.0 ├─ merge2@1.4.1 ├─ micromatch@4.0.4 ├─ mime-db@1.51.0 ├─ mime@2.6.0 ├─ mimic-response@3.1.0 ├─ minimist@1.2.5 ├─ mixpanel@0.13.0 ├─ mkdirp@1.0.4 ├─ mocha@9.2.1 ├─ msgpack5@4.5.1 ├─ musicbrainz-api@0.7.2 ├─ mute-stream@0.0.8 ├─ nanoid@3.2.0 ├─ natural-compare@1.4.0 ├─ negotiator@0.6.3 ├─ nise@5.1.1 ├─ node-cleanup@2.1.2 ├─ node-fetch-h2@2.3.0 ├─ node-fetch@2.6.1 ├─ node-preload@0.2.1 ├─ node-releases@2.0.2 ├─ normalize-path@3.0.0 ├─ normalize-url@6.1.0 ├─ npm-run-path@4.0.1 ├─ nyc@15.1.0 ├─ oas-linter@3.2.2 ├─ oas-resolver@2.5.6 ├─ oas-schema-walker@1.1.5 ├─ oas-validator@5.0.8 ├─ oauth-1.0a@2.2.6 ├─ object-assign@4.1.1 ├─ object-inspect@1.12.0 ├─ object-keys@1.1.1 ├─ object.assign@4.1.2 ├─ object.entries@1.1.5 ├─ on-headers@1.0.2 ├─ once@1.4.0 ├─ openapi3-ts@2.0.2 ├─ optionator@0.9.1 ├─ ora@5.4.1 ├─ os-locale@5.0.0 ├─ os-tmpdir@1.0.2 ├─ p-cancelable@2.1.1 ├─ p-defer@1.0.0 ├─ p-event@4.2.0 ├─ p-finally@1.0.0 ├─ p-is-promise@2.1.0 ├─ p-limit@2.3.0 ├─ p-locate@4.1.0 ├─ p-timeout@3.2.0 ├─ p-try@2.2.0 ├─ package-hash@4.0.0 ├─ packet-reader@1.0.0 ├─ param-case@3.0.4 ├─ parent-module@1.0.1 ├─ passport-facebook@3.0.0 ├─ passport-google-oauth2@0.2.0 ├─ passport-http@0.3.0 ├─ passport-oauth@1.0.0 ├─ passport-spotify@2.0.0 ├─ path-case@3.0.4 ├─ path-is-absolute@1.0.1 ├─ path-key@3.1.1 ├─ path-to-regexp@6.2.0 ├─ path-type@4.0.0 ├─ pause-stream@0.0.11 ├─ pause@0.0.1 ├─ pg-connection-string@2.5.0 ├─ pg-int8@1.0.1 ├─ pg-pool@3.5.1 ├─ pg-protocol@1.5.0 ├─ pg-types@2.2.0 ├─ pg@8.7.3 ├─ pgpass@1.0.5 ├─ picocolors@1.0.0 ├─ picomatch@2.3.1 ├─ pkg-dir@4.2.0 ├─ podcastdx-client@5.0.0 ├─ podparse@1.5.0 ├─ postgres-array@2.0.0 ├─ postgres-bytea@1.0.0 ├─ postgres-date@1.0.7 ├─ postgres-interval@1.2.0 ├─ prettier@2.5.1 ├─ process-nextick-args@2.0.1 ├─ proxy-addr@2.0.7 ├─ ps-tree@1.2.0 ├─ psl@1.8.0 ├─ pump@3.0.0 ├─ q@1.5.1 ├─ qs@6.10.3 ├─ query-string@5.1.1 ├─ querystring@0.2.1 ├─ queue-microtask@1.2.3 ├─ quick-lru@5.1.1 ├─ random-bytes@1.0.0 ├─ random-seed@0.3.0 ├─ random-useragent@0.5.0 ├─ randombytes@2.1.0 ├─ raw-body@2.4.3 ├─ readdirp@3.6.0 ├─ reflect-metadata@0.1.13 ├─ release-zalgo@1.0.0 ├─ request@2.88.0 ├─ require-main-filename@2.0.0 ├─ resolve-alpn@1.2.1 ├─ restore-cursor@3.1.0 ├─ reusify@1.0.4 ├─ run-async@2.4.1 ├─ run-parallel@1.2.0 ├─ safe-buffer@5.2.1 ├─ safer-buffer@2.1.2 ├─ sentence-case@3.0.4 ├─ serialize-javascript@6.0.0 ├─ serve-static@1.14.2 ├─ set-blocking@2.0.0 ├─ setlistfm-js@1.2.0 ├─ shebang-command@2.0.0 ├─ shebang-regex@3.0.0 ├─ should-equal@2.0.0 ├─ should-format@3.0.3 ├─ sinon@11.1.2 ├─ slash@3.0.0 ├─ slugify@1.6.5 ├─ snake-case@3.0.4 ├─ songkick-api-node@1.0.4 ├─ soundcloud.ts@0.4.5 ├─ source-map@0.6.1 ├─ spawn-wrap@2.0.0 ├─ split@0.3.3 ├─ split2@4.1.0 ├─ spotify-web-api-node@5.0.2 ├─ sprintf-js@1.0.3 ├─ sshpk@1.17.0 ├─ stable@0.1.8 ├─ stoppable@1.1.0 ├─ stream-combiner@0.0.4 ├─ strict-uri-encode@1.1.0 ├─ string_decoder@1.3.0 ├─ string-argv@0.1.2 ├─ string-width@4.2.3 ├─ string.prototype.trimend@1.0.4 ├─ string.prototype.trimstart@1.0.4 ├─ strip-bom@4.0.0 ├─ strip-final-newline@2.0.0 ├─ strip-json-comments@3.1.1 ├─ strong-error-handler@4.0.0 ├─ superagent@6.1.0 ├─ supertest@6.2.2 ├─ supports-color@7.2.0 ├─ swagger-ui-dist@4.5.2 ├─ test-exclude@6.0.0 ├─ text-table@0.2.0 ├─ through@2.3.8 ├─ tmp@0.0.33 ├─ to-fast-properties@2.0.0 ├─ to-regex-range@5.0.1 ├─ toposort@2.0.2 ├─ tough-cookie@4.0.0 ├─ tr46@0.0.3 ├─ tsc-watch@4.6.0 ├─ tweetnacl@0.14.5 ├─ type-check@0.4.0 ├─ type-detect@4.0.8 ├─ type-fest@0.20.2 ├─ typed-emitter@1.4.0 ├─ typedarray-to-buffer@3.1.5 ├─ typescript-json-schema@0.49.0 ├─ uid-safe@2.1.5 ├─ uid2@0.0.4 ├─ unbox-primitive@1.0.1 ├─ unpipe@1.0.0 ├─ upper-case@2.0.2 ├─ util-deprecate@1.0.2 ├─ util-promisifyall@1.0.6 ├─ util@0.12.1 ├─ uuid-parse@1.1.0 ├─ v8-compile-cache@2.3.0 ├─ validator@13.7.0 ├─ vary@1.1.2 ├─ verror@1.10.0 ├─ wcwidth@1.0.1 ├─ webidl-conversions@3.0.1 ├─ whatwg-fetch@3.6.2 ├─ whatwg-url@5.0.0 ├─ which-boxed-primitive@1.0.2 ├─ which-module@2.0.0 ├─ which-typed-array@1.1.7 ├─ word-wrap@1.2.3 ├─ wordpress-api-client@0.4.6 ├─ workerpool@6.2.0 ├─ wp-types@3.58.0 ├─ wrap-ansi@7.0.0 ├─ write-file-atomic@3.0.3 ├─ xmlcreate@2.0.4 ├─ xtend@4.0.2 ├─ yallist@4.0.0 ├─ yamljs@0.3.0 ├─ yargs-parser@20.2.9 ├─ yargs-unparser@2.0.0 ├─ yargs@16.2.0 ├─ yn@3.1.1 └─ yocto-queue@0.1.0 ```

Additional information

No response

Reproduction

No response

achrinza commented 2 years ago

Thanks for the report, @emulienfou. We'll need to investigate further on this. AFAIK, this issue should be visible in our CI pipeline, but that does not seem to be the case.

clewisln commented 2 years ago

I started getting this after upgrading my repository.

My (hopefully temporary) fix was to copy out the rule from @loopback/eslint-config, into .eslintrc.js, adding this to the bottom of the array:

      {
        selector: 'objectLiteralProperty',
        format: null,
      }
pkhodaveissi commented 2 years ago

Same here!

achrinza commented 2 years ago

This was introduced by https://github.com/typescript-eslint/typescript-eslint/pull/4582. WIll open a PR to revert this behaviour for MIME type-like object members.

clewisln commented 2 years ago

The commit linked on this ticket will only handle mime types.

This issue in this ticket also applies to the response codes in openapi decorators:

@get('/example', {
    responses: {
        '200': {  <-- this will be flagged as an error
            description: 'Example',
        },
    },
})

Please review the approach being taken; there are probably more use cases not explicitly covered here.

Eslint itself provides the "objectLiteralProperty" selector now, it probably makes sense to leverage it.