Tinkoff / linters

Tinkoff ESlint, Stylelint and Prettier linter configurations
Apache License 2.0
125 stars 24 forks source link

Unexpected token '.' when parsing package.json #198

Closed ddubrava closed 2 years ago

ddubrava commented 2 years ago

Description

Prettier fails on package.json with Unexpected token '.' error. It happens due to prettier-plugin-sort-package.js syntax (line 20, line 28) since old node versions can't work with these. Can you specify engines in package.json?

Reproduction

prettier package.json

Screenshot 2022-05-04 at 12 54 58

Environment

node 12 1.32.1