
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@mkvlrn/configurations
Advanced tools
Opinionated configs for eslint, prettier, and typescript (tsconfig)
custom, opinionated configurations for eslint, prettier, and typescript (tsconfig.json) for my projects - aimed at modern, type-safe, non-spaghetti codebases
works in esm projects. not sure if it works in cjs, nor I'm willing to test it; you should be using esm
yarn add typescript eslint prettier @mkvlrn/configurations -D
then import the configurations from the package on your config files:
eslint.config.jsfor base node, nest, or vite/react projects:
export { base as default } from "@mkvlrn/configurations/eslint";
for nextjs projects:
export { next as default } from "@mkvlrn/configurations/eslint";
if you want to add rules to the config, you export it as default while adding your rules to the config array:
import { base } from "@mkvlrn/configurations/eslint";
/** @type {import("typescript-eslint").ConfigWithExtends[]} */
export default {
...base, // or ...next for the nextjs config
rules: {
// add your custom rules here
"no-console": "error",
// or ignores
"ignores": ["dist"],
},
};
prettier.config.jsfor all projects, using the config without modifying it:
export { base as default } from "@mkvlrn/configurations/prettier";
and if you want to modify any of the rules, you can do so:
import { base } from "@mkvlrn/configurations/prettier";
/** @type {import("prettier").Options} */
export default {
...base,
// add your custom rules here
printWidth: 100,
};
tsconfig.jsonfor base node, nest, or vite/react projects:
{
"extends": "@mkvlrn/configurations/tsconfig-base",
"compilerOptions": {
// add your custom rules here
"strict": true,
"noUncheckedIndexedAccess": true,
},
}
for nextjs projects:
{
"extends": "@mkvlrn/configurations/tsconfig-next",
"compilerOptions": {
// add your custom rules here
"strict": true,
"noUncheckedIndexedAccess": true,
},
}
two eslint flat configs: one for whatever node project (node, nest, react with vite, etc) and another for nextjs projects (which requires some special rules)
almost 100% positive it requires esm (type: module in package.json), I don't even know at this point, but if you use commonjs in 2024 you should be sent to the gulag
ALL rulesets/plugins are installed with the package, it's a flat config, so it's fancy that way
installing eslint separately is required
a packaged prettier configuration with some opinionated defaults
also brings tailwindcss support (order of classes) and imports sorting, both via plugins
installing prettier separately is required
a packaged tsconfig.json with some opinionated defaults for both base node (which includes nest and vite/react projects) and nextjs projects
anything related to files except needs to be set: rootDir, outDir, baseUrl, paths, etc
this prevents path confusion because the "original" tsconfig will be in node_modules
defaults to noemit because I use esbuild so you might want to change that if you still want to use tsc like it's 2014
installing typescript separately is required
FAQs
Opinionated configs for eslint, prettier, and typescript (tsconfig)
We found that @mkvlrn/configurations demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.