{"_id":"@blueprint-modernized/tslint-config","name":"@blueprint-modernized/tslint-config","dist-tags":{"latest":"3.2.1"},"versions":{"3.2.1":{"name":"@blueprint-modernized/tslint-config","version":"3.2.1","description":"TSLint configuration for @blueprint-modernized packages","scripts":{"compile":"tsc -p ./src","test":"tslint --rules-dir ./lib/rules --test test/rules/**/tslint.json"},"dependencies":{"tslib":"~2.3.1","tslint-react":"^5.0.0"},"peerDependencies":{"tslint":"^6.0.0"},"devDependencies":{"tslint":"~6.1.3"},"repository":{"type":"git","url":"git+ssh://git@github.com/palantir/blueprint.git","directory":"packages/tslint-config"},"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/tslint-config@3.2.1","_nodeVersion":"14.17.6","_npmVersion":"lerna/4.0.0/node@v14.17.6+x64 (darwin)","dist":{"integrity":"sha512-lLL5JKSdHNAtfLA+O76LQ0UPO0b9+kMumBCQe2YDpODKGnbjOKlHGDhSHCmGUlkcDKQ0G7eUQPu761YFA+gf8g==","shasum":"94cd3024e8f14ddf9dad9cd70659442e0b0ddaee","tarball":"https://registry.npmjs.org/@blueprint-modernized/tslint-config/-/tslint-config-3.2.1.tgz","fileCount":20,"unpackedSize":51049,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHxbyIrJXabUo5E8XEhfny9MzZnKvVu1ROcsN0lmDTkNAiEAwJ4sb1NaxbGe24ldAfUaHEXgj8V4YaBWoEXLhtYe2R8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiUtoZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmro7Q//Vn3xdq+xTmwP87EDVt899yl5e591U4nMLbsxVFTDZuOjgsLJ\r\nGg5QJT8RTnJxhr89LTeAFnTKBfzDZzl7AufWwdLHSmstq3SicTd1ACqBG8nd\r\nr1Q/bGLYuduBfp3D3bS9LNswA8zrVtF+aa7iE6+nGQIWbeUGFFZJvooolkP7\r\nVi5+lCokv3G8gJE7Eyfnacj/CzIlNJ4sAI6H3QhEotYBAKDtco94NjxCMc0J\r\n8V97lJJ3K8Ee2iPluKrnZbb/Ha5TnEcwOdHoaBBcQC04xoXxkEEUUaR2/7wG\r\nn5HPU7kdHJslir8gPZJcG8mtWHG42GO0JqyiAuQLL8pH6UnDDypZ7pB22Ock\r\nr7ClZirV2GvRXbU1hBQSYigQabyFBW4vXQNhvsJIEO5ES2ixd+oRsglJfa3d\r\nnDK1O8nu4FJVl1r2tN7xLlIHtLj1PRekZrAIVZ8bjTJ9bcniRXFwTamQjNJi\r\n+aTab/8f7OBBFvd0WdhaGbA0wyxJLdXTC6NwYDz505CbSzSx0B7hwnodiDA6\r\nQ39CnigWA2MrxfEX1QxW5XQGMRs6BGd95agHK0ompwLstuJTqMGaTrBb+20k\r\n2cA7R0drBlb1/iYzjrkTDVI5spoCjNaoXs5Rx8KwzuO2rzYP7sEkopOkgHna\r\n3O9wXiIObUHgRS1N5VYHNmdt+hSGeQkQk/s=\r\n=gHEK\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/tslint-config_3.2.1_1649596953085_0.1380687903868527"},"_hasShrinkwrap":false}},"time":{"created":"2022-04-10T13:22:33.026Z","3.2.1":"2022-04-10T13:22:33.429Z","modified":"2022-04-10T13:22:33.557Z"},"maintainers":[{"name":"michael_nocode","email":"michael@nocode.studio"}],"description":"TSLint configuration for @blueprint-modernized packages","homepage":"https://github.com/palantir/blueprint#readme","repository":{"type":"git","url":"git+ssh://git@github.com/palantir/blueprint.git","directory":"packages/tslint-config"},"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## Note: This package is deprecated in favour of `@blueprint-modernized/eslint-plugin`\n\n[TSLint is deprecated](https://medium.com/palantir/tslint-in-2019-1a144c2317a9), and as such Blueprint is transitioning to ESLint. Blueprint is now using ESLint in its own repository, and as such this package will be removed in a future major version.\n\n# [Blueprint](http://blueprintjs.com/) [TSLint](https://palantir.github.io/tslint) configuration\n\nBlueprint is a React UI toolkit for the web.\n\nThis package contains configuration for [TSLint](https://palantir.github.io/tslint) (the TypeScript linter) and a handful of new rules specifically for use when developing against Blueprint libraries.\n\n**Key features:**\n\n-   React & JSX rules from [tslint-react](https://github.com/palantir/tslint-react).\n-   [Prettier](https://github.com/prettier/prettier) integration for consistent code style and automatic fixes.\n-   [Blueprint-specific rules](#Rules) for use with `@blueprint-modernized` components.\n\n## Installation\n\n```\nyarn add @blueprint-modernized/tslint-config tslint\n```\n\n## Usage\n\nSimply extend this package in your `tslint.json` to use the default rules configuration. This configuration includes Blueprint-specific rules which enforce semantics particular to usage with `@blueprint-modernized` packages.\n\n`tslint.json`\n\n```json\n{\n    \"extends\": \"@blueprint-modernized/tslint-config\"\n}\n```\n\n### Rules-only usage\n\nTo enable the Blueprint-specific rules _only_ without the full TSLint config, extend the `blueprint-rules` config inside the package:\n\n`tslint.json`\n\n```diff\n{\n  \"extends\": [\n+   \"@blueprint-modernized/tslint-config/blueprint-rules\"\n  ]\n}\n```\n\n### Editor integration\n\n⭐️ **VS Code:** Enable the `tslint.autoFixOnSave` option to fix all fixable failures every time you save. Most importantly, this will automatically apply the Prettier formatting fixes!\n\n## Rules\n\n### `blueprint-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-classes-constants\": true\n    }\n}\n```\n\n```diff\n-const element = <div className=\"pt-navbar\" />;\n+const element = <div className={Classes.NAVBAR} />;\n```\n\n### `blueprint-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-icon-components\": true,\n    // expanded syntax\n    \"blueprint-icon-components\": {\n      \"options\": [\"component\" | \"literal\"] // choose one\n    }\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"}