prettier / eslint-config-prettier

Turns off all rules that are unnecessary or might conflict with Prettier.
MIT License
5.4k stars 254 forks source link

import type cause many rule broken. #180

Closed yoyoys closed 3 years ago

yoyoys commented 3 years ago

This is a typescript issue, I will reproduce this error later sorry.

eslintrc.js

    'prettier/prettier': [
      'warn',
      {
        printWidth: 100,
        singleQuote: true,
        trailingComma: 'all',
        arrowParens: 'avoid',
      },
    ],

Example.vue

import type { PropType } from 'vue';
import { defineProps } from 'vue';

const props = defineProps({
  debounce: {
    type: Number,
    default: 150 // <- this should add trailingComma but got nothing
  },
});

const a = () =>       { // <- and this will got nothing error
}

         // <- and this handled with `Delete `·····`eslintprettier/prettier` error.
lydell commented 3 years ago

@yoyoys Any updates?

yoyoys commented 3 years ago

@lydell Sorry I can't reproduce it, I think there is no problem right now. I've tried to install prettier 2.2.1 and everything works fine. Thanks.