prettier VS JSHint

Compare prettier vs JSHint and see what are their differences.

JSHint

JSHint is a tool that helps to detect errors and potential problems in your JavaScript code (by jshint)
Our great sponsors
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • Klotho - AWS Cloud-aware infrastructure-from-code toolbox [NEW]
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • Sonar - Write Clean JavaScript Code. Always.
prettier JSHint
339 16
44,726 8,835
0.9% 0.3%
9.6 4.0
2 days ago 20 days ago
JavaScript JavaScript
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

prettier

Posts with mentions or reviews of prettier. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-30.
  • Effective Refactoring with Codemods
    5 projects | dev.to | 30 Jan 2023
    Have you ever used a transpiler, a linter or a code formatter, such as: Babel, ESLint or Prettier? If the answer is yes, then you've already used metaprogramming! 👏
  • 20 Best Libraries and Tools for React Developers
    11 projects | dev.to | 25 Jan 2023
    Prettier is an opinionated code formatter, it enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary. It is very useful to keep your code readable and make sure that the code format stays consistent when working in a team.
  • x=10 vs let x=10
    3 projects | reddit.com/r/learnjavascript | 20 Jan 2023
    Professional: also set up Prettier, its IDE extension, and use VS Code's "Format on save" feature (or whatever other IDE's equivalent) to quickly and easily format your code to a consistent standard that you define in the configuration for ESLint and Prettier.
  • Goodbye prettier, welcome ESLint
    2 projects | dev.to | 8 Jan 2023
    Like many developers I have used prettier for a long time for most of my projects. It has been the go-to formatting tool for front-end developers and for a good reason. It provides opinionated formatting with minimal options. This coupled with a wide IDE support makes it easy to setup and user.
  • Starting React Native Project in 2023
    13 projects | dev.to | 6 Jan 2023
    Prettier is an opinionated code formatter. Let's install it.
  • Let's do a war
    4 projects | reddit.com/r/ProgrammerHumor | 29 Dec 2022
    Prettier works with lots of languages. Not just js. Check it out: https://prettier.io/
  • The best Angular 15 Starter Project
    7 projects | dev.to | 26 Dec 2022
    ✅ Angular 15 ✅ Angular Material ✅ Unit Testing with Jest ✅ End-to-End Testing with [TestCafé](https://testcafe.io/ ✅ Internationalization with Transloco ✅ Auto documentation with Compodoc ✅ Analyse your project with webpack-bundle-analyzer ✅ Docker ✅ ESLint ✅ Prettier ✅ Commit Linting ✅ AuditJS Audit this application using Sonatype OSS Index ✅ Auto-generate a CHANGELOG with auto-changelog
  • ¿El IDE que se elije cambia algo la forma en que se escriben los programas? ¿Cambia algo la forma de escribir un programa en Java si se usa Eclipse o si se usa NetBeans?
    2 projects | reddit.com/r/programacion | 22 Dec 2022
  • Set up a Node.js App with ESLint and Prettier
    3 projects | dev.to | 19 Dec 2022
    Prettier is an opinionated code formatter, it enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary. It is very useful to keep your code readable and make sure that the code format stays consistent when working in a team. It also supports many programming languages such as : JavaScript, TypeScript, CSS, GraphQL, JSON and much more.
  • React-Native Useful Tips
    3 projects | dev.to | 17 Dec 2022
    Resources: https://reactnative.dev/ https://eslint.org/ https://prettier.io/ https://marketplace.visualstudio.com/itemsitemName=kisstkondoros.vscode-codemetrics

JSHint

Posts with mentions or reviews of JSHint. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-11-23.
  • Front-end Guide
    54 projects | dev.to | 23 Nov 2022
    JSHint
  • Find ES6 features in any JS code
    3 projects | dev.to | 14 Oct 2022
    I came across a problem where I had to find the ES6 features used by any javascript project and other data regarding their use. When I reached out to stackoverflow, I could find only one relevant post which asks you to use linters like jshint/jshint or compilers like babel. Jslint didn't seem to report anything specific to ES6 and Babel converts all the ES6+ features to ES5 but doesn't report anything regarding which constructs were used or how many times they were used. However, Jshint reported all ES6 features used in the code along with some metadata. And, to suit my needs, I ended up writing a python script that calls Jshint on all JS files in a project and presents the features used in the project and the number of times they were used across all files. You can find the code here : jsHintRunner
  • The Why & How To Create A Front-End Website Testing Plan
    3 projects | dev.to | 13 Oct 2022
    Javascript Linting parses and checks if any syntax is violating the rule. If a violation occurs, a warning is shown explaining unexpected behavior. Use the online version for small projects: JSLint, ESLint or JSHint. For larger projects, it is recommended to use a task runner like Gulp or Grunt. Linters ensure developers are following the best practices as a result of which few bugs appear during project development.
  • Modern, faster alternatives to ESLint
    10 projects | dev.to | 3 May 2022
    JSHint was created as a more configurable version of JSLint; it was released in 2011 by John Crawford, and similar to ESLint, it helps us detect syntax errors in a JavaScript program. As it aims to be a configurable version of JSLint, and provides a plethora of options that can be disabled or enabled through a configuration file, which allows for some form of flexibility. Each available option is also adequately documented. JSHint comes with support for many frameworks such as JQuery, Mocha, and Node.js, and is also available as a plugin for many popular code editors.
  • A Guide to Order: Setting up Prettier and Eslint with Husky, Lint-staged and Commitizen
    8 projects | dev.to | 17 Feb 2022
    An alternative linter is JShint.
  • NPM package ‘ua-parser-JS’ with more than 7M weekly download is compromised
    13 projects | news.ycombinator.com | 22 Oct 2021
    > check out the Web X-Ray repo <https://github.com/mozilla/goggles.mozilla.org/>.

    Thanks for example. Peeking a bit under the hood, it appears to be due to transitive dependencies referencing github urls (and transient ones at that) instead of semver, which admittedly is neither standard nor good practice...

    FWIW, simply removing `"grunt-contrib-jshint": "~0.4.3",` from package.json and related jshint-related code from Gruntfile was sufficient to get `npm install` to complete successfully. The debugging just took me a few minutes grepping package-lock.json for the 404 URL in question (https://github.com/ariya/esprima/tarball/master) and tracing that back to a top-level dependency via recursively grepping for dependent packages. I imagine that upgrading relevant dependencies might also do the trick, seeing as jshint no longer depends on esprima[0].

    I'm not sure how representative this particular case is to the sort of issues you run into, but I'll tell that reproducibility issues can get a lot worse in ways that committing deps doesn't help (for example, issues like this one[1] are nasty to narrow down).

    But assuming that installation in your link just happens to have a simple fix and that others are not as forgiving, how is committing node_modules supposed to help here if you're saying you can't even get it to a working state in the first place? DO you own the repo in order to be able to make the change? Or are you mostly just saying that hindsight is 20-20?

    [0] https://github.com/jshint/jshint/blob/master/package.json#L4...

    [1] https://github.com/node-ffi-napi/node-ffi-napi/issues/143

  • Javascript Security Checklist
    5 projects | dev.to | 29 Sep 2021
    JSHint.
  • Design an Effective Build Stage for Continuous Integration
    12 projects | dev.to | 8 Apr 2021
    As you can imagine, the language changed a lot over time, and not all its parts are good. Using a linter will help us stay away from the bad parts of JavaScript. In my experience, the ESlint and JSHint linters integrate very well into the CI environment. Any of these can be installed with npm install --save-dev.

What are some alternatives?

When comparing prettier and JSHint you can also consider the following projects:

black - The uncompromising Python code formatter

JS-Beautifier - Beautifier for javascript

ESLint - Find and fix problems in your JavaScript code.

Standard - 🌟 JavaScript Style Guide, with linter & automatic code fixer

prettier-plugin-organize-imports - Make Prettier organize your imports using the TypeScript language service API.

pretty-quick - ⚡ Get Pretty Quick

dprint - Pluggable and configurable code formatting platform written in Rust.

markdownlint-cli - MarkdownLint Command Line Interface

husky - Git hooks made easy 🐶 woof!

PostCSS - Transforming styles with JS plugins

Drawflow - Simple flow library 🖥️🖱️