sarbbottam / eslint-find-rules

Find built-in ESLint rules you don't have in your custom config
http://npm.im/eslint-find-rules
MIT License
206 stars 36 forks source link

Not able to save output as single column #348

Open 1951FDG opened 1 year ago

1951FDG commented 1 year ago

A while ago the output was improved (https://github.com/sarbbottam/eslint-find-rules/issues/9), but for some reason I can't seem to be able to save the output as a single column, it always defaults to 2 columns

npm run --silent eslint-find-option-rules > ./unused-rules.txt

what I did was edit cli-util.js and set default window width size to 40

var availableWidth = size.width || /* istanbul ignore next */40;

Don't know what the best way to go about this, maybe provide a parameter to change to single line ouput, or change default window size width, or etc...

borgar commented 1 year ago

I would also love to have an option to get the list in a format where there is a single rule per line. My current workaround is using a string of shell commands, which isn't ideal but gets it done (for my usecase):

eslint-find-rules --no-core -u rulesfile.js|fgrep -vx 'unused rules'|tr -s '[:blank:]' '\n'