2.0.6 • Published 7 months ago

@mkvlrn/config v2.0.6

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

@mkvlrn/config

what

custom, opinionated configurations for biome, commitlint, and typescript (tsconfig.json) to be used in my node and possibly bun (deno does its own thing) projects - aimed at modern, type-safe, non-spaghetti codebases

created to work with esm projects only. if you're still using cjs you are wrong and you will be sent to the gulag

how

works exactly the same for npm, yarn, pnpm, and bun - exemplified with yarn here:

yarn add @mkvlrn/config -D

then import the configurations from the package on your config files:

biome

a base config is exposed, so import that and go from there

installing bioime separately is required

create/edit your configuration file as below:

{
  "extends": ["@mkvlrn/config/biome"]
}

commitlint

exactly the same as with @commitlint/config-conventional, but in here, because adding a single package just for that is whack

installing commitlint (the cli) separately is required

create/edit your configuration file as below:

{
  "extends": ["@mkvlrn/config/commitlint"]
}

typescript (tsconfig)

three typescript configurations are exposed:

  • tsconfig-node for whatever node project (inlcuding nestjs) without react
  • tsconfig-vite for vite/react projects
  • tsconfig-next for nextjs projects (which requires some special rules)

anything related to files needs to be set: rootDir, outDir, baseUrl, paths, etc

this prevents path confusion because the "original" tsconfig will be in node_modules

installing typescript separately is required

create/edit your configuration file as below:

for simple node or nestjs projects (pretty much anything that doesn't use react):

{
  "extends": "@mkvlrn/config/tsconfig-node",
  "compilerOptions": {
    // add your custom rules here
    "noEmit": false
  }
}

for vite/react projects:

{
  "extends": "@mkvlrn/config/tsconfig-vite",
  "compilerOptions": {
    // add your custom rules here
    "noUncheckedIndexedAccess": true
  }
}

for nextjs projects:

{
  "extends": "@mkvlrn/config/tsconfig-next",
  "compilerOptions": {
    // add your custom rules here
    "noUncheckedIndexedAccess": true
  }
}
1.2.0

11 months ago

1.1.0

11 months ago

1.0.9

11 months ago

1.0.8

11 months ago

1.0.7

11 months ago

1.0.6

12 months ago

1.0.5

12 months ago

1.3.1

8 months ago

1.3.0

8 months ago

2.0.3

8 months ago

2.0.2

8 months ago

2.0.5

8 months ago

2.0.4

8 months ago

2.0.6

7 months ago

2.0.1

8 months ago

2.0.0

8 months ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago