{"name":"tslint-react","version":"3.6.0","description":"Lint rules related to React & JSX for TSLint","main":"tslint-react.json","scripts":{"build":"tsc -p ./","copy":"cp -f package.json README.md tslint-react.json build/","clean":"rm -rf build/","lint":"tslint --project tsconfig.json --format codeFrame","test":"./scripts/test-rules","verify":"run-s build lint test"},"dependencies":{"tsutils":"^2.13.1"},"peerDependencies":{"tslint":"^5.1.0","typescript":">=2.1.0 || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev"},"devDependencies":{"@types/colors":"^1.1.3","@types/glob":"^5.0.30","@types/node":"^7.0.13","colors":"^1.1.2","glob":"^7.1.2","npm-run-all":"^4.0.2","path":"^0.12.7","tslint":"^5.5.0","tslint-language-service":"^0.9.6","typescript":"~2.6.2"},"repository":{"type":"git","url":"git+https://github.com/palantir/tslint-react.git"},"license":"Apache-2.0","bugs":{"url":"https://github.com/palantir/tslint-react/issues"},"homepage":"https://github.com/palantir/tslint-react#readme","_id":"tslint-react@3.6.0","_npmVersion":"5.6.0","_nodeVersion":"10.0.0","_npmUser":{"name":"palantir","email":"pt-vendor-npm@palantir.com"},"dist":{"integrity":"sha512-AIv1QcsSnj7e9pFir6cJ6vIncTqxfqeFF3Lzh8SuuBljueYzEAtByuB6zMaD27BL0xhMEqsZ9s5eHuCONydjBw==","shasum":"7f462c95c4a0afaae82507f06517ff02942196a1","tarball":"http://registry-npm.ywwl.com/tslint-react/download/tslint-react-3.6.0.tgz","fileCount":37,"unpackedSize":95826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa8efKCRA9TVsSAnZWagAAO7AP/1gvjtGNX4B7VRK0Yn+t\nlX6jk5wRzI0/SU7MJu5o8HwbRPznj8LFy4AfsXovvcbl3A5CmN1G0YtsEZJL\n4WD2RqLdscgLi41dToms2XGH4jLUbVy3AAhoTjh11ASEd6TG8kR8pgBFVehW\nFe11DiTvJzq2yT/XkYNkzjnnVi7Py3z2NYgJYvAIvsRqsygZYFD+crlBIvFN\nKdUgI63h7pkei6/HzJfcUXMgifeA2kJoFm+JYSWXRriGr75JUwHCqe4izE8X\npQNyoBJbC3AbUWyIpXOrzjwlr5rymQ1k263JPozZDdkzXNsh2lqEM/qa476A\nF/65uKgBR9Hb331zyJeeIfKXF09aeh/M/nwcsbedlu4tuOi+cdk6IiUqOu1n\n2XKgvnfrEm59GWUAYnSz2e4mj2HmXf0XmRZEEecvu5U3SAXb0FlV03pljMEq\nRhsHYh+4mgKZfPS2CQSpEBEWwT3m/m2oiReq3CRE/M1f5HMru6GV8IGOf/63\nr0hydnnC0nBoUOiI2gGxrbkfnXGe2lXtypQmQUDC/iXLa+da6Lfvd2yIoc6+\n+nD2a9x8/X9AItBvV5QnKk+VVs0jyszWq4R0o+8EyE5B5KUbTWY6G3AlHt7r\nZ0hHmF0FAL7a+6pVF35xwGRj4SDy8HLU2JtfPVpUJpDDJSA01rzZI3wIxoIU\n6pcW\r\n=KUex\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDljEVkfAHkhZAec+Cn5Hvh4PSsK7LFaF6pr9rf7j46gIgEEfrP88Ghs1yXmwx2SMULy2CozyiLlUR2qR7lpUKBj8="}],"size":14368,"noattachment":false,"key":"/tslint-react/-/tslint-react-3.6.0.tgz"},"maintainers":[{"name":"palantir","email":"pt-vendor-npm@palantir.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tslint-react_3.6.0_1525802953182_0.29216261938978105"},"_hasShrinkwrap":false,"readme":"[![NPM version](https://badge.fury.io/js/tslint-react.svg)](https://www.npmjs.com/package/tslint-react)\n[![Downloads](http://img.shields.io/npm/dm/tslint-react.svg)](https://npmjs.org/package/tslint-react)\n[![Circle CI](https://circleci.com/gh/palantir/tslint-react.svg?style=svg)](https://circleci.com/gh/palantir/tslint-react)\n\ntslint-react\n------------\n\nLint rules related to React & JSX for [TSLint](https://github.com/palantir/tslint/).\n\n### Usage\n\ntslint-react has peer dependencies on TSLint and TypeScript.\n\nTo use these lint rules with the default preset, use configuration inheritance via the `extends` keyword.\nHere's a sample configuration where `tslint.json` lives adjacent to your `node_modules` folder:\n\n```js\n{\n  \"extends\": [\"tslint:latest\", \"tslint-react\"],\n  \"rules\": {\n    // override tslint-react rules here\n    \"jsx-wrap-multiline\": false\n  }\n}\n```\n\nTo lint your `.ts` **and** `.tsx` files you can simply run `tslint -c tslint.json 'src/**/*.{ts,tsx}'`.\n\n### Semantic versioning\n\nThe built-in configuration preset you get with `\"extends\": \"tslint-react\"` is semantically versioned in a manner similar to TSLint's built-in presets and the TypeScript language itself. As new rules are added to tslint-react across minor versions, stricter checks may be enabled here. Your code is not guaranteed to continue passing checks across these version bumps. If you wish to ensure that `npm upgrade` or `yarn upgrade` never breaks your build, declare a tilde dependency on this package (e.g. `\"~1.0.0\"`).\n\n### Rules\n\n- `jsx-alignment`\n  - Enforces a consistent style for multiline JSX elements which promotes ease of editing via line-wise manipulations\n  as well as maintainability via small diffs when changes are made.\n  ```ts\n  // Good:\n  const element = <div\n      className=\"foo\"\n      tabIndex={1}\n  >\n      {children}\n  </div>;\n\n  // Also Good:\n  <Button\n      appearance=\"pretty\"\n      disabled\n      label=\"Click Me\"\n      size={size}\n  />\n  ```\n- `jsx-ban-elements` (since v3.4.0)\n  - Allows blacklisting of JSX elements with an optional explanatory message in the reported failure.\n- `jsx-ban-props` (since v2.3.0)\n  - Allows blacklisting of props in JSX with an optional explanatory message in the reported failure.\n- `jsx-boolean-value` (since v2.5.0)\n  - When using a boolean attribute in JSX, you can set the attribute value to true or omit the value. This rule will enforce one or the other to keep consistency in your code.\n  - Rule options: `[\"always\", \"never\"]`\n  - Default is set to `always`.\n- `jsx-curly-spacing` (since v1.1.0)\n  - Requires _or_ bans spaces between curly brace characters in JSX.\n  - Rule options: `[\"always\", \"never\"]`\n  - _Includes automatic code fix_\n- `jsx-equals-spacing` (since v3.2.0)\n  - Requires _or_ bans spaces before and after the `=` token in JSX element attributes.\n  - Rule options: `[\"always\", \"never\"]`\n  - _Includes automatic code fix_\n- `jsx-key` (since v3.2.0)\n  - Warns for missing `key` props in JSX element array literals and inside return statements of `Array.prototype.map` callbacks.\n    - N.B. This rule only does a simple check for `.map(...)` syntax and does not inspect computed types of expressions. As such, it may produce false positives if you use APIs that look similar to `.map()`.\n  - Rule options: _none_\n- `jsx-no-bind` (since v2.6.0)\n  - Forbids function binding in JSX attributes. This has the same intent as `jsx-no-lambda` in helping you avoid excessive re-renders.\n  - Note that this currently only does a simple _syntactic_ check, not a _semantic_ one (it doesn't use the type checker). So it may have some\n    rare false positives if you define your own `.bind` function and supply `this` as a parameter.\n  - Rule options: _none_\n- `jsx-no-lambda`\n  - Creating new anonymous functions (with either the `function` syntax or ES2015 arrow syntax) inside the `render` call stack works against _pure component rendering_. When doing an equality check between two lambdas, React will always consider them unequal values and force the component to re-render more often than necessary.\n  - Rule options: _none_\n- `jsx-no-multiline-js`\n  - Disallows multiline JS expressions inside JSX blocks to promote readability\n  - Rule options: _none_\n- `jsx-no-string-ref`\n  - Passing strings to the `ref` prop of React elements is considered a legacy feature and will soon be deprecated.\n    Instead, [use a callback](https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute).\n  - Rule options: _none_\n- `jsx-use-translation-function` (since v2.4.0)\n   - Enforces use of a translation function. Plain string literals are disallowed in JSX when enabled.\n   - Rule options: `[\"allow-punctuation\", \"allow-htmlentities\"]`\n   - Off by default\n- `jsx-self-close` (since v0.4.0)\n  - Enforces that JSX elements with no children are self-closing.\n  - _Includes automatic code fix_\n  ```ts\n  // bad\n  <div className=\"foo\"></div>\n  // good\n  <div className=\"foo\" />\n  ```\n  - Rule options: _none_\n- `jsx-space-before-trailing-slash`\n  - Checks that self-closing JSX elements have a space before the '/>' part.\n  - Rule options: _none_\n  - _Includes automatic code fix_\n- `jsx-wrap-multiline` (since v2.1)\n  - Enforces that multiline JSX expressions are wrapped with parentheses.\n  - Opening parenthesis must be followed by a newline.\n  - Closing parenthesis must be preceded by a newline.\n  ```ts\n  // bad\n  const button = <button type=\"submit\">\n      Submit\n  </button>;\n  // good\n  const button = (\n      <button type=\"submit\">\n          Submit\n      </button>\n  );\n  ```\n\n### Development\n\nWe track rule suggestions on Github issues -- [here's a useful link](https://github.com/palantir/tslint-react/issues?q=is%3Aissue+is%3Aopen+label%3A%22Type%3A+Rule+Suggestion%22)\nto view all the current suggestions. Tickets are roughly triaged by priority (P1, P2, P3).\n\nWe're happy to accept PRs for new rules, especially those marked as [Status: Accepting PRs](https://github.com/palantir/tslint-react/issues?q=is%3Aissue+is%3Aopen+label%3A%22Status%3A+Accepting+PRs%22).\nIf submitting a PR, try to follow the same style conventions as the [core TSLint project](https://github.com/palantir/tslint).\n\nQuick Start (requires Node v6+, yarn v0.22+):\n\n1. `yarn`\n1. `yarn verify`\n1. `yarn lint`\n\n### Changelog\n\nSee the Github [release history](https://github.com/palantir/tslint-react/releases).\n","publish_time":1525802953250,"_cnpm_publish_time":1525802953250,"dist-tags":{"latest":"5.0.0"}}