prettier / tslint-plugin-prettier

Runs Prettier as a TSLint rule and reports differences as individual TSLint issues
MIT License
235 stars 14 forks source link

"tslint.configFile" absolute file path required with VSCode #298

Open joelricci opened 5 years ago

joelricci commented 5 years ago

I'm not sure if this issue is more related to VSCode, tslint or this plugin, but considering that tslint works as expected except for the prettier part I'm starting by posting an issue here.

My project folder structure looks similar to this:

<root>
├── backend
└── frontend
    ├── tslint.js
    └── .prettierrc

In VSCode, I open the project root. Now prettier won't do anything unless I specify an absolute path to the tslint.js file for "tslint.configFile" config option in VSCode.

OS: macOS 10.14.6 VSCode 1.37 tslint@5.14.0 tslint-plugin-prettier@2.0.1

tslint.js:

module.exports = {
    extends: [
        'tslint-plugin-prettier',
        'tslint-config-prettier',
    ],
    rules: {
        'prettier': true
    }
}
ikatyang commented 5 years ago

I'm not sure but I guess this is an issue for the TSLint VSCode extension. Could you provide some logs from your TSLint VSCode extension (the TSLint section in the Output panel) so that we could investigate?

joelricci commented 5 years ago

Could you provide some logs from your TSLint VSCode extension (the TSLint section in the Output panel) so that we could investigate?

Thanks for looking into this. I don't seem to have a TSLint section in the output panel though. Or do you mean TypeScript ?

image

ikatyang commented 5 years ago

I thought you're using the first one, but it seems it's the third one:

Do you have a repro repo that I can simply clone it and reproduce the bug?