Closed abdul-alhasany closed 2 months ago
Sure, here is docs
Thankks for the reply.
This includes everything (including eslint and n config). I have my own config and I wanted to add few rules from putout
. Is that possible?
You can turn off everything you don't need
Is it works for you?
Unfortunately not as I want. The recommneded
part adds all these:
const nPlugin = require('eslint-plugin-n');
const {FlatCompat} = require('@eslint/eslintrc');
const putoutPlugin = require('..');
It is conflicting with my eslint config.
I only want putout
part but it is not exported.
How it is conflicting in your config? Do you have any errors?
If you want only putout
plugin was exported you can submit PR:
Don’t forget to update tests, so it wasn’t removed unexpectedly: https://github.com/coderaiser/putout/blob/7eda682759840fbd2270807fdda0cd4152102141/packages/eslint-plugin-putout/lib/config/index.spec.mjs#L32
Actually things much more simpler, if you don't need config, and just need a plugin use:
import putout from 'eslint-plugin-putout';
export default [{
plugins: {
putout,
},
rules: {
"putout/putout": "error"
}
}];
That's it, plugins API didn't changed, only format of configs. Is it works for you?
Great. It is working now. I find a couple of bugs in rules. I will submit separate issues for them
Is the
eslint-plugin-putout
available for the new ESLint flat config?I tried using it this way:
but did not have much success.