Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
sheriff
A comprehensive and opinionated Typescript-first ESLint configuration. (by AndreaPontrandolfo)
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
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.
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.
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.
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
I believe the prettier maintainers have postponed changing from spaces to tabs. At least it's not in the v3 release plan.
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.
I think this is exatly what you are looking for https://github.com/AndreaPontrandolfo/sheriff