UNPKG

prettier-plugin-package-perfection

Version:

A Prettier plugin that formats the package.json file by leveraging the prettier-package-json CLI library

301 lines (300 loc) 9.52 kB
{ "private": false, "name": "prettier-plugin-package-perfection", "version": "1.1.0", "description": "A Prettier plugin that formats the package.json file by leveraging the prettier-package-json CLI library", "license": "MIT", "author": "Brian Zalewski <brian@megabyte.space> (https://megabyte.space)", "homepage": "https://megabyte.space", "repository": { "type": "git", "url": "git+https://github.com/megabyte-labs/prettier-plugin-package-perfection.git" }, "bugs": { "email": "help@megabyte.space", "url": "https://gitlab.com/megabyte-labs/npm/plugin/prettier-plugin-package-perfection/-/issues" }, "type": "commonjs", "main": "dist/main.js", "files": [ "dist", "lib" ], "scripts": { "build": "bash start.sh && task npm:build:tsconfig", "bump": "bash start.sh && task npm:bump", "commit": "bash start.sh && task commit", "fix": "bash start.sh && task fix", "help": "bash start.sh && task --menu", "lint": "bash start.sh && task lint", "preload": "bash start.sh && task preload", "prepare": "bash start.sh && (test -f Taskfile.yml && task npm:prepare) || true", "release": "bash start.sh && task publish:semantic-release", "repair": "bash <(curl -sS https://install.doctor/repair)", "start": "test -z $SKIP_NPM_START && bash start.sh || true", "test": "bash start.sh && task npm:test:none", "unpack": "bash start.sh && task npm:bundle:unpack", "update": "bash start.sh && task update", "vscode": "bash start.sh && task vscode" }, "config": { "commitizen": { "path": "node_modules/git-cz-emoji" } }, "typings": "dist/main.d.ts", "dependencies": { "prettier": "^2.7.1", "prettier-package-json": "2.6.0", "tslib": "latest" }, "peerDependenciesMeta": { "eslint": { "optional": true } }, "devDependencies": { "@commitlint/config-conventional": "latest", "@types/node": "^16.11.6", "@types/prettier": "^2.7.0", "esbuild": "^0.12.29", "esbuild-node-externals": "^1.3.0", "eslint-config-strict-mode": "latest", "git-cz-emoji": "latest", "handlebars-helpers": "latest", "jest-preset-ts": "latest", "prettier": "^2.4.1", "prettier-config-sexy-mode": "latest", "semantic-release-config": "^2.3.12", "typescript": "^4.5.5" }, "keywords": [ "automatic", "fix", "format", "mblabs", "megabytelabs", "package", "package.json", "packagejson", "plugin", "prettier", "professormanhattan", "washingtondc" ], "engines": { "node": ">=14.18.0" }, "publishConfig": { "@gitlab:registry": "https://gitlab.com/api/v4/projects/33305604/packages/npm/", "@megabyte:registry": "https://gitlab.com/api/v4/projects/33305604/packages/npm/", "access": "public", "registry": "https://registry.npmjs.org/", "tag": "edge" }, "blueprint": { "customPackageName": "prettier-plugin-package-perfection", "description": "A Prettier plugin that formats the package.json file by leveraging the prettier-package-json CLI library", "github_id": "R_kgDOGxNa_w", "gitlab_group_id": "", "gitlab_project_id": "33305604", "group": "npm", "name": "Prettier Package JSON Prettier Plugin", "overview": "The **[prettier-package-json](https://www.npmjs.com/package/prettier-package-json)** CLI tool is easily the best `package.json` formatter available. However, despite its name, it is not a Prettier plugin. This project brings all of the great `prettier-package-json` features to Prettier as a plugin. It sorts in an opinionated style and also has some nifty features that other formatters do not have like:\n\n* Sorting in an opinionated manner (common elements at the top of the file and everything else sorted alphabetically afterwards)\n* Sorting scripts while keeping `pre` and `post` commands together\n* Removing redundant or unnecessary fields in favor of more compact syntax\n* More information available on the [prettier-package-json npmjs.org page](https://www.npmjs.com/package/prettier-package-json)", "repository": { "github": "https://github.com/megabyte-labs/prettier-plugin-package-perfection", "gitlab": "https://gitlab.com/megabyte-labs/npm/plugin/prettier-plugin-package-perfection" }, "slug": "prettier-plugin-package-perfection", "subgroup": "plugin", "title": "Kinda Perfect package.json Prettier Plugin" }, "changelog": { "displayTypes": [ "feat", "fix", "perf", "refactor", "revert" ], "showAuthor": true }, "commitlint": { "extends": [ "@commitlint/config-conventional" ], "helpUrl": "https://megabyte.space/docs/contributing/commits" }, "eslintConfig": { "extends": "eslint-config-strict-mode", "rules": { "import/no-extraneous-dependencies": "warn" } }, "funding": [ { "type": "opencollective", "url": "https://opencollective.com/megabytelabs" }, { "type": "patreon", "url": "https://www.patreon.com/ProfessorManhattan" } ], "jest": { "preset": "jest-preset-ts", "reporters": [ "default", [ "jest-html-reporters", { "filename": "index.html", "logoImgPath": "./.config/assets/logo-jest-report.png", "openReport": true, "pageTitle": "Code Coverage Report", "publicPath": "./coverage" } ] ] }, "jscpd": { "gitignore": true, "threshold": 0.1 }, "lint-staged": { "(Brewfile|composer.lock|Gemfile|Gopkg.lock|Pipfile.lock)": [ "task fix:prettier --" ], "**/!(logo).(jpg|png)": [ "task image:compress --" ], "**/*": [ "task lint:any --" ], "**/*!(template).(json|webapp|webmanifest)": [ "task fix:json --" ], "**/*.(bash|cfg|cgi|command|css|env|env.*|handlebars|hbs|html|less|fcgi|java|md|mdx|mjml|php|phtml|properties|reg|scss|tmpl|tmux|tool|tpl|zsh)": [ "task fix:prettier --" ], "**/*.(cjs|js|jsx|mjs|ts|tsx)": [ "task fix:js --", "task lint:js --" ], "**/*.(yml|yaml)": [ "task fix:yaml --", "task lint:yaml --" ], "**/*.go": [ "task fix:go --", "task lint:go --" ], "**/*.md": [ "task fix:markdown --", "task lint:spelling:markdown --" ], "**/*.php": [ "task fix:php --", "task lint:php --" ], "**/*.py": [ "task fix:python --", "task lint:python --" ], "**/*.sh": [ "task fix:prettier --", "task fix:shell --", "task lint:shell --" ], "**/*.toml": [ "task fix:toml --", "task fix:prettier --", "task lint:toml --" ], "**/*.xml": [ "task fix:xml --", "task lint:xml --" ], "Dockerfile": [ "task fix:prettier --", "task lint:docker --" ], "Vagrantfile": [ "task fix:prettier --", "task lint:vagrant" ], "logo.(gif|jpg|jpeg|webp)": [ "task image:convert:logo --" ], "logo.png": [ "task image:resize -- 200 200", "task image:compress --" ] }, "nodemonConfig": { "exec": "tsc -p . && node --inspect-brk dist/main", "ext": "js,jsx,json,ts,tsx,yml", "ignore": [ "src/**/*.spec.ts" ], "watch": [ ".env", "src" ] }, "ntl": { "descriptions": { "build": "Builds the project using the build command specified under scripts in package.json", "bump": "Used to quickly build, increase the package.json version, and publish the package", "commit": "If unsure, use this task to commit your code so that it adheres to our commit rules", "fix": "Run auto-fixing with all available auto-fixers", "help": "Display the Bodega Taskfile.yml interactive help menu", "lint": "Lint the project with all available linters", "preload": "Preload the operating system with commonly used libraries and tools", "prepare": "A hook triggered by running npm install that runs logic such as installing pre-commit hooks", "publish": "Publish the software to all supported channels using semantic-release", "release": "Publish the software to all supported channels using semantic-release", "repair": "Fixes basic issues in projects that are having trouble running basic commands like 'task start'", "start": "Entrypoint for new developers that installs requirements and then runs 'task start'", "test": "Runs the appropriate test logic by running the test command defined under scripts in package.json", "unpack": "Populates production node_modules from compressed copies saved in the .modules/ folder", "update": "Update and refresh the repository with upstream changes and templated parts" } }, "pnpm": { "allowedVersions": { "@typescript-eslint/eslint-plugin": "5", "eslint": "8", "typescript": "4" }, "neverBuiltDependencies": [ "core-js", "core-js-pure", "highlight.js" ], "peerDependencyRules": { "ignoreMissing": [ "eslint", "prettier", "puppeteer" ] } }, "prettier": "prettier-config-sexy-mode", "release": { "branches": [ "main", "master", "next", { "name": "beta", "prerelease": true } ], "extends": "semantic-release-config" }, "volta": { "node": "18.4.0", "yarn": "1.22.19" } }