{"_id":"@blueprint-modernized/eslint-plugin","name":"@blueprint-modernized/eslint-plugin","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.6":{"name":"@blueprint-modernized/eslint-plugin","version":"1.0.6","description":"ESLint rules for use with @blueprint-modernized packages","main":"lib/index.js","scripts":{"clean":"rm -rf lib/*","compile":"tsc -p src/","lint":"run-p lint:es","lint:es":"es-lint","lint-fix":"es-lint --fix","test":"ts-node --script-mode --pretty test/index.ts","test:jest-ci":"jest --ci --runInBand"},"dependencies":{"@typescript-eslint/experimental-utils":"^4.9.1","eslint":"^7.15.0"},"devDependencies":{"@blueprint-modernized/node-build-scripts":"^4.0.3","@types/dedent":"^0.7.0","dedent":"^0.7.0","ts-node":"^9.1.1","typescript":"^4.6.2"},"repository":{"type":"git","url":"git+ssh://git@github.com/palantir/blueprint.git","directory":"packages/eslint-plugin"},"author":{"name":"Palantir Technologies"},"license":"Apache-2.0","gitHead":"afc292104a4fd14e2c16846d8b90023852009b59","bugs":{"url":"https://github.com/palantir/blueprint/issues"},"homepage":"https://github.com/palantir/blueprint#readme","_id":"@blueprint-modernized/eslint-plugin@1.0.6","_nodeVersion":"14.17.6","_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (darwin)","dist":{"integrity":"sha512-IBzCAyD/gKFRZGEmLrmHvMC+l82+Q/qa0Dquw73VZ2Ax8t7VOPwNjb+l5T5WOBPSBfXJ7IVhGOhFDhJpSKeDRg==","shasum":"8a85031fd1423393a7b59b6e274d26908655cf20","tarball":"https://registry.npmjs.org/@blueprint-modernized/eslint-plugin/-/eslint-plugin-1.0.6.tgz","fileCount":46,"unpackedSize":92982,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3ZeXYoTYlZwmjaOcnaDlB99Oes44NFs26BkfTVHA5nwIhAJsvCBwAzd5bKRTGBNZTo7bW4BGTJkJMKDKe0QrDK3N2"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUtoZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmouFRAAjRyIvroOYGHDI8DY/6weCotG3Vj3pb3MywonPFWS1g35Y2km\r\nft+pA3t473DobHxSljKN1Nujiz5FryKaJOF/eAbQ7gSxJ3xu6qF9nIqzgvtC\r\nXSz5pk9qb+jh/IbkaaqmPzZYvaMbQ6DV9jJFXNEnjL8py7WBBo/ueD5LN93w\r\ngNRPZD7Qv10cM14rXfMVlZvGvGdE7aS4tKJzfW9x6G6EGpLKokRzA91OL7sn\r\nZer35x1ob/eKsy/A4x/T4MUZnFRPL/VRsaYG+mQ/bANWqcmeu0HGmIkjyRCy\r\nJg0gqIfQLsRZS1Lr9nW6CS975wAAX//EbC95tODrIq0hpqfIJEOZnqTvgLHh\r\nQyAMFjrD+O6U76qQbQrP3PlNkbDO6Q7n5gAh97J94WSNs5/GoHTVJ1eH2Zqi\r\nW7zKind/Z6ZlYmLUthNQlEhhQKukbRb+6zSguofgRKhiM/dbdVYRXVJLYoZl\r\nPPwH8qJqvmIwzF+8XHPqH0XFsNo6Jvzz5H0gbEidRjjOD8V3pz8olQdK5YA5\r\n0a5abU6D6k5guHsNP0rqB0OwmRVGxKGLh7Avi27yqmxJHbtt6FJpLB9ms9Ut\r\nCSOnhgasbXOndL2BHYlZUz/t9FvsFsEnleInNgbtGNFCXhZyHKDDraHa/OrO\r\nXuGd0oI5Sp2vYUTthvCNw66L5JcshFTfpec=\r\n=lcB3\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"michael_nocode","email":"michael@nocode.studio"},"directories":{},"maintainers":[{"name":"michael_nocode","email":"michael@nocode.studio"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin_1.0.6_1649596953138_0.6359681652465969"},"_hasShrinkwrap":false}},"time":{"created":"2022-04-10T13:22:33.074Z","1.0.6":"2022-04-10T13:22:33.293Z","modified":"2022-04-10T13:22:33.417Z"},"maintainers":[{"name":"michael_nocode","email":"michael@nocode.studio"}],"description":"ESLint rules for use with @blueprint-modernized packages","homepage":"https://github.com/palantir/blueprint#readme","repository":{"type":"git","url":"git+ssh://git@github.com/palantir/blueprint.git","directory":"packages/eslint-plugin"},"author":{"name":"Palantir Technologies"},"bugs":{"url":"https://github.com/palantir/blueprint/issues"},"license":"Apache-2.0","readme":"<img height=\"204\" src=\"https://cloud.githubusercontent.com/assets/464822/20228152/d3f36dc2-a804-11e6-80ff-51ada2d13ea7.png\">\n\n# [Blueprint](http://blueprintjs.com/) [ESLint](https://eslint.org/) plugin\n\nBlueprint is a React UI toolkit for the web.\n\nThis package contains the [ESLint](https://eslint.org/) plugin for Blueprint. It provides custom rules which are useful when developing against Blueprint libraries.\n\n**Key features:**\n\n-   [Blueprint-specific rules](#Rules) for use with `@blueprint-modernized` components.\n\n## Installation\n\n```\nyarn add --dev @blueprint-modernized/eslint-plugin\n```\n\n## Usage\n\nSimply add this plugin in your `.eslintrc` file to use the add the plugin. The plugin includes Blueprint-specific rules which enforce semantics particular to usage with `@blueprint-modernized` packages, but does not turn them on by default.\n\n`.eslintrc`\n\n```json\nplugins: [\n    \"@blueprint-modernized\"\n]\n```\n\n### Rules-only usage\n\nTo enable the Blueprint-specific rules, extend the `plugin:@blueprint-modernized/recommended` config inside the package:\n\n`tslint.json`\n\n```diff\nextends: [\n+    \"plugin:@blueprint-modernized/recommended\"\n]\n```\n\n## Rules\n\n### `@blueprint-modernized/classes-constants`\n\nEnforce usage of `Classes` constants over namespaced string literals.\n\nEach `@blueprint-modernized` package exports a `Classes` object that contains constants for every CSS class defined by the package. While the values of the constants may change between releases, the names of the constants will remain more stable.\n\n```json\n{\n    \"rules\": {\n        \"@blueprint-modernized/classes-constants\": [\"error\"]\n    }\n}\n```\n\n```diff\n-const element = <div className=\"pt-navbar\" />;\n+const element = <div className={Classes.NAVBAR} />;\n```\n\n### `@blueprint-modernized/html-components`\n\nEnforce usage of Blueprint components over regular html components.\n\n-   h1-6 -> H1-6\n-   code -> Code\n-   pre -> Pre\n-   blockquote -> Blockquote\n-   table -> HTMLTable\n\n```js\n{\n  \"rules\": {\n    \"@blueprint-modernized/html-components\": [\"error\"],\n  }\n}\n```\n\n### `@blueprint-modernized/icon-components`\n\nEnforce usage of JSX `Icon` components over `IconName` string literals (or vice-versa) in `icon` JSX props. Note that this rule only supports hardcoded values in the `icon` prop; it does not handle expressions or conditionals.\n\nA fixer is available for this rule that will convert between string literals and named `Icon` components. Note that the implementation is naive and may require intervention, such as to import a component or fix an invalid name.\n\nNamed icon components (`TickIcon`, `GraphIcon`, etc) can be imported from the `@blueprint-modernized/icons` package.\n\nThis rule is disabled in the `blueprint-rules` config as it is most useful to ensure that the `@blueprint-modernized/icons` package can be tree-shaken (an opt-in process which requires using components and _never_ `IconName` literals).\n\n```js\n{\n  \"rules\": {\n    // default uses \"component\"\n    \"@blueprint-modernized/icon-components\": [\"error\"],\n    // expanded syntax\n    \"@blueprint-modernized/icon-components\": [\"error\", \"component\" | \"literal\"] // choose one\n  }\n}\n```\n\n`\"component\"`\n\n```diff\n-<Button icon=\"tick\" />\n+<Button icon={<TickIcon />} />\n```\n\n`\"literal\"`\n\n```diff\n-<Button icon={<GraphIcon />} />\n+<Button icon=\"graph\" />\n```\n\n### [Full Documentation](http://blueprintjs.com/docs) | [Source Code](https://github.com/palantir/blueprint)\n","readmeFilename":"README.md"}