{"id":25778,"library":"jarb","title":"jarb","description":"Reusable lint, webpack, babel and jest configuration package, version 3.0.10-0. Provides shared configurations for JavaScript/TypeScript projects, reducing setup overhead. Release cadence is irregular. Key differentiator: combines multiple tool configs into one dependency, but note that many projects now prefer using eslint-config-* or @babel/preset-env directly with more flexibility.","status":"active","version":"3.0.10-0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install jarb","lang":"bash","label":"npm"},{"cmd":"yarn add jarb","lang":"bash","label":"yarn"},{"cmd":"pnpm add jarb","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only since v3; no CommonJS support.","wrong":"const jarb = require('jarb')","symbol":"jarb","correct":"import jarb from 'jarb'"},{"note":"Named export for ESLint configuration.","wrong":"const { lintConfig } = require('jarb')","symbol":"lintConfig","correct":"import { lintConfig } from 'jarb'"},{"note":"Named export for webpack configuration.","wrong":"","symbol":"webpackConfig","correct":"import { webpackConfig } from 'jarb'"}],"quickstart":{"code":"import jarb from 'jarb';\nimport { lintConfig, webpackConfig, babelConfig, jestConfig } from 'jarb';\n\n// Use configurations directly\n// For example, in .eslintrc.js:\nmodule.exports = lintConfig;\n\n// In webpack.config.js:\nmodule.exports = webpackConfig;\n\n// In .babelrc:\nmodule.exports = babelConfig;\n\n// In jest.config.js:\nmodule.exports = jestConfig;\n\n// Or use the default export for combined setup:\nconst config = jarb();\nconsole.log(config);","lang":"typescript","description":"Imports and uses all config exports from jarb package."},"warnings":[{"fix":"Switch to ESM imports or use dynamic import() if necessary.","message":"Version 3.0.0 drops CommonJS support; require() will fail.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Use named exports like lintConfig, webpackConfig, etc.","message":"The default export jarb() may be deprecated in future versions in favor of named exports.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Use Object.assign or spread operator to create a new config object.","message":"Configuration objects are frozen and cannot be mutated; merging with overrides requires cloning.","severity":"gotcha","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Change to import statement or use --es-module-specifier-resolution=node flag.","cause":"Using require() on an ESM-only package in Node.js.","error":"Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: .../node_modules/jarb/index.js"},{"fix":"Create a copy: const myConfig = { ...lintConfig, rules: { ...lintConfig.rules, 'my-rule': 'warn' } };","cause":"Attempting to mutate the frozen config object.","error":"TypeError: Cannot assign to read only property 'rules' of object '#<Object>'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}