standard / ts-standard

Typescript style guide, linter, and formatter using StandardJS
https://www.npmjs.com/package/ts-standard
MIT License
464 stars 36 forks source link

Unnecessarily quoted property 'Authorization' found. (quote-props) + VS #112

Closed noxcionum closed 3 years ago

noxcionum commented 3 years ago

What version of this package are you using? latest

What operating system, Node.js, and npm version? WINServer 2016 npm@6.14.6

What happened? image How to fix this?

What did you expect to happen?

Are you willing to submit a pull request to fix this bug?

theoludwig commented 3 years ago

Hey! @noxcionum To fix this error, simply unquote 'Authorization'. so something like this :

{
  Authorization: accessHeader,
  'Content-Type': 'application/json'
}
noxcionum commented 3 years ago

Good. This fixed the problem

alannaidon commented 2 years ago

Hi! I'm having the same issue, but when using Mongoose and I can not unquote. WHat could I do?

{
      $match: {
        $or: [
          { '$validd': [] },
          { '$validd.createdAt': { $lt: new Date(interval) } },
        ],
      },
    },

I can unquote validd, but in order to unquote valid..XXX I would need to create an interface. Any other work around?

aarushikakkar commented 1 year ago

Remove quotes from keys