prettier / vim-prettier

A Vim plugin for Prettier
MIT License
1.78k stars 138 forks source link

.eslintrc is ignored #323

Open lushkovsky-s opened 2 years ago

lushkovsky-s commented 2 years ago

I'm using NVIM v0.6.1, the plugin has been added using this code in ~/.config/nvim/init.vim:

Plug 'prettier/vim-prettier', {
  \ 'do': 'yarn install --frozen-lockfile --production',
  \ 'branch': 'release/0.x'
  \ }

In general everything works well (:Prettier do apply fixes on code), but the project-specific configuration .eslintrc is not take into account, e.g. instead of import { useState } from "react", I'm getting import {useState} from 'react' In the exact same project using VS Code prettier works excellent (also it's the same correct when using ./node_modules/.bin/prettier --write src/.

.eslintrc:

{
  "extends": ["react-app", "plugin:prettier/recommended"],
  "rules": {
    "@typescript-eslint/consistent-type-imports": "error",
    "prettier/prettier": [
      "error",
      {
        "endOfLine": "auto"
      }
    ]
  }
}

What I've tried:

OS: macOS 11.5.1 Prettier: 2.3.2