4 ms·
I started using GPT-4 for writing ESLint rules whenever I do a code review and I feel it can be an ESLint rule. Simply give it the instance of "bad" and "good"
by msoad 3y ago
I started using GPT-4 for writing ESLint rules whenever I do a code review and I feel it can be an ESLint rule. Simply give it the instance of "bad" and "good" code and let GPT-4 write both the ESLint rule and the unit tests for you. Initially I did a little touch up on the code before submitting. Like using `array.at(-1)` instead of `array[array.length - 1]` but now I do that with GPT-4 too. I say "try using the latest JS features like Array.prototype.at" and it finds other nice things to do too!