Comments (3)
Sample 1:
/**
* @param {Boolean|Number} state
* @param {String} [text]
*/
function test(state, text) {
}
test() //warning
test('hello') //warning
test(true, 'hello') //This one is ok
test(10, 'hello') //This one is ok
test(true, 5) //warning
test(5, 5) //warning
test(true, 'hello', 5) //warning
from tern-lint.
To support this issue, I need the following PR ternjs/tern#525 to know tha type comes from comment.
from tern-lint.
@p-bakker tern-lint starts supporting your cases :
The only thing that I don't know how to support it is optional parameter (the first case says that test waits 2 parameters, but those parameters could be optional and I don't know how to tern support optional parameter). I must study that.
from tern-lint.
Related Issues (20)
- Validate JSDoc argument number HOT 1
- [JSDoc] validate variable declaration
- Tern lint shows warning when actual parameter is subtype of expected parameter. HOT 3
- Tern lint tries to guess field type by name if unknown identifier is used, it looks confusing. HOT 1
- How to integrate with vim HOT 2
- If unused variable defined twice we don't show 'Unused variable' warning.
- Assignment to undefined variable doesn't produce 'Unknown identifier'
- No query type 'lint' defined HOT 6
- Missing dependencies HOT 3
- Excessive output when running from command line HOT 2
- Need a way to tell tern-lint that wish he would to silent HOT 1
- Error: Cannot find module 'tern/plugin/node-express.js' HOT 2
- incredibly slow with many files HOT 13
- type undefined HOT 3
- Use tern 0.20.0
- lineNumber in cli does not consider plugins HOT 1
- publish npm module 1.0.0
- Validating in Eclipse HOT 1
- Typedef/callbacks not resolved by tern-lint?
- Add correct links to the Emacs integration of tern-lint
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 tern-lint.