langel / botb_irc_bot

battle of the bits instant relay chat magic
BSD 3-Clause "New" or "Revised" License
11 stars 7 forks source link

Install and configure eslint #104

Closed mucrow closed 1 year ago

mucrow commented 1 year ago

this PR allows you to do style linting on the codebase with the command npm run lint.

it configures eslint to check for two code issues:

eslint can fix some types of issues for you. to ask eslint to fix everything it can, use npm run lint:fix.

eslint found more than 400 instances of missing semicolons, all of which can be fixed using npm run lint:fix. i have created a separate PR that actually adds in those omitted semicolons: #103

on a final note, there are recommended rules for eslint. i did NOT configure eslint to use the recommended ruleset. let me know if the recommended rules are something you're interested in and i can coordinate with you on this thread to clarify/configure/autofix.

langel commented 1 year ago

hell yeah semicolon life!!; is there a way to hook it into git commit so it runs eslint first and must pass or the commit fails?

mucrow commented 1 year ago

yes ! i can look into for you...sometime...bug me about it lol