How do you handle eslint/prettier configs across multiple repos?

This page summarizes the projects mentioned and recommended in the original post on /r/typescript

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • eslint-config

    Extensible eslint configurations for the punctilious developer. (by exbotanical)

    I use a [monorepo for my ESLint configs via NPM - each package is a single config (for Vue, React, TypeScript) that extends a set of base settings that I use throughout all of my JS/TS code. I use

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • prettier-config

    Extensible prettier configurations for the punctilious developer. (by exbotanical)

    For Prettier, I likewise pull in a shared config that I publish on NPM. Both ESLint and Prettier have first-class support for packaged, shared configs i.e. this is the recommended way to consume such configs across many projects.

  • husky

    Git hooks made easy 🐶 woof!

    To answer your next question: I lint and format on save, and I use Git hooks installed by Husky and executed through Lint-Staged (this tool helps ensure your Git hooks only run on modified files, etc) to ensure there are no lint or formatting errors whenever making a commit or pushing code. This is helpful for teams, as some developers tend to forget to run lint tasks, or don't have the Prettier extension installed in their IDE. If there are lint errors, the commit is rejected until fixed. YMMV - you'll need to fine-tune the strictness of this based on the team's needs.

  • lint-staged

    🚫💩 — Run linters on git staged files

    To answer your next question: I lint and format on save, and I use Git hooks installed by Husky and executed through Lint-Staged (this tool helps ensure your Git hooks only run on modified files, etc) to ensure there are no lint or formatting errors whenever making a commit or pushing code. This is helpful for teams, as some developers tend to forget to run lint tasks, or don't have the Prettier extension installed in their IDE. If there are lint errors, the commit is rejected until fixed. YMMV - you'll need to fine-tune the strictness of this based on the team's needs.

  • rushstack

    Monorepo for tools developed by the Rush Stack community

    If you're looking to recreate the ease of a monorepo with eslint/prettier, I've used the rushstack eslint patch to ship an eslint package which is almost fully self-contained, not just config, but dependencies as well: https://github.com/microsoft/rushstack/tree/main/eslint/eslint-patch

  • eslint-config

    My personal eslint-config (by switz)

  • prettier

    Prettier is an opinionated code formatter.

    I believe the prettier maintainers have postponed changing from spaces to tabs. At least it's not in the v3 release plan.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • frame

    I love this and it's almost exactly what I do. I have a repository called Frame (as in the frame of a car) which has my configurations and developer dependencies. I can then reference @kristiandupont/dev-deps once. The primary upside to this is that I don't have to play Dependabot whack-a-mole for every repository every time there is an update to any of the dependencies I always use, I can combine them into some batches that I then do now and then.

  • sheriff

    A comprehensive and opinionated Typescript-first ESLint configuration. (by AndreaPontrandolfo)

    I think this is exatly what you are looking for https://github.com/AndreaPontrandolfo/sheriff

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • From React to TypeScript, Simplifying Migration with ts-migrate

    2 projects | dev.to | 29 Jun 2024
  • TypeScript strictly typed - Part 1: configuring a project

    8 projects | dev.to | 12 Jun 2024
  • Make Commit in Your React Project Format-Test-Build Ready with Husky - A Step-by-Step Guide

    4 projects | dev.to | 24 May 2024
  • How to make ESLint and Prettier work together? 🛠️

    4 projects | dev.to | 5 May 2024
  • How to use Lefthooks in your node project?

    4 projects | dev.to | 11 Apr 2024

Did you konow that JavaScript is
the 3rd most popular programming language
based on number of metions?