@mihai205/sharevent-config (0.1.1)

Published 2026-06-27 13:42:09 +00:00 by mihai in Sharevent/sharevent-config

Installation

@mihai205:registry=
npm install @mihai205/sharevent-config@0.1.1
"@mihai205/sharevent-config": "0.1.1"

About this package

@mihai205/sharevent-config

Single source of truth for ESLint, Prettier, and TypeScript base configs across the Sharevent multi-repo (FE, BE, WATCHER). Consumed the same way as @mihai205/sharevent-contracts: a local file: dependency in development, a pinned version in CI.

"@mihai205/sharevent-config": "file:../../PACKAGES/sharevent-config"

What it enforces

  • TypeScript strict (via the shared tsconfig bases).
  • @typescript-eslint/no-floating-promises (type-aware — uses projectService).
  • no-console → warn (console.warn / console.error allowed).
  • Import / export ordering via eslint-plugin-simple-import-sort.
  • Prettier: tabs, double quotes, 100 col (./prettier).

Plugins are dependencies of this package; because ESLint flat config imports plugins by reference, consumers do not need to install them.

Usage

ESLint (flat config)

Node/TS service (eslint.config.mjs):

import { baseConfig } from "@mihai205/sharevent-config/eslint/base";
export default baseConfig({ tsconfigRootDir: import.meta.dirname });

React app (eslint.config.js):

import { reactConfig } from "@mihai205/sharevent-config/eslint/react";
export default reactConfig({ tsconfigRootDir: import.meta.dirname });

tsconfigRootDir lets the type-aware rules find each repo's tsconfig.

Prettier

.prettierrc.mjs:

export { default } from "@mihai205/sharevent-config/prettier";

TypeScript

// BE / WATCHER tsconfig.json
{ "extends": "@mihai205/sharevent-config/tsconfig/node.json", "compilerOptions": { "outDir": "./dist", "rootDir": "./src" }, "include": ["src"] }

// FE tsconfig.app.json
{ "extends": "@mihai205/sharevent-config/tsconfig/react.json", "compilerOptions": { "composite": true }, "include": ["src"] }

Changing the baseline

Edit the source here, bump the version, rebuild/reinstall consumers. CI in each repo reconstructs the umbrella layout and installs this package alongside @mihai205/sharevent-contracts before linting.

Dependencies

Dependencies

ID Version
@eslint/js ^9.32.0
eslint-config-prettier ^9.1.0
eslint-plugin-react-hooks ^5.2.0
eslint-plugin-react-refresh ^0.4.20
eslint-plugin-simple-import-sort ^12.1.1
globals ^16.0.0
typescript-eslint ^8.38.0

Peer dependencies

ID Version
eslint ^9.0.0
typescript ^5.0.0
Details
npm
2026-06-27 13:42:09 +00:00
1
ISC
latest
3.7 KiB
Assets (1)
Versions (1) View all
0.1.1 2026-06-27