{"_id":"eslint-plugin-no-type-assertion","_rev":"7-9d9f871ec2c3238c303864a6ad52ce08","time":{"1.0.0":"2020-05-22T21:26:15.312Z","created":"2020-05-23T21:46:56.064Z","1.0.1":"2020-05-23T21:46:56.268Z","modified":"2022-05-01T16:39:29.726Z","1.1.0":"2020-05-24T01:38:58.280Z","1.1.1":"2021-11-28T20:30:26.408Z","1.2.0":"2022-03-26T00:05:36.538Z","1.3.0":"2022-03-26T01:14:16.936Z"},"name":"eslint-plugin-no-type-assertion","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.1":{"name":"eslint-plugin-no-type-assertion","version":"1.0.1","description":"Disallow type assertions in TypeScript code","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/Dremora/eslint-plugin-no-type-assertion.git"},"author":{"name":"Kirill Korolyov","email":"kirill.korolyov@gmail.com"},"license":"MIT","keywords":["eslint","eslintplugin","eslint-plugin"],"engines":{"node":">=12.0.0","yarn":"^1.13.0"},"scripts":{"test":"mocha tests --recursive","prettier":"prettier --check \"{lib,test}/**/*.js\""},"peerDependencies":{"eslint":"^7.0.0"},"devDependencies":{"@typescript-eslint/parser":"^3.0.0","eslint":"^7.0.0","mocha":"^7.1.2","prettier":"^2.0.5","typescript":"^3.9.3"},"gitHead":"83729befbdc8d5f995d9a6a48c963a710476b9d0","bugs":{"url":"https://github.com/Dremora/eslint-plugin-no-type-assertion/issues"},"homepage":"https://github.com/Dremora/eslint-plugin-no-type-assertion#readme","_id":"eslint-plugin-no-type-assertion@1.0.1","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","_npmUser":{"name":"dremora","email":"kirill.korolyov@gmail.com"},"dist":{"integrity":"sha512-XpJ2v4BiCoZ73WgNwwT5H5jGDPN9bIBJCFPJYPPaPICYwAu1WrNl4cBvkTmmwJcOjUpwdVQ49h2dCO2RLKBhJA==","shasum":"ba9ce8846324b9944f284797c402eaa4fd7eb58d","tarball":"https://registry.npmjs.org/eslint-plugin-no-type-assertion/-/eslint-plugin-no-type-assertion-1.0.1.tgz","fileCount":5,"unpackedSize":3737,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeyZnQCRA9TVsSAnZWagAAD1kP/i5GZ8pgE7oE8GgjtHGs\nmYelyMdnlAn+1mPIoeReHvWPYHCJM8tWDe94rnzQwPN4y+EpPG/msLIppgoQ\nDLruHJEgD081B2Iy6Rrw5HGvHZpB/Meb9inHMyVxr8sSrmB3baJneEjWu0Qa\nZAOt7uWho4Sm0lNSym25WrCsxyWqfyc1yN3p8xo2IBj64IMQMLUyIGWtHO/P\n12b78/MxWkjonDaULSraxk03l+WpqAQT8HwJc+j0mlJNGbfFCqbw7N+5LLKK\nRsR107Wtw/bqp3/eJEcLqahvLdIWLqjQpae0gPUHtZ7nakRWt2TkJoofr1i/\nn4SCoRjZTT6dObQ65rJWxl963XXxOwwpmbRzKCxHUJQqObrFcUnHoD3saPgg\nKX9M8Q8IeVBmjxE+Pow8M8Yf9sv4Al78DcRVwd+upCNEDmfgwfF6eemUSZSO\nqQXuCoIGks9aZLzrrFFYM7TfMULYFTmTsLrUWQRfzEgIONWZz8kPYcCQEnL+\nHLLKnSv8OqTq0nyvFXiHto1bLduhTSTezIElzJMzSxT7YJ+ge3irH/dQ1BL1\n7LgNcnxVg7F0sXdufoUU0mGTVhl4PCKpsiQNQ2fT0Ge3orhTpe5wnHri3WND\nFJTbusxFnClO3/aARIJtghewWTdHCn6hkls53jZSL5QbTPNn/JeGMqTbcmic\nkFd0\r\n=u3Q4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICinVBGX3hNBC4+e10DI/pRahYIspIohEvhipAvJc3gEAiAD3QVVIfTBsbpeAlbIoQiOzctJrN2plw+q7CcynrpimA=="}]},"maintainers":[{"name":"dremora","email":"kirill.korolyov@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-no-type-assertion_1.0.1_1590270416064_0.707526298753689"},"_hasShrinkwrap":false},"1.1.0":{"name":"eslint-plugin-no-type-assertion","version":"1.1.0","description":"Disallow type assertions in TypeScript code","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/Dremora/eslint-plugin-no-type-assertion.git"},"author":{"name":"Kirill Korolyov","email":"kirill.korolyov@gmail.com"},"license":"MIT","keywords":["eslint","eslintplugin","eslint-plugin"],"engines":{"node":">=12.0.0","yarn":"^1.13.0"},"scripts":{"test":"jest tests","prettier":"prettier --check \"{lib,test}/**/*.js\""},"peerDependencies":{"eslint":"^7.0.0"},"devDependencies":{"@typescript-eslint/parser":"^3.0.0","eslint":"^7.0.0","jest":"^26.0.1","prettier":"^2.0.5","typescript":"^3.9.3"},"gitHead":"18211c9882215539d6177575f90059f83a849e19","bugs":{"url":"https://github.com/Dremora/eslint-plugin-no-type-assertion/issues"},"homepage":"https://github.com/Dremora/eslint-plugin-no-type-assertion#readme","_id":"eslint-plugin-no-type-assertion@1.1.0","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","_npmUser":{"name":"dremora","email":"kirill.korolyov@gmail.com"},"dist":{"integrity":"sha512-yHSbn986JPByOtFTmp/RVBN3k8CEZs1KmWDvhyuS/atIrt5+t7TMqeNVdCE2FmIQR1WhlDYf1MY/mwvCablZ2w==","shasum":"d5c432ca1908fd68c74b39cf4f1ef5130d32e326","tarball":"https://registry.npmjs.org/eslint-plugin-no-type-assertion/-/eslint-plugin-no-type-assertion-1.1.0.tgz","fileCount":5,"unpackedSize":4333,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeydAyCRA9TVsSAnZWagAAcKQP+wXn19CQVO5+lg3xArgq\nOvJMmIbr5ADTYULCYZHqhPMJyGnES1y8EWw8h4jbuK01uvs3+8hoGDA1PA99\nDOpAgqalw8GL94eropTenpmGB7X/zXJlaSRotB5hjtCeQoKdnKDmRs0Is7kL\nd2E8+ZRjolf0DLQhHkyeyuMwGXTW1v/wvvMeYorkHy2iXYFuLU6UEjxJLiVo\nvg4F7t/nBDtLBGRa9CsegJSfdy4N6NLleR5dEDeVy2QFhfnTU5n2dJIeQVpb\nk1mqYSIfavztCKspuvnGLBQty5SGPKrTNjyZvKHl4+R77srop6zIoATmbjzo\noArVQH1WUTZAEiXvpg0+jV7f8KBky2fRkCRIH1GBTHR+OpfVMrQhpFc/Uy7n\nYmy1ZsQOJvEeEC44QcWKEnpQG/JCyl0MfqckvVlD6PCnmP42xPFJ2PBGw4TV\nwbAVihAuaoXptyh8XRnpUI4LMyBB5DbafkVrHWivpnircG4wsvNRkp+T6+B7\nLMnt9C1uJPsoW6i/m95fSvPft5iCEBTVPJsBtdnMqQdsWPcBMYB5orfcpSbq\nU7Kt2bQuX0QKYh+0cf4ttDrd6kv0/DW5LtrSjPSk2l87ahX5CbeYXUrdW580\n/Vb6WsyGNYa+z+r/85B8iPsFQ+aH8+GcO02A5rzwAFXW4SaDVeEUqiMFPFs4\nv+lJ\r\n=1qyh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDUbxHiZT+uFUawSU1jW4U7EI8hfnIxrdSyziQegJ+QAIhAOb5aWAO4GFvoVjTiKWGw/y5NovcPgW7bdcMjdfCXyrT"}]},"maintainers":[{"name":"dremora","email":"kirill.korolyov@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-no-type-assertion_1.1.0_1590284338157_0.1027795024216498"},"_hasShrinkwrap":false},"1.1.1":{"name":"eslint-plugin-no-type-assertion","version":"1.1.1","description":"Disallow type assertions in TypeScript code","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/Dremora/eslint-plugin-no-type-assertion.git"},"author":{"name":"Kirill Korolyov","email":"kirill.korolyov@gmail.com"},"license":"MIT","keywords":["eslint","eslintplugin","eslint-plugin"],"engines":{"node":">=12.0.0","yarn":"^1.13.0"},"scripts":{"test":"jest tests","prettier":"prettier --check \"{lib,test}/**/*.js\""},"peerDependencies":{"eslint":"^7.0.0 || ^8.0.0"},"devDependencies":{"@typescript-eslint/parser":"^5.4.0","eslint":"^8.3.0","jest":"^27.3.1","prettier":"^2.5.0","typescript":"^4.5.2"},"gitHead":"728559e348f06282d843db875e51ed2894409780","bugs":{"url":"https://github.com/Dremora/eslint-plugin-no-type-assertion/issues"},"homepage":"https://github.com/Dremora/eslint-plugin-no-type-assertion#readme","_id":"eslint-plugin-no-type-assertion@1.1.1","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","_npmUser":{"name":"dremora","email":"kirill.korolyov@gmail.com"},"dist":{"integrity":"sha512-pw8/j/5nx7svDf/0LZUnwkLY2i4BwR8SKcIjkuTpMSRiGe2iJybRCQsG+8crr5fPt8wlJuQhwpn1vAZwQ7wggg==","shasum":"5dee32aad6e9cde85cb3a6f64f076580e8b6f2fb","tarball":"https://registry.npmjs.org/eslint-plugin-no-type-assertion/-/eslint-plugin-no-type-assertion-1.1.1.tgz","fileCount":6,"unpackedSize":4412,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJho+biCRA9TVsSAnZWagAAkRIP/0rdFmLwPhJg29hq0Kds\nqW+Dq7FDADTE6eu6GWvpOC4oxlwL3CiIBsWwtt25ThStw4I7W6tS5o1cec1I\nS9wD/6Kqq4Mp9razMHga7GcBuq8EpeJvy1YEQ2eAu012AKteBCZBykzqNDAG\nECBrXJitWnB5yPVR3sx5XkyTtMUy72wp9WWHmxbVSlksWC7c+5TzSgWUibo6\nB6l11qjZ+NioNhSWOYWkeLoXxas0wRbcdd0Rbjj5sdF/anANXw81r9YBU3Yh\nx41M6oVkyHz6c9eDttCw2uSgad6AsgbO9IVyzvLgmBBJU5elI5juvIo08U6x\nW1dtfmvFFiiQn/wIaFOQeEzUhJIUuUCtJ1gwnaSw0dcsysav2buMpI1rQV9P\nbhjHT00gAx4pX4R3vcTfR5C9uha9kTxLFV9I2VImnSHHjlDu3uVRRsNpkaM7\nL+piGOO/3Bh8FILSfJyUlFnruI9XN1YeDvRlRgvHsq12MCX44trblIa56Rne\ngzoAo3FjnDn0Ogq9HVwv11bb+EvlZG7cebqUx2ivBzGx6DmO/CJ15Q17nCMI\nT/2Qe3BRmzQaJxP5qUTuIQdORRwfXNh8GOU1O2IIL1PoBN+S5l7nwnOa8yIk\nBPUsGr0sdRbkoLFE8VeC7Jio6rujtvb4+GhB4ImLEavlOEbj0lSZ91qpGZv1\nRNON\r\n=kEKC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEhRx5zMoTX1KxcyU4I4nGyxBLzsjybeO0UYPJAP2NagAiAkZe194i3WOiDWh+X4QhXAszenyl2vqIKpLQDNVkLLfQ=="}]},"directories":{},"maintainers":[{"name":"dremora","email":"kirill.korolyov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-no-type-assertion_1.1.1_1638131426047_0.3672830059160399"},"_hasShrinkwrap":false},"1.2.0":{"name":"eslint-plugin-no-type-assertion","version":"1.2.0","description":"Disallow type assertions in TypeScript code","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/Dremora/eslint-plugin-no-type-assertion.git"},"author":{"name":"Kirill Korolyov","email":"kirill.korolyov@gmail.com"},"license":"MIT","keywords":["eslint","eslintplugin","eslint-plugin"],"engines":{"node":">=12.0.0","yarn":"^1.13.0"},"scripts":{"test":"jest tests","prettier":"prettier --check \"{lib,test}/**/*.js\""},"peerDependencies":{"eslint":"^7.0.0 || ^8.0.0"},"devDependencies":{"@typescript-eslint/parser":"^5.4.0","eslint":"^8.3.0","jest":"^27.3.1","prettier":"^2.5.0","typescript":"^4.5.2"},"gitHead":"d828c298049f3ce38fd4b421f80599709021e3d5","bugs":{"url":"https://github.com/Dremora/eslint-plugin-no-type-assertion/issues"},"homepage":"https://github.com/Dremora/eslint-plugin-no-type-assertion#readme","_id":"eslint-plugin-no-type-assertion@1.2.0","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","_npmUser":{"name":"dremora","email":"kirill.korolyov@gmail.com"},"dist":{"integrity":"sha512-ae8dqgEmh/YILi7WI8gY1Js4tH5LUMX41eCRnegp+MLhPEHz24ePAi9li+vh8xBwGLSFbvTccX+rNlEnU0Jm7g==","shasum":"8bb41b13b12be64680eb9083417419cf354e6c09","tarball":"https://registry.npmjs.org/eslint-plugin-no-type-assertion/-/eslint-plugin-no-type-assertion-1.2.0.tgz","fileCount":6,"unpackedSize":4909,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPljQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp4Yw/+IUCToPQw1PNMyXsHDS7eZP1akdB6yyqxhJkmj+oNhD65x6T/\r\nRD95w4NpjYI8KeeneXQ/thUOb0Q2wFKTxLR5U2K3vYV1UXhadWV4OAofZuwU\r\nBcGYE2/DLk7kOl6lTXyKE3NcLYxvhnF83Dq5rAhcN7Kcj12ZL0hDGKpTwPd9\r\no1+7YSHulBDxT0ce4zLuU8kzv2s2VM9sua3gMKVkXS1XtXBaTfe1m4yoODCB\r\nLaQgtrybAJoNz3QM4z4G6znWesdbDqrlw8JdlwGsT3dJkKat8ybK9gRmnNAI\r\nTUEyd+y178tsjEYKcdXM2y7w0bJU6MjnBYL1nYAV8IZNvPsCbS7XMG9sotbH\r\ngVms5De+4A89pyh2fTXeSQJm0a5TpDnsjG4s3yswhw0B98EKlSgPKW03JyzJ\r\nU5jbMBFlWrtGI9qZQIqJ4YnI3YneLD5MSuWYxs2pH6zoFmfHqNlxstnTNXYv\r\nv3/VzcdUQ3fgpgz0D3Jm/DpEvwfX2VQhcnr339mC4o1219RBTV0DBBjRVyXT\r\noR6WHRCeTLC0eGCTKKV1rsxhRByS2HDYYumTOVXzfbhD3ClwK0mdY6xt/xwc\r\nRNwBjMbOeqT8iS0uGTncKn43UCF15grAi43ZllEete46jDCgz7iTUjTJZMKH\r\nnIeiAYAaklQKh6L4UT0fby7HuOPZLvGuOBI=\r\n=U+bU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIClbme8hWGldvZYsc85yyte4U+PSqFdfs29fB6mRbiEuAiEA57hsxCVr1U0N1PiUY6LzcUhe8hzFnKtrtaUz71ulYdw="}]},"directories":{},"maintainers":[{"name":"dremora","email":"kirill.korolyov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-no-type-assertion_1.2.0_1648253136325_0.0062144127583902975"},"_hasShrinkwrap":false},"1.3.0":{"name":"eslint-plugin-no-type-assertion","version":"1.3.0","description":"Disallow type assertions in TypeScript code","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/Dremora/eslint-plugin-no-type-assertion.git"},"author":{"name":"Kirill Korolyov","email":"kirill.korolyov@gmail.com"},"license":"MIT","keywords":["eslint","eslintplugin","eslint-plugin"],"engines":{"node":">=12.0.0","yarn":"^1.13.0"},"scripts":{"test":"jest tests","prettier":"prettier --check \"{lib,test}/**/*.js\""},"peerDependencies":{"eslint":"^7.0.0 || ^8.0.0"},"devDependencies":{"@typescript-eslint/parser":"^5.4.0","eslint":"^8.3.0","jest":"^27.3.1","prettier":"^2.5.0","typescript":"^4.5.2"},"gitHead":"47ad6fb328a500737e6dd95001b5f7bcf055a3f7","bugs":{"url":"https://github.com/Dremora/eslint-plugin-no-type-assertion/issues"},"homepage":"https://github.com/Dremora/eslint-plugin-no-type-assertion#readme","_id":"eslint-plugin-no-type-assertion@1.3.0","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","_npmUser":{"name":"dremora","email":"kirill.korolyov@gmail.com"},"dist":{"integrity":"sha512-04wuuIP5ptNzp969tTt0gf/Jsw4G0T5md2/nbgv3dRL/HySSNU7H4vIKNjkuno9T+6h2daj1T9Aki6bDgmXDEw==","shasum":"14b0188509a0c8193c556a0dd763a9e87d0363af","tarball":"https://registry.npmjs.org/eslint-plugin-no-type-assertion/-/eslint-plugin-no-type-assertion-1.3.0.tgz","fileCount":6,"unpackedSize":5324,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPmjoACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoH8w//YpIeSi+i5otxzaB7WvzNj5iJTbkVPB0GR6w9YZxPBedhLAVv\r\nTs/JWPLF2DLLWbh7jam2hYMn5fPxZt4cZaWBYXoOtbRauPE0nI1OyIEvj3ln\r\niG3504/xy0FM6vs1NsQDaizxl3mJapZ3jvKqAOwvTqmP/voBpcwZ7ydbXy4C\r\ndKzXzb/pBHYuBgldQ7xTgEz+kFfqBH2DpGvtKrG5jay0G/pRxxrGwMkm2IH8\r\nrSAtBfjtS9Vscwe3KlBlHIGwP833+TN82N3sEg5uKhEITshkxci5sfjMoueN\r\nbgF3GjhIfAjX3rd4zjvaavpQja+bynACnpyubluTMyzy58LA+1FyfLv5tRsg\r\nn/ziv6NQfA6w90acFmUw1RrmKDnK4+7zVLiUFd5kqurl2Az8UoR6sdH+458/\r\nadP5aaxBbJWaqsZZ+oQ30v+c3Isvycvb4zd26F085EphmaRrJceJ76enkHKB\r\nb8YE1SfbdeY4Qp+sVAAih14dbuLwL+oWJAsc+i8eSj+aOjnVOU2s2H/vBaYf\r\nBk8F7VYqwSe4NX/Z4ZvxFqrx/tQE3hAQwCxI/2uTJ0uzJg+d2ARCGwvKGiUO\r\neG4LB6uydf0EuIFz8MnDhXBSxegCigKshMKnbcRDxvHIgUFAl0j5XgTx3meD\r\nMXm/I2UpzPbWUNjlC7oJbedfTK660OMk1uI=\r\n=0mXh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC23Ks8n6RBPdbY+6Ni0gdvGoBlkVx8l2rDF+4m9+/n5wIhAMLzzNMmfvsolKD18EOnkKLElX+sP5VQyP5ST9+F9YHp"}]},"directories":{},"maintainers":[{"name":"dremora","email":"kirill.korolyov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eslint-plugin-no-type-assertion_1.3.0_1648257256780_0.9806094314273601"},"_hasShrinkwrap":false}},"maintainers":[{"name":"dremora","email":"kirill.korolyov@gmail.com"}],"description":"Disallow type assertions in TypeScript code","homepage":"https://github.com/Dremora/eslint-plugin-no-type-assertion#readme","keywords":["eslint","eslintplugin","eslint-plugin"],"repository":{"type":"git","url":"git+https://github.com/Dremora/eslint-plugin-no-type-assertion.git"},"author":{"name":"Kirill Korolyov","email":"kirill.korolyov@gmail.com"},"bugs":{"url":"https://github.com/Dremora/eslint-plugin-no-type-assertion/issues"},"license":"MIT","readme":"# eslint-plugin-no-type-assertion\n\nDisallow type assertions in TypeScript code. The rule will forbid both `as` operator and the angle-bracketed syntax, unless used for [const assertions](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#const-assertions) or with the `unknown` type. The rule also forbids [non-null assertions](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#non-null-assertion-operator-postfix-).\n\nThe following code becomes invalid:\n\n```typescript\nconst foo: unknown = 42;\n\nconst notAString = <string>foo; // can't perform angle-bracketed type assertion\nconst alsoNotAString = foo as string; // can't use `as` operator for type assertion\n\nconst objectWithOptionalProperty: { a?: number } = {};\n\nconst notANumber = objectWithOptionalProperty.a! / 2; // can't use non-null assertion operator\n```\n\n## Installation\n\nEnsure you have [ESLint](http://eslint.org) and `@typescript-eslint/parser` installed:\n\n```\n$ yarn add eslint @typescript-eslint/parser -D\n```\n\nNext, install this plugin:\n\n```\n$ yarn add eslint-plugin-no-type-assertion -D\n```\n\n## Configuration\n\nIn your ESLint configuration, ensure you're using `@typescript-eslint/parser` as a parser and it's set up correctly:\n\n```json\n{\n  \"parser\": \"@typescript-eslint/parser\",\n  \"parserOptions\": {\n    \"ecmaVersion\": 2018\n  }\n}\n```\n\nAdd `eslint-plugin-no-type-assertion` to the plugin list:\n\n```json\n{\n  \"plugins\": [\"no-type-assertion\"]\n}\n```\n\nEnable the rule:\n\n```json\n{\n  \"rules\": {\n    \"no-type-assertion/no-type-assertion\": \"error\"\n  }\n}\n```\n","readmeFilename":"README.md"}