Comments (1)
Note that this is achievable with no-restricted-syntax
using "BinaryExpression[operator=instanceof][left.type=TSNonNullExpression]"
as long as you don't mind the fact that you'll flag on x! instanceof y
as well, not just x !instanceof y
. But you'd have to already know this gotcha exists in order to know to think of that, and I'd think this pattern is always a mistake, not just something that applies to specific codebases.
EDIT: made the no-restricted-syntax
selector better
from typescript-eslint.
Related Issues (20)
- Enhancement(rule-tester): check for parsing errors in suggestion fixes
- Enhancement(rule-tester): check for missing placeholder data in the message
- Docs: Add blog post announcing v8 beta
- Docs: Consider using a URL shortener for links printed by code HOT 3
- Repo: Add a CI check that 'breaking change' PR descriptions start with the right title text
- Repo: Raise TSConfig lib/target support range to match ESLint's
- Enhancement: [return-await] Option for unopinionated "in-try-catch" HOT 5
- Bug: "Too many files (>8) have matched the default project" error triggers on every file after 8 HOT 7
- Docs: `method-signature-style` lint rule ❤ `--enforceReadonly` compiler flag
- Rule proposal: Disallow calling Number.isNaN on non-number types HOT 10
- Configs: Make consistent-type-imports 'error' for the recommended config HOT 24
- Enhancement: [consistent-type-imports] option to only enable for internal dependencies HOT 3
- Bug: no-undef reports on class index signature HOT 1
- Bug: [no-unncessary-condition] Incorrectly detects possible values of type around await HOT 6
- Bug: [use-unknown-in-catch-callback-variable] Does not flag second argument of `.then` HOT 1
- Enhancement: [use-unknown-in-catch-callback-variable] Option to only check inline functions HOT 6
- Rule proposal: prefer querySelector generic vs type cast
- Enchancement: [strict-boolean-expressions] Treat `!!x` same as `Boolean(x)` HOT 6
- Enhancement: [no-floating-promises] Option to only check within async functions HOT 6
- Repo: renovate updates stuck? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescript-eslint.