this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

sort-package-json → eslint-plugin-package-json

+284 -12
+13 -7
eslint.config.js
··· 1 + import {defineConfig} from 'eslint/config'; 2 + import packageJson from 'eslint-plugin-package-json'; 1 3 import xo from 'xo'; 2 4 3 - export default xo.xoToEslintConfig([ 4 - { 5 - prettier: 'compat', 6 - rules: { 7 - 'no-await-in-loop': 'off', 8 - 'unicorn/no-process-exit': 'off', 5 + export default defineConfig([ 6 + packageJson.configs.recommended, 7 + packageJson.configs.stylistic, 8 + ...xo.xoToEslintConfig([ 9 + { 10 + prettier: 'compat', 11 + rules: { 12 + 'no-await-in-loop': 'off', 13 + 'unicorn/no-process-exit': 'off', 14 + }, 9 15 }, 10 - }, 16 + ]), 11 17 ]);
+263 -1
package-lock.json
··· 29 29 }, 30 30 "devDependencies": { 31 31 "eslint": "^9.27.0", 32 + "eslint-plugin-package-json": "^0.83.0", 32 33 "prettier": "^3.5.3", 33 - "sort-package-json": "^3.2.1", 34 + "prettier-plugin-packagejson": "^2.5.19", 34 35 "xo": "^1.0.0" 35 36 }, 36 37 "engines": { ··· 39 40 "funding": { 40 41 "url": "https://buymeacoffee.com/patrikcsak" 41 42 } 43 + }, 44 + "node_modules/@altano/repository-tools": { 45 + "version": "2.0.1", 46 + "resolved": "https://registry.npmjs.org/@altano/repository-tools/-/repository-tools-2.0.1.tgz", 47 + "integrity": "sha512-YE/52CkFtb+YtHPgbWPai7oo5N9AKnMuP5LM+i2AG7G1H2jdYBCO1iDnkDE3dZ3C1MIgckaF+d5PNRulgt0bdw==", 48 + "dev": true, 49 + "license": "ISC" 42 50 }, 43 51 "node_modules/@babel/code-frame": { 44 52 "version": "7.27.1", ··· 1589 1597 "url": "https://github.com/chalk/chalk?sponsor=1" 1590 1598 } 1591 1599 }, 1600 + "node_modules/change-case": { 1601 + "version": "5.4.4", 1602 + "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", 1603 + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", 1604 + "dev": true, 1605 + "license": "MIT" 1606 + }, 1592 1607 "node_modules/ci-info": { 1593 1608 "version": "4.3.1", 1594 1609 "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz", ··· 1626 1641 "license": "MIT", 1627 1642 "engines": { 1628 1643 "node": ">=0.8.0" 1644 + } 1645 + }, 1646 + "node_modules/cliui": { 1647 + "version": "9.0.1", 1648 + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", 1649 + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", 1650 + "dev": true, 1651 + "license": "ISC", 1652 + "dependencies": { 1653 + "string-width": "^7.2.0", 1654 + "strip-ansi": "^7.1.0", 1655 + "wrap-ansi": "^9.0.0" 1656 + }, 1657 + "engines": { 1658 + "node": ">=20" 1629 1659 } 1630 1660 }, 1631 1661 "node_modules/color-convert": { ··· 2623 2653 "url": "https://github.com/sponsors/sindresorhus" 2624 2654 } 2625 2655 }, 2656 + "node_modules/eslint-fix-utils": { 2657 + "version": "0.4.0", 2658 + "resolved": "https://registry.npmjs.org/eslint-fix-utils/-/eslint-fix-utils-0.4.0.tgz", 2659 + "integrity": "sha512-nCEciwqByGxsKiWqZjqK7xfL+7dUX9Pi0UL3J0tOwfxVN9e6Y59UxEt1ZYsc3XH0ce6T1WQM/QU2DbKK/6IG7g==", 2660 + "dev": true, 2661 + "license": "MIT", 2662 + "engines": { 2663 + "node": "^20.19.0 || >=22.12.0" 2664 + }, 2665 + "peerDependencies": { 2666 + "@types/estree": ">=1", 2667 + "eslint": ">=8" 2668 + }, 2669 + "peerDependenciesMeta": { 2670 + "@types/estree": { 2671 + "optional": true 2672 + } 2673 + } 2674 + }, 2626 2675 "node_modules/eslint-formatter-pretty": { 2627 2676 "version": "6.0.1", 2628 2677 "resolved": "https://registry.npmjs.org/eslint-formatter-pretty/-/eslint-formatter-pretty-6.0.1.tgz", ··· 2869 2918 "eslint": "^9.3.0" 2870 2919 } 2871 2920 }, 2921 + "node_modules/eslint-plugin-package-json": { 2922 + "version": "0.83.0", 2923 + "resolved": "https://registry.npmjs.org/eslint-plugin-package-json/-/eslint-plugin-package-json-0.83.0.tgz", 2924 + "integrity": "sha512-TKuHtMkxh0NmMGA0F0UsKGAuUxtQAt+HyPpFwxn1OfxBLxOovZmaY/1gWOfB++PnFiN82c79X9yLNFHSLAEMqw==", 2925 + "dev": true, 2926 + "license": "MIT", 2927 + "dependencies": { 2928 + "@altano/repository-tools": "^2.0.1", 2929 + "change-case": "^5.4.4", 2930 + "detect-indent": "^7.0.2", 2931 + "detect-newline": "^4.0.1", 2932 + "eslint-fix-utils": "~0.4.0", 2933 + "package-json-validator": "~0.58.0", 2934 + "semver": "^7.7.3", 2935 + "sort-object-keys": "^2.0.0", 2936 + "sort-package-json": "^3.4.0", 2937 + "validate-npm-package-name": "^7.0.0" 2938 + }, 2939 + "engines": { 2940 + "node": "^20.19.0 || >=22.12.0" 2941 + }, 2942 + "peerDependencies": { 2943 + "eslint": ">=8.0.0", 2944 + "jsonc-eslint-parser": "^2.0.0" 2945 + } 2946 + }, 2947 + "node_modules/eslint-plugin-package-json/node_modules/sort-object-keys": { 2948 + "version": "2.0.1", 2949 + "resolved": "https://registry.npmjs.org/sort-object-keys/-/sort-object-keys-2.0.1.tgz", 2950 + "integrity": "sha512-R89fO+z3x7hiKPXX5P0qim+ge6Y60AjtlW+QQpRozrrNcR1lw9Pkpm5MLB56HoNvdcLHL4wbpq16OcvGpEDJIg==", 2951 + "dev": true, 2952 + "license": "MIT" 2953 + }, 2872 2954 "node_modules/eslint-plugin-prettier": { 2873 2955 "version": "5.5.4", 2874 2956 "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz", ··· 3565 3647 "license": "MIT", 3566 3648 "engines": { 3567 3649 "node": ">= 0.4" 3650 + } 3651 + }, 3652 + "node_modules/get-caller-file": { 3653 + "version": "2.0.5", 3654 + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 3655 + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 3656 + "dev": true, 3657 + "license": "ISC", 3658 + "engines": { 3659 + "node": "6.* || 8.* || >= 10.*" 3568 3660 } 3569 3661 }, 3570 3662 "node_modules/get-east-asian-width": { ··· 4747 4839 "dev": true, 4748 4840 "license": "MIT" 4749 4841 }, 4842 + "node_modules/jsonc-eslint-parser": { 4843 + "version": "2.4.1", 4844 + "resolved": "https://registry.npmjs.org/jsonc-eslint-parser/-/jsonc-eslint-parser-2.4.1.tgz", 4845 + "integrity": "sha512-uuPNLJkKN8NXAlZlQ6kmUF9qO+T6Kyd7oV4+/7yy8Jz6+MZNyhPq8EdLpdfnPVzUC8qSf1b4j1azKaGnFsjmsw==", 4846 + "dev": true, 4847 + "license": "MIT", 4848 + "peer": true, 4849 + "dependencies": { 4850 + "acorn": "^8.5.0", 4851 + "eslint-visitor-keys": "^3.0.0", 4852 + "espree": "^9.0.0", 4853 + "semver": "^7.3.5" 4854 + }, 4855 + "engines": { 4856 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 4857 + }, 4858 + "funding": { 4859 + "url": "https://github.com/sponsors/ota-meshi" 4860 + } 4861 + }, 4862 + "node_modules/jsonc-eslint-parser/node_modules/eslint-visitor-keys": { 4863 + "version": "3.4.3", 4864 + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", 4865 + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", 4866 + "dev": true, 4867 + "license": "Apache-2.0", 4868 + "peer": true, 4869 + "engines": { 4870 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 4871 + }, 4872 + "funding": { 4873 + "url": "https://opencollective.com/eslint" 4874 + } 4875 + }, 4876 + "node_modules/jsonc-eslint-parser/node_modules/espree": { 4877 + "version": "9.6.1", 4878 + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", 4879 + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", 4880 + "dev": true, 4881 + "license": "BSD-2-Clause", 4882 + "peer": true, 4883 + "dependencies": { 4884 + "acorn": "^8.9.0", 4885 + "acorn-jsx": "^5.3.2", 4886 + "eslint-visitor-keys": "^3.4.1" 4887 + }, 4888 + "engines": { 4889 + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" 4890 + }, 4891 + "funding": { 4892 + "url": "https://opencollective.com/eslint" 4893 + } 4894 + }, 4750 4895 "node_modules/jsx-ast-utils": { 4751 4896 "version": "3.3.5", 4752 4897 "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", ··· 5458 5603 "url": "https://github.com/sponsors/sindresorhus" 5459 5604 } 5460 5605 }, 5606 + "node_modules/package-json-validator": { 5607 + "version": "0.58.0", 5608 + "resolved": "https://registry.npmjs.org/package-json-validator/-/package-json-validator-0.58.0.tgz", 5609 + "integrity": "sha512-2l6UmK6eV6YcHhSu9RzxUY3Tve/MyqNOL7+1vTPRe8f2RdxT3L/sw2tlMNJEurwAT5D1frGbqbo0GPjb+uf9RQ==", 5610 + "dev": true, 5611 + "license": "MIT", 5612 + "dependencies": { 5613 + "semver": "^7.7.2", 5614 + "validate-npm-package-license": "^3.0.4", 5615 + "validate-npm-package-name": "^7.0.0", 5616 + "yargs": "~18.0.0" 5617 + }, 5618 + "bin": { 5619 + "pjv": "lib/bin/pjv.js" 5620 + }, 5621 + "engines": { 5622 + "node": "^20.19.0 || >=22.12.0" 5623 + } 5624 + }, 5461 5625 "node_modules/parent-module": { 5462 5626 "version": "1.0.1", 5463 5627 "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", ··· 5654 5818 }, 5655 5819 "engines": { 5656 5820 "node": ">=6.0.0" 5821 + } 5822 + }, 5823 + "node_modules/prettier-plugin-packagejson": { 5824 + "version": "2.5.19", 5825 + "resolved": "https://registry.npmjs.org/prettier-plugin-packagejson/-/prettier-plugin-packagejson-2.5.19.tgz", 5826 + "integrity": "sha512-Qsqp4+jsZbKMpEGZB1UP1pxeAT8sCzne2IwnKkr+QhUe665EXUo3BAvTf1kAPCqyMv9kg3ZmO0+7eOni/C6Uag==", 5827 + "dev": true, 5828 + "license": "MIT", 5829 + "dependencies": { 5830 + "sort-package-json": "3.4.0", 5831 + "synckit": "0.11.11" 5832 + }, 5833 + "peerDependencies": { 5834 + "prettier": ">= 1.16.0" 5835 + }, 5836 + "peerDependenciesMeta": { 5837 + "prettier": { 5838 + "optional": true 5839 + } 5657 5840 } 5658 5841 }, 5659 5842 "node_modules/pretty-ms": { ··· 7124 7307 "spdx-expression-parse": "^3.0.0" 7125 7308 } 7126 7309 }, 7310 + "node_modules/validate-npm-package-name": { 7311 + "version": "7.0.0", 7312 + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-7.0.0.tgz", 7313 + "integrity": "sha512-bwVk/OK+Qu108aJcMAEiU4yavHUI7aN20TgZNBj9MR2iU1zPUl1Z1Otr7771ExfYTPTvfN8ZJ1pbr5Iklgt4xg==", 7314 + "dev": true, 7315 + "license": "ISC", 7316 + "engines": { 7317 + "node": "^20.17.0 || >=22.9.0" 7318 + } 7319 + }, 7127 7320 "node_modules/web-worker": { 7128 7321 "version": "1.2.0", 7129 7322 "resolved": "https://registry.npmjs.org/web-worker/-/web-worker-1.2.0.tgz", ··· 7250 7443 "node": ">=0.10.0" 7251 7444 } 7252 7445 }, 7446 + "node_modules/wrap-ansi": { 7447 + "version": "9.0.2", 7448 + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", 7449 + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", 7450 + "dev": true, 7451 + "license": "MIT", 7452 + "dependencies": { 7453 + "ansi-styles": "^6.2.1", 7454 + "string-width": "^7.0.0", 7455 + "strip-ansi": "^7.1.0" 7456 + }, 7457 + "engines": { 7458 + "node": ">=18" 7459 + }, 7460 + "funding": { 7461 + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" 7462 + } 7463 + }, 7464 + "node_modules/wrap-ansi/node_modules/ansi-styles": { 7465 + "version": "6.2.3", 7466 + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", 7467 + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", 7468 + "dev": true, 7469 + "license": "MIT", 7470 + "engines": { 7471 + "node": ">=12" 7472 + }, 7473 + "funding": { 7474 + "url": "https://github.com/chalk/ansi-styles?sponsor=1" 7475 + } 7476 + }, 7253 7477 "node_modules/wsl-utils": { 7254 7478 "version": "0.1.0", 7255 7479 "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz", ··· 7336 7560 "license": "MIT", 7337 7561 "engines": { 7338 7562 "node": "^12.20.0 || ^14.13.1 || >=16.0.0" 7563 + } 7564 + }, 7565 + "node_modules/y18n": { 7566 + "version": "5.0.8", 7567 + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", 7568 + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", 7569 + "dev": true, 7570 + "license": "ISC", 7571 + "engines": { 7572 + "node": ">=10" 7573 + } 7574 + }, 7575 + "node_modules/yargs": { 7576 + "version": "18.0.0", 7577 + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.0.0.tgz", 7578 + "integrity": "sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==", 7579 + "dev": true, 7580 + "license": "MIT", 7581 + "dependencies": { 7582 + "cliui": "^9.0.1", 7583 + "escalade": "^3.1.1", 7584 + "get-caller-file": "^2.0.5", 7585 + "string-width": "^7.2.0", 7586 + "y18n": "^5.0.5", 7587 + "yargs-parser": "^22.0.0" 7588 + }, 7589 + "engines": { 7590 + "node": "^20.19.0 || ^22.12.0 || >=23" 7591 + } 7592 + }, 7593 + "node_modules/yargs-parser": { 7594 + "version": "22.0.0", 7595 + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", 7596 + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", 7597 + "dev": true, 7598 + "license": "ISC", 7599 + "engines": { 7600 + "node": "^20.19.0 || ^22.12.0 || >=23" 7339 7601 } 7340 7602 }, 7341 7603 "node_modules/yocto-queue": {
+4 -3
package.json
··· 21 21 "auto-terminal-profile": "cli.js" 22 22 }, 23 23 "scripts": { 24 - "format": "eslint --fix && npm run prettier -- --write && sort-package-json", 24 + "format": "eslint --fix && npm run prettier -- --write", 25 25 "prettier": "prettier .", 26 - "test": "eslint && npm run prettier -- --check && sort-package-json --check" 26 + "test": "eslint && npm run prettier -- --check" 27 27 }, 28 28 "dependencies": { 29 29 "@commander-js/extra-typings": "^14.0.0", ··· 40 40 }, 41 41 "devDependencies": { 42 42 "eslint": "^9.27.0", 43 + "eslint-plugin-package-json": "^0.83.0", 43 44 "prettier": "^3.5.3", 44 - "sort-package-json": "^3.2.1", 45 + "prettier-plugin-packagejson": "^2.5.19", 45 46 "xo": "^1.0.0" 46 47 }, 47 48 "engines": {
+4 -1
prettier.config.js
··· 1 1 /** 2 - * @see {@link https://github.com/xojs/xo#prettier} 3 2 * @type {import('prettier').Options} 4 3 */ 5 4 const config = { 5 + // https://github.com/xojs/xo#prettier 6 6 bracketSpacing: false, 7 7 singleQuote: true, 8 8 useTabs: true, 9 + 10 + // https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/tree/v0.83.0#usage-alongside-prettier 11 + plugins: ['prettier-plugin-packagejson'], 9 12 }; 10 13 11 14 export default config;