No description
  • JavaScript 100%
Find a file
mihai dd40c5e0d1
All checks were successful
Publish to Forgejo NPM registry / Publish package (release) Successful in 10s
Update package.json
2026-06-27 13:41:51 +00:00
.forgejo/workflows Update .forgejo/workflows/package-release.yaml 2026-06-27 13:41:23 +00:00
.github/workflows Remove test step from build job in release workflow 2026-06-16 10:10:32 +03:00
eslint Update references to @mihai205/sharevent-contracts in README and ESLint base config 2026-06-16 15:09:40 +03:00
tsconfig update package name and add publish configuration 2026-06-16 14:58:48 +03:00
.gitignore first commit 2026-06-16 09:06:26 +03:00
package.json Update package.json 2026-06-27 13:41:51 +00:00
pnpm-lock.yaml first commit 2026-06-16 09:06:26 +03:00
prettier.mjs first commit 2026-06-16 09:06:26 +03:00
README.md Update references to @mihai205/sharevent-contracts in README and ESLint base config 2026-06-16 15:09:40 +03:00

@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.