{"_id":"@core-fabrications/eslint-plugin","_rev":"2-14889ba84feb0072a3fe6f244455d568","name":"@core-fabrications/eslint-plugin","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@core-fabrications/eslint-plugin","version":"1.0.0","description":"ESLint for Core Fabrications based off some desired functionality","main":"index.js","author":{"name":"Core Fabrications","email":"engineering@corefabrications.com"},"license":"MIT","scripts":{"test":"ava","lint":"eslint .","release":"standard-version --first-release"},"devDependencies":{"ava":"^3.13.0","eslint":"^7.11.0","eslint-plugin-eslint-plugin":"^2.3.0","standard-version":"^9.0.0"},"dependencies":{"eslint-rule-composer":"^0.3.0"},"gitHead":"a31a0aec054649393254be6facb2a2d7c1033ab4","_id":"@core-fabrications/eslint-plugin@1.0.0","_nodeVersion":"14.2.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-DNlzzTaU4EqisYW++HkvL10PzjARpK4QO6C0WteSWlC7JLsMxPpsVCjg9CLlAaOuBRhIrKb5jiABorL6ObVWSg==","shasum":"327c6a1a51cd7b61219243bb8259e6d3151ab87d","tarball":"https://registry.npmjs.org/@core-fabrications/eslint-plugin/-/eslint-plugin-1.0.0.tgz","fileCount":12,"unpackedSize":12316,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpODPCRA9TVsSAnZWagAA6q0QAIn8Q3JFUqYQuWjJO0PY\nu0ieNUnIkjcpntwzc/hl0qv7x2KnAM/f2BvltpvyKDGD3yhYJueXyoOUqPO9\noun0rDWksu44OsDTpetZxBw+6n9ld1yr3ojolPQ+k+mj+VW+8ms7EB3Td6n6\nW/PJPwBtR9QQh6+d0hTkraescTw47uhcO5XW9OBhnRuI6RGW/uAo3hxLKWio\ngDDuN0KOzVpJmJWz1xswYzVMGSGAiOxgRLGtkUFu/qR53polcRmvU5sNO8Mz\nSCSRmNdFRLsfQ1dTCYjwj/3yFMA3HmlCh6RPrzkiSGRPlThl2cv1q7MlpaO5\nD43biSfCWSoreouIqMN+kxPmuH+IoUUV4hyHyTuJwbl2GthPTRQmqjCPKiND\naYw+nEuAorUDBGxdHvkLQC7zYhjbawbHaKwV4FfvCqjaSOnkGeWj8mndSn4a\nper/tK+UEAr5rmF4GFO/WLWLCD4vEfH4BUv1SzuDq1dom/3WzPz/724qe4U8\nMnQC0TdJ3Ut4+EKW4AjRWanzl5N9N7jXtvvH6SNlyVKjTorYGchl/UCQfJuu\nT2hiuI1/82W0Z1Yr9UJy/Nrnd87lhw1o2TyZD7KS6E3SY+Vqd+4ZMb+4SbjU\nCY3zUi/077rZadwm/NoyXtYbfhZGbSkULyfZTtmEvuAjSxa9pkdYot+I1tCP\nck7K\r\n=MPph\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDwleZrsHeq6vHh5lrQPEofB1OM7g40XiO3SPKPKF0BcAiEA2Fi+f7buJ3qEOlpjZBKsKdPsuGpYA7qcl4bsfTONmHw="}]},"_npmUser":{"name":"cf-jim-burbridge","email":"jim@corefabrications.com"},"directories":{},"maintainers":[{"name":"cf-jim-burbridge","email":"jim@corefabrications.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin_1.0.0_1604640974714_0.34213054693282086"},"_hasShrinkwrap":false},"1.0.1":{"name":"@core-fabrications/eslint-plugin","version":"1.0.1","description":"ESLint for Core Fabrications based off some desired functionality","main":"index.js","author":{"name":"Core Fabrications","email":"engineering@corefabrications.com"},"license":"MIT","scripts":{"test":"ava","lint":"eslint .","release":"standard-version"},"devDependencies":{"ava":"^3.13.0","eslint":"^7.11.0","eslint-plugin-eslint-plugin":"^2.3.0","standard-version":"^9.0.0"},"dependencies":{"eslint-rule-composer":"^0.3.0"},"gitHead":"74ec727b2c2e0356786c89a78c2eacb5b1da817a","_id":"@core-fabrications/eslint-plugin@1.0.1","_nodeVersion":"15.0.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-cHluIi/Q8VzqwuWvmllqqyg6AyshIj/FUTaFxQioAM4gVRGqJ0UH+rGs18xyyuIOB1Wyu1ZrF0Rrz3w7Tx3sbQ==","shasum":"24c8289149261db97e4f08ff1808be776ccaf233","tarball":"https://registry.npmjs.org/@core-fabrications/eslint-plugin/-/eslint-plugin-1.0.1.tgz","fileCount":12,"unpackedSize":13396,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfpaoKCRA9TVsSAnZWagAAEzIP/20QwEdzfMKJ400RHpY8\n9KkX2WANzw02TNVv05xkUdZwk+ThPLVETWaoFr37uQnIY2II6tbs2or2rX3m\n+dz3QQWDobhyOOq/ve39J88gzTKTo8I+sa2hSTNihE29LBoQ4Yc9S0WwOzgt\nTBR9bBJSL5eEGIm9ylpf5eFk0Z1M+opje12pGKbdTxoEl6fDOOYPe7LqQf7k\nDp7NRX6b2MBXVbjRZCHfTbpfyKYhvH7egeOUN5smk+RHV1fQ16kXvItbFfpR\nTVptEHgCwK/G9jsZ2WwsQw0g7oNzglFkX0fvOY3JE6ck+vTLjvK2m7dISNsX\nu8Yoh+N/M2Wul4jfRQJT2ErN6PLZlJXjxv9P+uvsi/gY67d1fhl1Z2u7yIzr\n0aj0sW5bLS456kTi4mnnsMNRdVAbgYOLngDo6qYnaUXobBLfI5PypE0/ne4M\nRakatEmCxHAAAU7wZmjGQbKyJf3OH29IM1niuompBOhkIJoAEwEqx0SvBy87\ny4ETuqSsq9jEOWol40BDtIrHpH3uAQqzZLGSciD9WGLFV5BnYggFb8JSKXYY\nl0mCFueYYKrKq0sK9q3jPqb759HYox3JoVgZBzBxfac6zVmgQuun2DtSkVRs\n5Q8RYf/lvLic9c6FLgMBh9yrL4lq92x2YCxHYM3uuHFQ2OuliBjyxFOc1tHU\n1Zng\r\n=gRNY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDMH+fSxW40xOZSxEDcE7yCMlFlR2mHPPD41Dimcl02CAiBY0rwAHLgi1iB1NEhjH2mFQb/zRXw1Rjx7XcrLKjCzWA=="}]},"_npmUser":{"name":"cf-jim-burbridge","email":"jim@corefabrications.com"},"directories":{},"maintainers":[{"name":"cf-jim-burbridge","email":"jim@corefabrications.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin_1.0.1_1604692489868_0.07751834363241539"},"_hasShrinkwrap":false}},"time":{"created":"2020-11-06T05:36:14.447Z","1.0.0":"2020-11-06T05:36:14.813Z","modified":"2022-04-05T01:21:38.807Z","1.0.1":"2020-11-06T19:54:49.978Z"},"maintainers":[{"name":"cf-jim-burbridge","email":"jim@corefabrications.com"}],"description":"ESLint for Core Fabrications based off some desired functionality","author":{"name":"Core Fabrications","email":"engineering@corefabrications.com"},"license":"MIT","readme":"# Core Fabrications ESLint Plugin\n\n## Custom Rules\n\nThis plugin currently provides the following custom rules\n\n1. [@core-fabrications/max-static-destructure-depth](#max-static-destructure-depth)\n2. [@core-fabrications/prefer-destructuring](#prefer-destructuring)\n\n### max-static-destructure-depth\n\nThis rule applies in contexts where you are utilizing destructuring, but you only wish to directly destructure a static length into a property.\nThe most common use case for this would be pulling variables from `process.env`, where the normal destructuring rules try to enforce a code style that honestly doesn't make a lot of sense.\n\n```js\n// example using ESLint's default destructuring rule\n\nconst { NODE_ENV, OTHER_VARIABLE } = process.env; // Will complain about this, suggesting it to be rewritten as\nconst {env: { NODE_ENV, OTHER_VARIABLE}} = process; // Why?\n```\n\n`max-static-destructure-depth` takes an integer argument to determine how far down a developer should be allowed to destructure statically. It defaults to 2 levels, meaning with `max-static-destructure-depth` being enforced, our previous code\n\n```js\nconst { NODE_ENV, OTHER_VARIABLE } = process.env; // a-ok\n\nconst { foo, bar } = some.nested.variable // not okay, as we nest 3 levels here.\n```\n\nTo change the maximum in your own ESLint config, simply add a line to your `rules` that looks like this\n\n```json\n\"rules\": {\n  \"@core-fabrications/max-static-destructure-depth\": [\"error\", 4]\n}\n```\n\n### prefer-destructuring\n\nThis is a carbon-copy of the ESLint [prefer-destructuring](https://eslint.org/docs/rules/prefer-destructuring) rule, modified not to output \"errors\" caused by our custom destructuring rule. Please see the link for any configuration documentation.\n\n## Provided Configs\n\nThis plugin currently provides the following custom configs. **Note** Unless otherwise stated, these extend the `eslint:recommended` configuration.\n\n1. plugin:@core-fabrications/recommended\n\n### @core-fabrications/recommended\n\nThe recommended rule profile has the following values\n\n```js\n// We use semi colons\nsemi: ['error', 'always'],\n// We use single quotes whenever possible, but allow double quotes to avoid escapes.\nquotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }], \n// Destructuring is a helpful pattern\n'prefer-destructuring': ['error', { array: true, object: true }, { enforceForRenamedProperties: true }],\n// Curly bracers for multi-line or nested statements\ncurly: ['error', 'multi-or-nest'],\n'arrow-body-style': ['error', 'as-needed'],\n// If we don't need arrow parenthesis, we won't add them\n'arrow-parens': ['error', 'as-needed'],\n'@core-fabrications/max-static-destructure-depth': ['error', 2]\n'@core-fabrications/prefer-destructuring': ['error', { array: true, object: true }, { enforceForRenamedProperties: true }]\n```\n\n## License\n\nThe license of this project is MIT. You are free to use and modify it to suit your needs so long as you understand that Core Fabrications is in no way offering support to your project. ","readmeFilename":"README.md"}