{"_id":"@acdh-oeaw/prettier-config","_rev":"4-a3795c082f29c2683a6b5939adc1bdb1","name":"@acdh-oeaw/prettier-config","dist-tags":{"latest":"2.0.1"},"versions":{"0.1.0":{"name":"@acdh-oeaw/prettier-config","version":"0.1.0","license":"MIT","_id":"@acdh-oeaw/prettier-config@0.1.0","maintainers":[{"name":"nondef","email":"christoph.hoffmann@oeaw.ac.at"},{"name":"stefanprobst","email":"stefanprobst@posteo.de"}],"dist":{"shasum":"b982416ad91d6f1bbe1f372bb9ccbb5eb2b04801","tarball":"https://registry.npmjs.org/@acdh-oeaw/prettier-config/-/prettier-config-0.1.0.tgz","fileCount":5,"integrity":"sha512-PancNhMQFkk75xneFC+vKNGjF5i3g2882H1q6jDaVmln4PPZvOnXXHnHkwSVOvmHlKKSqxVjJO1uOcbfBao8sg==","signatures":[{"sig":"MEYCIQChiaj5NZE/VTB1SIjgslFL5nkpdRRBX0WMh9mXPJ61/AIhAL996Rtz7h5d2grbsazLW68IjoQKQLjLK07tFxEItvIc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7434},"main":"index.js","types":"index.d.ts","gitHead":"eda816aef1049601992ac1472c842a7b1d0b3f14","scripts":{"setup":"simple-git-hooks || exit 0","prepare":"pnpm run setup","validate":"pnpm run format:check","ci:release":"changeset publish","format:fix":"pnpm run format:check --write","format:check":"prettier . --cache --check --ignore-path ./.gitignore"},"_npmUser":{"name":"stefanprobst","email":"stefanprobst@posteo.de"},"prettier":"./index.js","_npmVersion":"9.5.1","description":"Shared configuration preset for [`prettier`](https://prettier.io/).","directories":{},"lint-staged":{"*":"prettier --cache --ignore-unknown --write"},"_nodeVersion":"18.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@8.5.0","devDependencies":{"prettier":"^2.8.8","lint-staged":"^13.2.2","@changesets/cli":"^2.26.1","@types/prettier":"^2.7.2","simple-git-hooks":"^2.8.1","@changesets/changelog-github":"^0.4.8"},"peerDependencies":{"prettier":"2.x || 3.x"},"simple-git-hooks":{"pre-push":"pnpm run validate","pre-commit":"pnpm exec lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/prettier-config_0.1.0_1683801893777_0.6154572220984493","host":"s3://npm-registry-packages"}},"1.0.0":{"name":"@acdh-oeaw/prettier-config","version":"1.0.0","license":"MIT","_id":"@acdh-oeaw/prettier-config@1.0.0","maintainers":[{"name":"nondef","email":"christoph.hoffmann@oeaw.ac.at"},{"name":"stefanprobst","email":"stefanprobst@posteo.de"}],"dist":{"shasum":"00c9297db2bfbf9acc558e7928d08fda17038594","tarball":"https://registry.npmjs.org/@acdh-oeaw/prettier-config/-/prettier-config-1.0.0.tgz","fileCount":5,"integrity":"sha512-/YZqzkiUVexvnhPgic4G2aSfrai8hOEA7YbPkasQNCS6p9TgtfjlK4lbhqVx/EGu5bhUc8mrbHpkt973n7WQBw==","signatures":[{"sig":"MEYCIQDM+Sq0JkbR10wthlmH2xROn+WMD24sKmivQ1FawLqnEgIhAJ42J60NY5V+Lz5Ii92kUsmjbHIEI1MxkvIuCMmIJJp7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7459},"main":"index.js","_from":"file:acdh-oeaw-prettier-config-1.0.0.tgz","types":"index.d.ts","scripts":{"setup":"simple-git-hooks || exit 0","validate":"pnpm run format:check","ci:release":"changeset publish","format:fix":"pnpm run format:check --write","format:check":"prettier . --cache --check --ignore-path ./.gitignore"},"_npmUser":{"name":"stefanprobst","email":"stefanprobst@posteo.de"},"prettier":"./index.js","_resolved":"/tmp/474df04f9fb7b31f8cf4388aa01b20b2/acdh-oeaw-prettier-config-1.0.0.tgz","_integrity":"sha512-/YZqzkiUVexvnhPgic4G2aSfrai8hOEA7YbPkasQNCS6p9TgtfjlK4lbhqVx/EGu5bhUc8mrbHpkt973n7WQBw==","_npmVersion":"9.5.1","description":"Shared configuration preset for [`prettier`](https://prettier.io/).","directories":{},"lint-staged":{"*":"prettier --cache --ignore-unknown --write"},"_nodeVersion":"18.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@8.5.0","devDependencies":{"prettier":"^2.8.8","lint-staged":"^13.2.2","@changesets/cli":"^2.26.1","@types/prettier":"^2.7.2","simple-git-hooks":"^2.8.1","@changesets/changelog-github":"^0.4.8"},"peerDependencies":{"prettier":"2.x || 3.x"},"simple-git-hooks":{"pre-push":"pnpm run validate","pre-commit":"pnpm exec lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/prettier-config_1.0.0_1683801938969_0.7416101711378738","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@acdh-oeaw/prettier-config","version":"1.0.1","license":"MIT","_id":"@acdh-oeaw/prettier-config@1.0.1","maintainers":[{"name":"nondef","email":"christoph.hoffmann@oeaw.ac.at"},{"name":"stefanprobst","email":"stefanprobst@posteo.de"}],"dist":{"shasum":"99abe5ea9127601872edf1b46f888b2bb6d76967","tarball":"https://registry.npmjs.org/@acdh-oeaw/prettier-config/-/prettier-config-1.0.1.tgz","fileCount":5,"integrity":"sha512-JAj6yvMoECXqZ0U11ZXkmeg6r03OP7lzh+8KhTQ4rN8SbIvI8NSF9mhXKJe0n+LOThapB8MXpIRTWiVZjduYrA==","signatures":[{"sig":"MEQCIFxbDW5QtxyiLzBwUkbI06vfzgKc9DRHr7QVnixlu5ZIAiBbm+XLsR2/gFkIzNfDchJoh7YgwvfydiLfwHQN/wfVnA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":7767},"main":"index.js","_from":"file:acdh-oeaw-prettier-config-1.0.1.tgz","types":"index.d.ts","scripts":{"setup":"simple-git-hooks || exit 0","validate":"pnpm run format:check","ci:release":"changeset publish","format:fix":"pnpm run format:check --write","format:check":"prettier . --cache --check --ignore-path ./.gitignore"},"_npmUser":{"name":"stefanprobst","email":"stefanprobst@posteo.de"},"prettier":"./index.js","_resolved":"/tmp/47f735ba96716c243108ba688265187e/acdh-oeaw-prettier-config-1.0.1.tgz","_integrity":"sha512-JAj6yvMoECXqZ0U11ZXkmeg6r03OP7lzh+8KhTQ4rN8SbIvI8NSF9mhXKJe0n+LOThapB8MXpIRTWiVZjduYrA==","_npmVersion":"9.5.1","description":"Shared configuration preset for [`prettier`](https://prettier.io/).","directories":{},"lint-staged":{"*":"prettier --cache --ignore-unknown --write"},"_nodeVersion":"18.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@8.5.0","devDependencies":{"prettier":"^2.8.8","lint-staged":"^13.2.2","@changesets/cli":"^2.26.1","@types/prettier":"^2.7.2","simple-git-hooks":"^2.8.1","@changesets/changelog-github":"^0.4.8"},"peerDependencies":{"prettier":"2.x || 3.x"},"simple-git-hooks":{"pre-push":"pnpm run validate","pre-commit":"pnpm exec lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/prettier-config_1.0.1_1687767439865_0.3942475113452206","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@acdh-oeaw/prettier-config","version":"2.0.0","license":"MIT","_id":"@acdh-oeaw/prettier-config@2.0.0","maintainers":[{"name":"nondef","email":"christoph.hoffmann@oeaw.ac.at"},{"name":"stefanprobst","email":"stefanprobst@posteo.de"}],"dist":{"shasum":"79639bb7c21f69226744dff0f0be1931696e4881","tarball":"https://registry.npmjs.org/@acdh-oeaw/prettier-config/-/prettier-config-2.0.0.tgz","fileCount":5,"integrity":"sha512-PhjHkJRb5K5uWMZ6s6IzNLvBns4Ei+osR6g/XmItFb0B844VOsU6iO3DbRyrHo8zTpMzsftkxVxT9S/b3KVmtQ==","signatures":[{"sig":"MEQCIHgxNfAeeRJxRaL1g80xdJ98kHN+A9znjKklKS+2yFaOAiA//i2id1ixbCgd/xHFCBY1Lp5mBTf6O/L+upFal9Z80Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8059},"main":"index.js","type":"module","_from":"file:acdh-oeaw-prettier-config-2.0.0.tgz","types":"index.d.ts","scripts":{"setup":"is-ci || simple-git-hooks","validate":"run-p format:check types:check","ci:release":"changeset publish","format:fix":"pnpm run format:check --write","types:check":"tsc --noEmit","format:check":"prettier . --cache --check --ignore-path ./.gitignore","changeset:add":"changeset add","changeset:status":"changeset status --verbose"},"_npmUser":{"name":"stefanprobst","email":"stefanprobst@posteo.de"},"prettier":"./index.js","_resolved":"/tmp/567d154ce3e6b0e7eeb04d37d0391723/acdh-oeaw-prettier-config-2.0.0.tgz","_integrity":"sha512-PhjHkJRb5K5uWMZ6s6IzNLvBns4Ei+osR6g/XmItFb0B844VOsU6iO3DbRyrHo8zTpMzsftkxVxT9S/b3KVmtQ==","commitlint":{"extends":"@acdh-oeaw/commitlint-config"},"_npmVersion":"10.2.3","description":"Shared configuration preset for [`prettier`](https://prettier.io/).","directories":{},"lint-staged":{"*":"prettier --cache --ignore-unknown --write"},"_nodeVersion":"20.10.0","_hasShrinkwrap":false,"packageManager":"pnpm@8.12.1","devDependencies":{"is-ci":"^3.0.1","prettier":"^3.1.1","typescript":"^5.3.3","lint-staged":"^15.2.0","npm-run-all2":"^6.1.1","@changesets/cli":"^2.27.1","@commitlint/cli":"^18.4.3","@types/prettier":"^2.7.3","simple-git-hooks":"^2.9.0","@acdh-oeaw/commitlint-config":"^1.0.0","@changesets/changelog-github":"^0.5.0"},"peerDependencies":{"prettier":"3.x"},"simple-git-hooks":{"pre-push":"pnpm run validate","commit-msg":"pnpm exec commitlint --edit","pre-commit":"pnpm exec lint-staged"},"_npmOperationalInternal":{"tmp":"tmp/prettier-config_2.0.0_1702596701914_0.7649717392263562","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"@acdh-oeaw/prettier-config","version":"2.0.1","license":"MIT","type":"module","main":"./index.js","types":"./index.d.ts","exports":{"types":"./index.d.ts","import":"./index.js","default":"./index.js"},"peerDependencies":{"prettier":"3.x"},"devDependencies":{"@acdh-oeaw/commitlint-config":"^2.0.0","@changesets/changelog-github":"^0.5.0","@changesets/cli":"^2.27.10","@commitlint/cli":"^19.6.0","is-ci":"^4.1.0","lint-staged":"^15.2.11","npm-run-all2":"^7.0.1","prettier":"^3.4.2","simple-git-hooks":"^2.11.1","typescript":"^5.7.2"},"commitlint":{"extends":"@acdh-oeaw/commitlint-config"},"lint-staged":{"*":"prettier --cache --ignore-unknown --write"},"prettier":"./index.js","simple-git-hooks":{"commit-msg":"pnpm exec commitlint --edit","pre-commit":"pnpm exec lint-staged","pre-push":"pnpm run validate"},"scripts":{"changeset:add":"changeset add","changeset:status":"changeset status --verbose","ci:release":"changeset publish","ci:version":"changeset version && prettier \"**/CHANGELOG.md\" --write","format:check":"prettier . --cache --check --ignore-path ./.gitignore","format:fix":"pnpm run format:check --write","setup":"is-ci || simple-git-hooks","types:check":"tsc --noEmit","validate":"run-p format:check types:check"},"_id":"@acdh-oeaw/prettier-config@2.0.1","description":"Shared configuration preset for [`prettier`](https://prettier.io/).","_integrity":"sha512-0M77qAD8Uhks+S6lPaKzq6ylwQJzjS33jE6uWKNM9dt7iJ1KHgsuZ3xVhWNmw5h/cUGYJvBi0V/ZSy65ow+9Ag==","_resolved":"/tmp/c8761389f44e60d11efd1c93980137b6/acdh-oeaw-prettier-config-2.0.1.tgz","_from":"file:acdh-oeaw-prettier-config-2.0.1.tgz","_nodeVersion":"22.8.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-0M77qAD8Uhks+S6lPaKzq6ylwQJzjS33jE6uWKNM9dt7iJ1KHgsuZ3xVhWNmw5h/cUGYJvBi0V/ZSy65ow+9Ag==","shasum":"46e037f758099e4b8df6ec65280e2da00396d970","tarball":"https://registry.npmjs.org/@acdh-oeaw/prettier-config/-/prettier-config-2.0.1.tgz","fileCount":5,"unpackedSize":8186,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcMcKKfXTIh8/K8aOFX/NXC4AYXOL44EpvBYTg6nvwQgIhAPGD+1JCyCYiJW8JES31mDqm+uHjOeXt/uIKe+l0CSu5"}]},"_npmUser":{"name":"stefanprobst","email":"stefanprobst@posteo.de"},"directories":{},"maintainers":[{"name":"stefanprobst","email":"stefanprobst@posteo.de"},{"name":"nondef","email":"christoph.hoffmann@oeaw.ac.at"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/prettier-config_2.0.1_1733920484867_0.26444623445959814"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-11T10:44:53.712Z","modified":"2024-12-11T12:34:45.233Z","0.1.0":"2023-05-11T10:44:53.918Z","1.0.0":"2023-05-11T10:45:39.252Z","1.0.1":"2023-06-26T08:17:20.014Z","2.0.0":"2023-12-14T23:31:42.078Z","2.0.1":"2024-12-11T12:34:45.040Z"},"license":"MIT","description":"Shared configuration preset for [`prettier`](https://prettier.io/).","maintainers":[{"name":"stefanprobst","email":"stefanprobst@posteo.de"},{"name":"nondef","email":"christoph.hoffmann@oeaw.ac.at"}],"readme":"# acdh-oeaw prettier config\n\nShared configuration preset for [`prettier`](https://prettier.io/).\n\n## How to install\n\n```bash\nnpm install -D prettier @acdh-oeaw/prettier-config\n```\n\nAdd the config to `package.json`:\n\n```json\n{\n\t\"prettier\": \"@acdh-oeaw/prettier-config\"\n}\n```\n\nIf you absolutely need to extend the shared config, create a `.prettierrc.js` file in the root\nfolder of your project:\n\n```js\nconst sharedConfig = require(\"@acdh-oeaw/prettier-config\");\n\nconst config = {\n\t...sharedConfig,\n\toverrides: [\n\t\t{\n\t\t\tfiles: [\"*.svg\"],\n\t\t\toptions: {\n\t\t\t\tparser: \"html\",\n\t\t\t},\n\t\t},\n\t],\n};\n\nmodule.exports = config;\n```\n\n## How to use\n\nAdd a script to `package.json`:\n\n```json\n{\n\t\"scripts\": {\n\t\t\"format:check\": \"prettier . --cache --check --ignore-path .gitignore\",\n\t\t\"format:fix\": \"npm run format:check -- --write\"\n\t}\n}\n```\n\nYou can then run `npm run format:check` to check code formatting, and `npm run format:fix` to\nauto-fix formatting errors.\n\n## How to auto-format with Git hooks\n\n```bash\nnpm install -D lint-staged simple-git-hooks\n```\n\nTo auto-format on every Git commit, and to check formatting on every Git push, add the following to\n`package.json`:\n\n```json\n{\n\t\"scripts\": {\n\t\t\"format:check\": \"prettier . --cache --check --ignore-path .gitignore\",\n\t\t\"format:fix\": \"npm run format:check -- --write\",\n\t\t\"prepare\": \"npm run setup\",\n\t\t\"setup\": \"simple-git-hooks || exit 0\",\n\t\t\"validate\": \"npm run format:check\"\n\t},\n\t\"lint-staged\": {\n\t\t\"*\": \"prettier --cache --ignore-unknown --write\"\n\t},\n\t\"simple-git-hooks\": {\n\t\t\"pre-commit\": \"npx lint-staged\",\n\t\t\"pre-push\": \"npm run validate\"\n\t}\n}\n```\n\n## Editor integrations\n\n### VS Code\n\nInstall the VS Code `prettier-vscode` plugin by pressing <kbd>Ctrl</kbd>+<kbd>P</kbd> and pasting\nthe following command:\n\n```\next install esbenp.prettier-vscode\n```\n\nAlso, make sure to add `prettier-vscode` to the list of recommended plugins for your project in\n`.vscode/extensions.json`:\n\n```json\n{\n\t\"recommendations\": [\"esbenp.prettier-vscode\"]\n}\n```\n\nYou may also want to enable \"Format on Save\" in `.vscode/settings.json`:\n\n```json\n{\n\t\"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n\t\"editor.formatOnSave\": true\n}\n```\n\n### WebStorm\n\nThe WebStorm default installation should already contain the\n[JetBrains Prettier plugin](https://plugins.jetbrains.com/plugin/10456-prettier).\n\nIf you install this acdh config via the embedded terminal (<kbd>Alt</kbd>+<kbd>F12</kbd>) as\nsuggested [here](#how-to-install) the plugin should configure itself automagically. Alternately you\nmay adjust its settings via the _Settings/Preferences_ dialog\n(<kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>S</kbd>), under _Languages & Frameworks | JavaScript |\nPrettier_ . It's highly recommended to check both _On code reformat_ and _On Save_ there as well.\n(See [this section](#how-to-auto-format-with-git-hooks) for alternate/additional automation\npossibilities).\n\nBy default the set [glob pattern](https://github.com/isaacs/node-glob#glob-primer) will only match\nJavaScript, TypeScript, JSX and TSX files. Depending on your stack it's recommended to extend it to\n\n```glob\n{**/*,*}.{js,json,ts,jsx,tsx,vue}\n```\n\nTo ship this config with your project, commit/include the `prettier.xml` in your `.idea` config\nfolder:\n\n```xml\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"PrettierConfiguration\">\n    <option name=\"myRunOnSave\" value=\"true\" />\n    <option name=\"myRunOnReformat\" value=\"true\" />\n    <option name=\"myFilesPattern\" value=\"{**/*,*}.{js,json,ts,jsx,tsx,vue,css,scss,sass}\" />\n  </component>\n</project>\n```\n\nFor more detailed instructions see the WebStorm docs on\n[Prettier](https://www.jetbrains.com/help/webstorm/prettier.html) and\n[Vue.js formatting](https://www.jetbrains.com/help/webstorm/vue-js.html#ws_vue_formatting)\n\n## How to adjust tab width\n\nWe use tabs, not spaces, for indentation because of their accessibility benefits. Users are then\nfree to configure their preferred tab width in their text editors.\n\nAdding an [`.editorconfig`](https://editorconfig.org/) file to the root of a project provides a way\nto adjust the tab width, which is understood by most text editors automatically (VS Code requires a\n[separate plugin](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)).\n\nIn VS Code, you can adjust the tab width by changing the following in a user's `settings.json`:\n\n```json\n{\n\t\"editor.insertSpaces\": false,\n\t\"editor.tabSize\": 2\n}\n```\n\nOn <https://github.com> you can adjust the tab width in the\n[appearance settings](https://github.com/settings/appearance#tab-size-heading).\n\nIn your terminal, you should be able to use the `tabs` command to set tab width, e.g. `tabs 4`.\n\nFor the output of `git diff`, you need to adjust the tab width of your pager. When using the default\n`less`, you can set `git config --global core.pager 'less -x4'`.\n","readmeFilename":"readme.md"}