We were inspired by two things

  • A novel domain. All of the team has experience in full stack web development, but we had no experience in building dev tools or knowledge of how compilers/interpreters/devtools interpret code.
  • PR Review Process: generally in PR review, people point out the flaws in your code we wanted to make something that does the opposite, it commends you for doing a good job. ## What it does

It compares your old code and new code and commends you for changes that reflect best practices. So for example it will commend you if you converted for a var based declaration in JS to a let based declaration. As another example it will commend you if you implement (this design pattern)[] Considering the fact that it can point out design patterns, you can see how sophisticated this tool is.

It can be used in two ways

  • as a cli
  • as a node module. in which case, it would return all of the good changes made as an array of object where each object contains a message and a line number on which to display that message. this was a big goal for us since this enables integration with software such as VSCODE or github actions.

How we built it

We used Espree which is a javascript code parser. This thing generates an AST given a source code file. We then compared the AST of new and old code, found changes, and checked to see if those changes are good changes.

Challenges we ran into

  • having no familiarity with how code is processed.
  • one member of the team had very less familiarity with JS.

Accomplishments that we're proud of

The fact that we pulled this off, something that we didn't know anything about a week ago, and we learned a lot in the process.

What we learned

  • how code is processed
  • how packages are published to npm
  • how github actions can be used for CI

What's next for nice-linter

  • integrate it with github actions and vscode
  • make the process of adding more rules simple, sort of a custom syntax or a DSL if you will. Currently, adding new rules is only possible through actual coding, like eslint plugins. but we want to experiment with making it more easy.

Built With

Share this project: