{"_id":"@bjervis/eslint-plugin-redundant-stack","_rev":"5-59c6b7e9bed9376848c04cce8d7d336d","name":"@bjervis/eslint-plugin-redundant-stack","dist-tags":{"latest":"0.0.8","test-snapshot":"0.0.0-test-snapshot-20231026025900"},"versions":{"0.0.1":{"name":"@bjervis/eslint-plugin-redundant-stack","version":"0.0.1","description":"Warn on <Stack> elements that only have a single child","main":"parsed.js","author":{"name":"Ben Jervis"},"license":"MIT","devDependencies":{"eslint":"7.29.0"},"_id":"@bjervis/eslint-plugin-redundant-stack@0.0.1","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-aFJH822No2Qr80xgSllYl7ms3EpuSINjXr1EaN6iHrvHSuC+Kf0wYSfVHaK6IM2Eek46oE/spL0jcFhxFjtpqg==","shasum":"c17768fd9b5c3986b268f9a9b1d6e76c5ef7efe5","tarball":"https://registry.npmjs.org/@bjervis/eslint-plugin-redundant-stack/-/eslint-plugin-redundant-stack-0.0.1.tgz","fileCount":4,"unpackedSize":4654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0xpDCRA9TVsSAnZWagAAs3YQAIcY5xTQ30O34V6V6Xtx\ngx4HUk352QQoQ2JnHqig/Ryd2AhXTIjZ1jwnG6n2bEo6sKKrktudV3qKDWXI\nx0MIo2vboLsuCC634/wvAsoXki3WcycVu3ggRtkPjnNtSCeXeSYtXRzR7/wN\nVpZg8XZ856/k6fQ70lTiXSimja7mkIG1JLZ8oc82qK4sJo0oGpvhrCPwkwOb\n6rozSIhfrwFLmzSx3Z+snBP1EZtzDRXUr4f3ti0Uxt+dZ6bKHFuG5mO4Xu3M\nLuraYUuiUUss+WooNWuGFNe9dybTNxZmq2kEAdx2Rs2PgpqgQsQt64lafvyN\nVvUWelJXLexD0R5QB+j+NWSsLGPhlK9MoScw5rvRTk/iVvSN15s6Kvqoj9Qe\npeIGSzI8rIwWIe3jQ03WcP+nVTLW379yEusSDG0rARuM/A+wb+f/I0ehJJF6\nk+briGurt6y34EFqOuJHZN3VC/1Z/JisECOoRmAX/Y95vSWV1k022uFy0lx/\n64zUbu5TXOWHHl1NTFWkx2TMv6X23GDuCNQPQgXCPaqdO53qDLG7efDHrszy\nTY6cvyA5gwTh2MdgIBryQOvU0LqaxqiHZGfJdRLePa/R16uz5cnB41s1Q0H/\nU848EJ88+wkyZC/y90emL9N7XO6syQbw2TaryTY/3WrbWOhm/ld5lUxqffWD\nJuFz\r\n=MTX0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIQCkGKFVznTPSg7MznRZGtEL5f5c90dDvcWf/dbwVepd+gIfHNCeHceMBiu5B964gYUO4W+JRu2mo2kwU65U3EyoFQ=="}]},"_npmUser":{"name":"bjervis","email":"bjervis@seek.com.au"},"directories":{},"maintainers":[{"name":"bjervis","email":"bjervis@seek.com.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-redundant-stack_0.0.1_1624447554944_0.8759328880378396"},"_hasShrinkwrap":false},"0.0.3":{"name":"@bjervis/eslint-plugin-redundant-stack","version":"0.0.3","description":"Warn on <Stack> elements that only have a single child","main":"lib/check-stack-children.js","author":{"name":"Ben Jervis"},"license":"MIT","scripts":{"build":"babel src -d lib","test":"yarn build && node test/check-stack-children.test.js","publish":"npm publish --access public"},"devDependencies":{"@babel/cli":"7.14.5","@babel/core":"7.14.6","eslint":"7.29.0"},"_id":"@bjervis/eslint-plugin-redundant-stack@0.0.3","dist":{"shasum":"d5c7d595e0cdcde01bda30a54993d1f94fcb1720","integrity":"sha512-UtGI/Qth4t3TrwBh431T5yx0hP65miOeKoUK6mvF4ajBg7z1DxR7fckpn/Ya8Hop8wFJWuAmIYV55/aWwHtL4Q==","tarball":"https://registry.npmjs.org/@bjervis/eslint-plugin-redundant-stack/-/eslint-plugin-redundant-stack-0.0.3.tgz","fileCount":12,"unpackedSize":6545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0yZ8CRA9TVsSAnZWagAAzqsP/j5eWju56MCafbR6D1aE\nTdNvHFz14grMPx8e33Gj4NxNzE9huUkac48pPNDTMgEd8tPfE6Ssv8UTD3Nk\nOsiiP7OnKZJp3IwMP0AnKYrKnzQ10AspHH4yWn4ilfkjiXyjKE8hNnyrVId7\nFYYTH9k8SPQL954m0mVhS2NcPi8SozD1/jB0jjfLUeP6lW9SBkRSkTxt1T7n\nZTXBVKq/+zZBIsPE/1KEyw+GheFj7nKE5XB3uytcbsFeX79DmN2qVgGBlyec\nBuyse/2mOAa93rvoEJRCzqy/oYtVRN8zfITLO5s+6mCnZ5f5a0dAthy0/rbE\nNHxzkSqDap/oaTy1TH+bmqNF32ov0GkU6zPO+rsq227IJ9r5yHjCOyo/PYHb\nX8kVBQAYNxwMMo2Vj0GenT/F0Z9qUjOAcU4ZjFZDKF34SWkvNdB4omJ8n7in\nLRnNEt1CC8QH/bkVC+4LPnY/mZdxX6rufRl2Zo+fSw3Tky1g81dFur7skWky\nwxIgsMTPC8z9iCLnt8970h8J34K6HRDvKiboL63PsxN3gHhnCi71jNoVWUWb\nMh11Cdb4JyyxJLKyLFUfWZjr7aLeOckSX4gmw1NeA7lNPDNM9+ZB5l/MK7Ew\nbqbKwGKTsalzv2h2+9/1rY3sBn+k2yy3Lt5/pn2r6x+pt20/bWxOh4HDCyPR\nkKO4\r\n=JDYm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF++A03jkGceacL6IhQLXLMSvXWfjtyK9CkwHLU8hQ0zAiBUjdbI+vKgWOeDp+VVet3LENDy1s5rkxcGRr55PnnhqA=="}]},"_npmUser":{"name":"bjervis","email":"bjervis@seek.com.au"},"directories":{},"maintainers":[{"name":"bjervis","email":"bjervis@seek.com.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-redundant-stack_0.0.3_1624450684578_0.3464911588420332"},"_hasShrinkwrap":false},"0.0.4":{"name":"@bjervis/eslint-plugin-redundant-stack","version":"0.0.4","description":"Warn on <Stack> elements that only have a single child","main":"lib/check-stack-children.js","author":{"name":"Ben Jervis"},"license":"MIT","scripts":{"build":"babel src -d lib","test":"yarn build && node test/check-stack-children.test.js","publish":"npm publish --access public"},"devDependencies":{"@babel/cli":"7.14.5","@babel/core":"7.14.6","@babel/preset-env":"7.14.7","eslint":"7.29.0"},"_id":"@bjervis/eslint-plugin-redundant-stack@0.0.4","dist":{"shasum":"eec321dde52d399369b683dd644cc62213343d30","integrity":"sha512-9B4XKcT2kFovJWaIichQEVIFGMhB1cICM7jWJqzPsVoHvWEMwSW8PrlbfcrH5asas6aKuy2jzGVBJ7+g++2OGA==","tarball":"https://registry.npmjs.org/@bjervis/eslint-plugin-redundant-stack/-/eslint-plugin-redundant-stack-0.0.4.tgz","fileCount":13,"unpackedSize":8444,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0y7+CRA9TVsSAnZWagAAF7QP/0v1RpSPvXj7IbYaY7xS\nXIttd3r9/sEQuwP+1WvMLPF+I2CzThUYGMmzHNuYZDlEQEk+efU45cLqSKH+\nMk0ctwCJxTENlIDX1YC4JCyNc+pagHSGOKdN3MaJC926/faJa2czxp1nsYHb\nIlu4VSaHYeIuX9Ah+b1+TYlFok5VscLN5CJPQr4v8mrSGodtbnHJyYHEaGoW\nYp52v+/EYGbpZbJWRKLwmA14UjHwLS4qrotMdr/ZrD2Ha1ZIxqlAgpWGurdi\nUc4yTH86IYaBYcpqQHasEBrfD9RnTi1NSJ6PFvd39vD5MxS/5yz6UX7fQbNn\nWSY2Y16lh0ih7tloSkEiRYHgGHbf3Tx43hIdZhmq33jKcVXW3KgUBEkjvp6O\n9PZzjuAi8ruXo7/E2dssjPAQoA7fL3mfzzmmKdhJigvg5/OkAUC/ApIzgDLB\nrFrM9Pks94JmhkCO4K+pKGQw2taxCFQ6SDL4yNWuLTDp2r2OUXWXaCWUIoPM\n9ZAMgqAIL3/I/rBQhqKqxxgDzgNfe0zt84JF1Q3i9DaKNYmzLrjIEqfqCCVU\n04eCakyHn4ds53vId4jB/4QJh3yLyrZ+rIF85srksL1dISp2aO7vOoiTGRD6\nqx1Qj2ORiJA1WjD2P5YgNKiX6J8WoY6XkZrGTRWiEoWVcQ4w0MEnp3Eiinx+\ni1fc\r\n=eQqm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEPWLK25ycY5PWXsgbzFUNaCdx1Tq5EDZ6qcyVEqetM4AiEA5Mt1tFb2YFjp4zPdqNnHSs5kTLMjnybHo/Pg4s1qCUg="}]},"_npmUser":{"name":"bjervis","email":"bjervis@seek.com.au"},"directories":{},"maintainers":[{"name":"bjervis","email":"bjervis@seek.com.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-redundant-stack_0.0.4_1624452862398_0.4562326723244903"},"_hasShrinkwrap":false},"0.0.8":{"name":"@bjervis/eslint-plugin-redundant-stack","version":"0.0.8","description":"Warn on <Stack> elements that only have a single child","main":"lib/check-stack-children.js","author":{"name":"Ben Jervis"},"license":"MIT","scripts":{"build":"babel src -d lib","test":"yarn build && node test/check-stack-children.test.js","semantic-release":"semantic-release"},"devDependencies":{"@babel/cli":"7.14.5","@babel/core":"7.14.6","@babel/preset-env":"7.14.7","eslint":"7.29.0","semantic-release":"^17.4.4"},"repository":{"type":"git","url":"git+https://github.com/benjervis/eslint-plugin-redundant-stack.git"},"gitHead":"8ca0f796f74e03435de8b15725b61724c9760cb8","bugs":{"url":"https://github.com/benjervis/eslint-plugin-redundant-stack/issues"},"homepage":"https://github.com/benjervis/eslint-plugin-redundant-stack#readme","_id":"@bjervis/eslint-plugin-redundant-stack@0.0.8","_nodeVersion":"14.17.1","_npmVersion":"7.18.1","dist":{"integrity":"sha512-0KOboTKqGdqenQz11KHGW8BG+8mhampc9nLZbVnaqEIqXyNVICNefzsgThryY/vUL0crorM8+sc3pcqGCin0rg==","shasum":"b80f27af45619ecbdf63ca7c8602efaf3a5ceb53","tarball":"https://registry.npmjs.org/@bjervis/eslint-plugin-redundant-stack/-/eslint-plugin-redundant-stack-0.0.8.tgz","fileCount":7,"unpackedSize":8837,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1HBzCRA9TVsSAnZWagAAqQgP/A3QcUBu0Je4k3kxjBgv\nxtKLbQ+55SwqAwZXleqvqWub2EJko30gC9bix2emuckaFx1cRqR0Ur+0eAkS\n7R/14HCkIUqhTWbVwr93vE9//+PxxJQSlL1iXpwrExUieI8lMy450I2otKOX\ncnghzWxocljheO+bbBhbk5jssn/X677oFup1kfRyhQTIN+eeOR+LDV4GWNYJ\n0bRgDhuGYZciomTK0MQTXvlPyvnoVux5/pnBVzODoaP0AfFNlIGs7LLlW3EX\nvgkR50tALkCo8MleMGL40RQFpHkZ9mBpHs4NMdQAXMsw6owshUDUI4ZHkGcg\nJXficLryi8WYRbwWVgxwNeVB8iJkzV5aQuKj7l4pcgFH3Trl68vtt15JsCRA\nKk48JPsbEd+CH+UD5TvcQAAi7+eLR672QbIBuGjn6A+HZ4eLU0Dc5b3gv6/N\nw85edEs3tFlQ8RVeCjOIxFHjZJh2QFcMbGeWbmvOsBbzsk4GalxI/do4YvSo\n8gnn//QaOm4tQKnWq5OaY0g5hnhjybf+sg/FFGfP81d3so3BpbLyDGW1l5rT\nttFR0behJhwxceWpsA/QcZqaYv3ORKWEsevOmDXMEFsWMt58PD6soylFPerm\ncx8SuvlAdw456/CYdyLyl2qHooYvSd4KjPfuwISMV9WH8Gl5EOSs49egK2vR\nZ9Lu\r\n=3fmH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAaC7dLNvzcX/tb3IJD1wHnb8tAqftvCpGHcx5ANZ9thAiAjjBB6QwCd+OeOf+gi3XAejbGCvsn5XjSh6ga+s5xiNg=="}]},"_npmUser":{"name":"bjervis","email":"bjervis@seek.com.au"},"directories":{},"maintainers":[{"name":"bjervis","email":"bjervis@seek.com.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-redundant-stack_0.0.8_1624535155124_0.964648343035041"},"_hasShrinkwrap":false},"0.0.0-test-snapshot-20231026025900":{"name":"@bjervis/eslint-plugin-redundant-stack","version":"0.0.0-test-snapshot-20231026025900","description":"Warn on <Stack> elements that only have a single child","main":"lib/check-stack-children.js","author":{"name":"Ben Jervis"},"license":"MIT","devDependencies":{"@babel/cli":"7.23.0","@babel/core":"7.23.2","@babel/preset-env":"7.23.2","@changesets/cli":"^2.26.2","@types/eslint":"^8.44.6","@types/estree":"^1.0.3","eslint":"8.52.0","eslint-config-seek":"^12.0.0","eslint-plugin-import":"^2.29.0","jest":"^29.7.0","prettier":"^3.0.3","tsm":"^2.3.0","typescript":"^5.2.2"},"repository":{"type":"git","url":"git+https://github.com/benjervis/eslint-plugin-redundant-stack.git"},"packageManager":"pnpm@8.9.2","scripts":{"build":"babel src -d lib","test":"tsm test/check-stack-children.test.ts","tsc":"tsc","lint:prettier":"prettier --cache --list-different .","format:prettier":"prettier --cache --write .","lint:eslint":"eslint --cache .","format:eslint":"eslint --cache --fix .","format":"pnpm run format:prettier && pnpm run format:eslint","lint":"pnpm run lint:prettier && pnpm run lint:eslint && pnpm run tsc","prepare-release":"pnpm build","release":"pnpm prepare-release && changeset publish"},"readme":"# eslint-plugin-redundant-stack\n\nDesigned to work with projects using [braid-design-system](https://github.com/seek-oss/braid-design-system), this plugin detects when a [Stack](https://seek-oss.github.io/braid-design-system/components/Stack) element is redundant.\n\nBraid Stacks are used to manage the vertical spacing between elements. If you have only a single element inside a Stack (or none), there's nothing for it to be spaced from, and so you don't need to include a Stack.\n\nUsually this comes about because you did need a Stack originally, but refactored away the other child elements, not realising there was only one left.\n\n## Examples\n\n```jsx\n// ok\n<Stack space=\"medium\">\n  <Text>First item</Text>\n  <Text>Second item</Text>\n</Stack>\n```\n\n```jsx\n// also ok, because it will generate several children\n<Stack space=\"large\">\n  {jobs.map((job) => (\n    <JobsCard job={job} />\n  ))}\n</Stack>\n```\n\n```jsx\n// error - single child\n<Stack space=\"medium\">\n  <Text>Single item</Text>\n</Stack>\n```\n\n```jsx\n// error - empty\n<Stack space=\"medium\"></Stack>\n```\n\n## Usage\n\n```bash\npnpm add -D @bjervis/eslint-plugin-redundant-stack\n```\n\nThen in your eslint config\n\n```\nplugins: ['@bjervis/redundant-stack'],\nrules: {\n  '@bjervis/redundant-stack/no-redundant-stack': 2,\n},\n```\n\nIf you're using Braid, you're probably also using [sku](https://github.com/seek-oss/sku), so:\n\n```js\n// sku.config.js\nmodule.exports = {\n  ...,\n  dangerouslySetESLintConfig: (skuConfig) => ({\n    ...skuConfig,\n    plugins: ['@bjervis/redundant-stack'],\n    rules: {\n      '@bjervis/redundant-stack/no-redundant-stack': 2,\n    },\n  }),\n}\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/benjervis/eslint-plugin-redundant-stack/issues"},"homepage":"https://github.com/benjervis/eslint-plugin-redundant-stack#readme","_id":"@bjervis/eslint-plugin-redundant-stack@0.0.0-test-snapshot-20231026025900","_integrity":"sha512-Ag0nV1+s6+7IcTWv7s7Zzwm41WVKSyzSVYZyCgphI04szVYkzjS0Cm8CHdH4wTGNAc6m0xokRTlr3BMc07aKRg==","_resolved":"/tmp/2af3b213f98d868ba7d6d84952eb31cb/bjervis-eslint-plugin-redundant-stack-0.0.0-test-snapshot-20231026025900.tgz","_from":"file:bjervis-eslint-plugin-redundant-stack-0.0.0-test-snapshot-20231026025900.tgz","_nodeVersion":"20.8.1","_npmVersion":"10.1.0","dist":{"integrity":"sha512-Ag0nV1+s6+7IcTWv7s7Zzwm41WVKSyzSVYZyCgphI04szVYkzjS0Cm8CHdH4wTGNAc6m0xokRTlr3BMc07aKRg==","shasum":"59eb59bb2c3a9588fe800f94850b6584674536c9","tarball":"https://registry.npmjs.org/@bjervis/eslint-plugin-redundant-stack/-/eslint-plugin-redundant-stack-0.0.0-test-snapshot-20231026025900.tgz","fileCount":18,"unpackedSize":11765,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGx9W2A+vifcZAzRcuwffDZxyvF+ZFiXopWtu28ZamD0AiEA+eiJs5pcGhWj0UXAhrVk7iZ9SqhHKuqiC/x3QOv8bxE="}]},"_npmUser":{"name":"bjervis","email":"bjervis@seek.com.au"},"directories":{},"maintainers":[{"name":"bjervis","email":"bjervis@seek.com.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-redundant-stack_0.0.0-test-snapshot-20231026025900_1698289147047_0.13386620022002127"},"_hasShrinkwrap":false}},"time":{"created":"2021-06-23T11:25:54.890Z","0.0.1":"2021-06-23T11:25:55.058Z","modified":"2023-10-26T02:59:07.478Z","0.0.3":"2021-06-23T12:18:04.711Z","0.0.4":"2021-06-23T12:54:22.724Z","0.0.8":"2021-06-24T11:45:55.291Z","0.0.0-test-snapshot-20231026025900":"2023-10-26T02:59:07.280Z"},"maintainers":[{"name":"bjervis","email":"bjervis@seek.com.au"}],"description":"Warn on <Stack> elements that only have a single child","author":{"name":"Ben Jervis"},"license":"MIT","readme":"","readmeFilename":"","homepage":"https://github.com/benjervis/eslint-plugin-redundant-stack#readme","repository":{"type":"git","url":"git+https://github.com/benjervis/eslint-plugin-redundant-stack.git"},"bugs":{"url":"https://github.com/benjervis/eslint-plugin-redundant-stack/issues"}}