No description
- JavaScript 100%
|
All checks were successful
Publish to Forgejo NPM registry / Publish package (release) Successful in 10s
|
||
|---|---|---|
| .forgejo/workflows | ||
| .github/workflows | ||
| eslint | ||
| tsconfig | ||
| .gitignore | ||
| package.json | ||
| pnpm-lock.yaml | ||
| prettier.mjs | ||
| README.md | ||
@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 — usesprojectService).no-console→ warn (console.warn/console.errorallowed).- 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.