kira-95 / cabx Goto Github PK
View Code? Open in Web Editor NEWa ride-sharing aggregator for iOS
a ride-sharing aggregator for iOS
===/!==
E:\CabX\backend\node_modules\iconv-lite\encodings\utf16.js:41: Use ===/!== to compare with true/false or Numbers
In Javascript, the == equality operator converts between types to find a match, so 1 == true evaluates to true because true is converted to 1. The === type equality operator doesn't do type conversions. Better to use === than == because this could disable auto type conversion and make sure the comparison return the right value.
backend\test\getUber_test.js
E030 | 178 | 6 | }); | Expected an identifier and instead saw ')'.
E030 | 201 | 6 | }); | Expected an identifier and instead saw ')'.
avoid using global variables.
E:\CabX\backend\node_modules\accepts\index.js:23: Avoid using global variables
E:\CabX\backend\node_modules\array-flatten\array-flatten.js:6: Avoid using global variables
E:\CabX\backend\node_modules\body-parser\index.js:37: Avoid using global variables
Use of global variable would cause risk in bug. Since every file and every function could access to global variables and it is hard to figure out whether a function write these variables. When the scale of the application become larger and larger, it would be hard to take every function into account and keep track of every global variables.
backend\test\getLatLongFromAddress_test.js
E030 | 50 | 6 | }); | Expected an identifier and instead saw ')'.
E030 | 69 | 6 | }); | Expected an identifier and instead saw ')'.
E030 | 106 | 6 | }); | Expected an identifier and instead saw ')'.
E030 | 135 | 6 | }); | Expected an identifier and instead saw ')'.
E030 | 164 | 6 | }); | Expected an identifier and instead saw ')'.
E030 | 191 | 6 | }); | Expected an identifier and instead saw ')'.
E030 | 216 | 6 | }); | Expected an identifier and instead saw ')'.
E030 | 244 | 6 | }); | Expected an identifier and instead saw ')'.
E030 | 274 | 6 | }); | Expected an identifier and instead saw ')'.
E030 | 334 | 6 | }); | Expected an identifier and instead saw ')'.
backend\test\getLyft_test.js
E030 | 174 | 6 | }); | Expected an identifier and instead saw ')'.
E030 | 198 | 6 | }); | Expected an identifier and instead saw ')'.
backend\test\getFindRides_test.js
format: [Error Type] | [Line] | [Column] | [evidence] | [reason]
E030 | 28 | 6 | }); | Expected an identifier and instead saw ')'.
E030 | 56 | 6 | }); | Expected an identifier and instead saw ')'.
E030 | 108 | 6 | }); | Expected an identifier and instead saw ')'.
E030 | 160 | 6 | }); | Expected an identifier and instead saw ')'.
E030 | 267 | 6 | }); | Expected an identifier and instead saw ')'.
mix return statements with and without a result.
E:\CabX\backend\node_modules\ms\index.js:47: A function should not mix return statements with and without a result.
The function should always return a value in every condition, otherwise would cause bugs because sometimes cannot get a result when call this function.
The for-in loop variable
E:\CabX\backend\node_modules\ipaddr.js\ipaddr.min.js:1: The for-in loop variable 'o' should be explicitly scoped with var to avoid pollution.
Ver1:
for (var x in set) {
...
}
Ver2:
for (x in set) {
...
}
Ver1 declares a new local variable called x. and Ver2 does not. In this warning, if x declared before, two version equal. But if x is not used before, the ver2 would create a global variable x. which would cause pollution in the naming space. This would lead to bugs.
trailing commas
E:\CabX\backend\node_modules\check-error\index.js:166: Avoid trailing commas in object or array literals
module.exports = {
compatibleInstance: compatibleInstance,
compatibleConstructor: compatibleConstructor,
compatibleMessage: compatibleMessage,
getMessage: getMessage,
getConstructorName: getConstructorName,
}
the comma in the last two line
getConstructorName: getConstructorName,
is a trailing commas. This feature would make it easy when adding new element and good for version control. It is supported by most of browser in object literals. So I choose to ignore the warning here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.