{"_id":"@born3am/prettier-config","name":"@born3am/prettier-config","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@born3am/prettier-config","version":"1.0.1","description":"Prettier configuration for born3am","main":"index.js","type":"module","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/born3am/prettier-config-born3am.git"},"author":{"name":"Born3a"},"_id":"@born3am/prettier-config@1.0.1","gitHead":"391d981dccdd7353172331656f6826f44b87d70c","bugs":{"url":"https://github.com/born3am/prettier-config-born3am/issues"},"homepage":"https://github.com/born3am/prettier-config-born3am#readme","_nodeVersion":"20.13.1","_npmVersion":"10.9.0","dist":{"integrity":"sha512-Hqsn3t6nu/8k3NwN0UZMiA/zSHrTHYQ7w183pyiI015A6ewR2IzRI6HeKc7U/fBjIEnM2DwrWrcv4MRH/GrmfQ==","shasum":"2078f263d8457873ab9fa2f7e0d5258a7cd44db1","tarball":"https://registry.npmjs.org/@born3am/prettier-config/-/prettier-config-1.0.1.tgz","fileCount":3,"unpackedSize":3524,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7Y/i/oYAlgFYyn0pAIz4nC+bSMl5EAPrRq/stK3fvEwIhALoQ4LT/+hD/gPv9TOEdECviF1LPlC0Ii7ToylGFf8Gb"}]},"_npmUser":{"name":"born3am","email":"psmaranhao@gmail.com"},"directories":{},"maintainers":[{"name":"born3am","email":"psmaranhao@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/prettier-config_1.0.1_1733155512662_0.1555171465412235"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-02T16:05:12.551Z","1.0.1":"2024-12-02T16:05:12.827Z","modified":"2024-12-02T16:05:13.097Z"},"maintainers":[{"name":"born3am","email":"psmaranhao@gmail.com"}],"description":"Prettier configuration for born3am","homepage":"https://github.com/born3am/prettier-config-born3am#readme","repository":{"type":"git","url":"git+https://github.com/born3am/prettier-config-born3am.git"},"author":{"name":"Born3a"},"bugs":{"url":"https://github.com/born3am/prettier-config-born3am/issues"},"readme":"# prettier-config\nPrettier configuration for Born3am Projects\n\n## Table of Contents\n1. [Installation](#installation)\n2. [Configuration](#configuration)\n3. [Usage](#usage)\n4. [Scripts](#scripts)\n\n## Installation\n\n1. Install the `@born3am/prettier-config` package as a dev dependency.\n\n  ```bash\n  npm install --save-dev @born3am/prettier-config\n  ```\n\n2) Edit `package.json`:\n\n```jsonc\n{\n  // ...\n  \"prettier\": \"@born3am/prettier-config\"\n}\n```\n## Configuration\nThe package `@born3am/prettier-config` has no **dependencies**, but just the following config:\n\n  ```js\n  const prettierConfig = {\n  arrowParens: 'always',\n  bracketSpacing: true,\n  bracketSameLine: false,\n  endOfLine: 'lf',\n  htmlWhitespaceSensitivity: 'css',\n  jsxSingleQuote: true,\n  printWidth: 120,\n  proseWrap: 'never',\n  quoteProps: 'as-needed',\n  rangeStart: 0,\n  rangeEnd: Infinity,\n  semi: true,\n  singleAttributePerLine: false,\n  singleQuote: true,\n  tabWidth: 2,\n  trailingComma: 'all',\n  useTabs: false,\n\n  // Overrides for specific file types\n  overrides: [\n    {\n      files: ['*.json'],\n      options: {\n        printWidth: 200,\n      },\n    },\n    {\n      files: ['tsconfig.json', 'tsconfig.*.json', 'jsconfig.json', 'jsconfig.*.json'],\n      options: {\n        parser: 'jsonc',\n      },\n    },\n    {\n      files: ['*.md'],\n      options: {\n        proseWrap: 'preserve',\n      },\n    },\n  ],\n};\n  ```\n\n### Usage\n\n`prettier` is integrated with `eslint` and rules from both are applied to all javascript/typescript files in one go, via the eslint script only.\n\nOther files like `.md`, `.yml`, `.json`, `.html`, `.css`, `.scss`, `.sass`, `.less` are handled uniquely by `prettier` and linting rules cannot be applied to them inside `eslint.config.js`.\n\n### Scripts\nSetup `package.json` Scripts:\n\n```json\n{\n \"scripts\": {\n    \"lint\": \"eslint -c eslint.config.js --cache .\",\n    \"lint:fix\": \"npm run lint -- --no-cache --fix\",\n    \"prettier\": \"prettier --check --cache --no-error-on-unmatched-pattern '**/*.md' '**/*.yml' '**/*.json' '**/*.html' '**/*.css' '**/*.scss' '**/*.sass' '**/*.less'\",\n    \"prettier:fix\": \"npm run prettier -- --no-cache --write\",\n    \"fix\": \"npm run prettier:fix ; npm run lint:fix\"\n  }\n}\n```\n\nRegardless of the file type, the fix script should always handle all files.\n\n","readmeFilename":"README.md"}