{"id":41780,"library":"prettier-with-tabs","title":"Prettier With Tabs","description":"A fork of Prettier v0.22.0 (beta) that adds an option to indent lines with tabs instead of spaces. Prettier is an opinionated JavaScript formatter that parses JS into an AST and pretty-prints it, ignoring original formatting. This fork targets developers who need tab indentation before official support, but is no longer maintained (upstream Prettier now supports tabs via `useTabs`). Legacy release, only useful for historical reference or locked toolchains.","status":"deprecated","version":"0.22.0","language":"javascript","source_language":"en","source_url":"https://github.com/arijs/prettier-with-tabs","tags":["javascript"],"install":[{"cmd":"npm install prettier-with-tabs","lang":"bash","label":"npm"},{"cmd":"yarn add prettier-with-tabs","lang":"bash","label":"yarn"},{"cmd":"pnpm add prettier-with-tabs","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is CJS-only (no ESM). Use named exports like `format` are not available; default export is the api object.","wrong":"const prettier = require('prettier-with-tabs'); prettier.format(code, { tabWidth: 4 }); // valid, but CJS only, not ESM","symbol":"prettier.format","correct":"import prettier from 'prettier-with-tabs'; prettier.format(code, { tabWidth: 4 });"},{"note":"Same as format; the API is through the default export object.","wrong":"import { check } from 'prettier-with-tabs'; // no named export 'check'","symbol":"prettier.check","correct":"import prettier from 'prettier-with-tabs'; prettier.check(code);"},{"note":"resolveConfig is a nested object; use dot notation.","wrong":"import { resolveConfig } from 'prettier-with-tabs'; // not a named export","symbol":"prettier.resolveConfig","correct":"import prettier from 'prettier-with-tabs'; prettier.resolveConfig.sync(process.cwd());"}],"quickstart":{"code":"import prettier from 'prettier-with-tabs';\nconst code = `function hello(name) {\n  console.log('hello, ' + name);\n}`;\nconst formatted = prettier.format(code, {\n  parser: 'babel',\n  tabWidth: 4,\n  // Note: this fork does not support useTabs; tabs are always used\n});\nconsole.log(formatted);\n// Output:\n// function hello(name) {\n// \\tconsole.log('hello, ' + name);\n// }","lang":"javascript","description":"Formats a JavaScript function with tabs for indentation using the fork's default tab style."},"warnings":[{"fix":"Migrate to official prettier package and use `useTabs: true`.","message":"The package is a deprecated fork; upstream Prettier now supports `useTabs` option natively.","severity":"deprecated","affected_versions":">=0.0.1"},{"fix":"Use official prettier with `useTabs` option, or if you need this exact behavior, pin version.","message":"The package name 'prettier-with-tabs' is confusing; many expect it to be a plugin or config, not a full fork.","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Do not rely on consistent formatting across updates; pin to exact version.","message":"This version (0.22.0) is a beta; formatting may change across minor releases.","severity":"gotcha","affected_versions":">=0.22.0 <1.0.0"},{"fix":"Use `require('prettier-with-tabs')` or configure your transpiler to handle CJS.","message":"The package is CJS-only, no ESM exports. Using `import` requires a bundler or Node >=12 with esm flag.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"search_vec":"'add':11 'ast':33 'beta':9 'develop':45 'fork':5,43 'format':41 'formatt':27 'histor':70 'ignor':39 'indent':15,49 'instead':19 'javascript':26,75 'js':30 'legaci':65 'line':16 'lock':73 'longer':56 'maintain':57 'need':47 'offici':51 'opinion':25 'option':13 'origin':40 'pars':29 'pretti':36 'prettier':1,7,22,59 'pretty-print':35 'print':37 'refer':71 'releas':66 'space':21 'support':52,61 'tab':3,18,48,62 'target':44 'toolchain':74 'upstream':58 'use':68 'usetab':64 'v0.22.0':8 'via':63","created_at":"2026-06-04T18:54:04.330826+00:00","updated_at":"2026-06-04T18:54:04.330826+00:00","problems":[{"fix":"Run `npm install prettier-with-tabs` or check the name in package.json.","cause":"Package not installed or typo in package name.","error":"Cannot find module 'prettier-with-tabs'"},{"fix":"Use default import: `import prettier from 'prettier-with-tabs'` then `prettier.format(...)`.","cause":"Importing incorrectly; e.g., destructuring a non-existent named export.","error":"TypeError: prettier.format is not a function"},{"fix":"Use exact version `0.22.0` or range `~0.22.0`.","cause":"Using a semver range that doesn't match the package's actual version (e.g., `^1.0.0`).","error":"Error: Invalid version: \"0.22.0\""}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/arijs/prettier-with-tabs#readme","github":"https://github.com/arijs/prettier-with-tabs","docs":null,"changelog":null,"pypi":null,"npm":"prettier-with-tabs","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}