« first day (2414 days earlier)      last day (2534 days later) » 

2:00 PM
module.exports = Truyen; // set this FIRST
module.exports.TABLE_NAME = "t_truyen"; // then add more
 
Can you look at constructor of Truyen.js. If i want to access TABLE_NAME. What should I do
 
I can't read my code due to all the red squiggly lines everywhere. Screw this linting bulllshit
 
I'm so sorry about that. I'll find its solution. Thanks for your help.
 
That last sentence wasn't about you. :)
 
@Luggage is linting good again? I keep hearing people go back and forth about how it's too strict or out of date or not applicable so I just ignored it. Is there tangible benefit?
 
2:08 PM
Of course there is a benefit, I was joking.
Also, YOU decide what rules you want it to look for.
I just turn on all recommended rules, then turn some off that I disagree with, when I encounter them.
 
Also I remember a whole bunch of lint stuff telling me I should remove variables that are mutable in a loop from the loop scope for speed improvements. I brought that up here and everyone was like "lol nah you're retarded JS performance isn't a big deal when it comes to that"
 
I've never has eslint or tslint with recommended rules tell me anything like that.
 
I might have been using jslint
 
Well, there was your problem.
 
:( oh
 
2:11 PM
You can use linting to just catch formatting issues, if you like.
or have it enforce rules for naming variables, etc.
 
That'd be cool. I'm assuming I can hook it to my build process in some sort of way so when webpack compiles for dev-server the errors are generated then?
 
Also, some things are auto-correctable (at least with eslint and tslint)
 
I'm assuming that if I were to integrate it I'd be using eslint as we don't use TS
 
You can do that, but I don't. I KNOW i have old code that has linting errors and I don't want that to stop compiling. I just have it in my face in the editor
 
Oh cool. What's your editor?
 
2:12 PM
As I get closer to being lint-free, then I may turn it on as a build step.
vscode, but eslint plugins are available for just about anything.
 
I'm using VScode and starting to like it. But previously I used sublime
sweet
 
{
    // See go.microsoft.com/fwlink/?LinkId=827846
    // for the documentation about the extensions.json format
    "recommendations": [
        // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
        "EditorConfig.EditorConfig",
        "dbaeumer.vscode-eslint",
        "msjsdiag.debugger-for-chrome"
    ]
}
stick that in .vscode/extensions.json and then when someone openes the project in vscode it'll ask them to install the eslint plugin
 
Hmmmm is there anyway to make it just for me?
 
Just don't do that and install it yourself.
 
Great
 
2:15 PM
But people have the option to ignore recommendations, so I think it makes sense for a project to tell the user what extensions might help with this project.
If you provide an Eslint config and have the policy that people commit formatted code, why would they NOT want it to highlight on the screen when they aren't complying?
 
I agree. Let me ask our CTO
 
don't ask. Tell.
Or don't even tell. Why would he care about such trivial details?
 
That's the problem I've been here for a week. He'd have no problem me installing it on my machine, but uploading an editor configuration into our repository that prompts all developers on whether or not they want to install ESlint seems a bit forward
 
well, yea, you may want to ask THEM
 
Our CTO has developed half our code-base
 
2:19 PM
note "don't show again". Not too invasive.
and only for those that even use vscode
 
You're right that's not as bad as I was thinking it might be.
We're kind of lucky in that our CTO doesn't suffer from the typical management woes of not understanding fuck all about code
 
I also like the "editorconfig" extension. It lets there be a project-specific config file for things like tabs/spaces.
So that someone else can have their one preferences for their own code, but when they use your project they follow project rules.
even per-file
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true

[package.json]
indent_style = space
indent_size = 2

[*.yml]
indent_style = space
indent_size = 2
 
He actively develops on our code and his code looks nice. And that shouldn't be too much of a problem we have pretty consistent coding guidelines - we tab
 
that's fine, i'm not pushing spaces, just the ability to make it easier to comply with whatever you chose.
 
@Vap0r There's more to linting than whitespace
@Luggage yay you put a newline at eof :D
 
2:25 PM
@Zirak oh I know. I thought the discussion for "editorconfig" and "eslint" were separate.
 
Yup. But related.
 
^ yup. I'm not stupid to linting, I just used jslint before which I'm assuming is garbage because they make too many assumptions (hah)
 
I think @MadaraUchiha has a fascination: chat.stackoverflow.com/…
 
ah then yeah, editorconfig is (IIRC?) mostly about whitespace
But it's not just indentation whitespace, it's curly styling and the likes
 
yea, we started with linting, then I suggested editorconfig, too
 
2:27 PM
@Luggage A fetish in the making
 
@Luggage yeah he's going a little overboard
Our CTO said we used JShint here, is that comparable?
 
Hello guys.
 
@Kiddo Welcome to the JavaScript chat! Please review the room rules. Pleasedon't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
I have installed HWIOauthBundle. Facebook login is working, but i have a problem. If I have an account already registered (without facebook connection), and i try to login with facebook, it's trying to register me again (because i don't have the facebook_id in my database). My questions is: how can I update the facebook_id if my email account is already in database?
 
jslint is out of favor due to being out of date. I hear. we all use eslint
 
2:32 PM
jshint though
 
I don't actually know any good solid arguments against jshint or jslint.
 
fair enough
 
I just remember lots of grumbling and everyone going to eslint
 
I'll bing it real quick
 
back in the day jshint just wasn't catching up with es2015+ and wasn't as configurable
 
2:35 PM
@Zirak just read a comparison here: sitepoint.com/comparison-javascript-linting-tools
You appear to be right on the money with the configuration woes, no custom rule support seems to be a biggy
 
Note that that article is 2 years old
 
If you say 26 months it sounds better
 
@Vap0r You say that no custom rule support seems to be a biggy, however...how many people write custom rules?
Tailor-made rules for their project?
I only did it once recently in a project because of a technical backwards-compat sort of thing, so some things had to be named a certain way and be in a certain place in the code
 
@Zirak sorry it seemed like a biggy to me, but without knowing how extensive the existing rule-set is I can't say for sure. I just like the idea of being able to enforce an exact rule-set particular to a certain organization.
or coding style
 
eslint is simple to configure, too. Here is a config as complex as you'll likely ever need. It Swaps to another parser, adds in a plugins for react rules, then customized some rules or turns them off: github.com/luggage66/boilerplate/blob/…
 
2:39 PM
It's not an "exact rule-set", it's "write your own rule", as in "variable names must start with bjorkIsBest and be followed by a function of the same name"
Just like you have existing rules which you configure, write your own
 
I never have written custom rules, but I coul dsee the value some day on a large project, maybe.
for a couple very project-specific things.. i guess.
 
@Zirak oh ok I'm still stuck in 2012-2013 with my idea of what linting is I guess.
That seems a lot more useful than it was when I looked at it.
 
It shouldn't be a deal breaker for jshint, however eslint has many other interesting things going in its favour
 
if you use babel, i highly recommend babel-parser for eslint. It'll ensure that any transform you use in babel won't screw up eslint.
 
Awesome thanks guys. I'll keep that in mind luggage. Couldn't I just run eslint upstream and not worry about what it looks like after the babel transformations?
 
2:43 PM
not unless you want babel causing you to fail lint
 
no, this is for before the babel transforms
so if you use some new feature that babel can recognize (e.g. decorators) but eslint CAN't recognize, it'll work if you use babel-parser
It asks babel to parse FOR eslint.
decorators might be supported by elint out-of-the box. I don't know. Just an example.
 
Starting to feel stupid, maybe I'm not understanding. How could babel cause me to fail lint if I'm linting before babel?
 
the same reason you can't feed modern JS to ie11
 
@Vap0r Linting-tool parser may not understand the syntax
"what's yield?"
 
So, just ignore it for now. Use eslint and if it starts complaining about some fancy new feature that works fine in babel, then you'll realize the issue.
 
2:46 PM
@Luggage well I guess you know how I learn by now hahaha
 
don't set me up like that, man.
 
huh?
 
You're just making this harder, now.
 
When I'm super confused normally it just works better for me to try it till it breaks
Are you trying to set me up?
 
that was all on you
 
2:49 PM
That's basically what I said. Just use eslint until it breaks, then re-evaluate what I said about babel parser. It might make more sense, then.
Or you may never run into it...
 
I honestly don't know what just went on if there was some sarcasm I missed it.
 
You set me up for a joke about you learning slowly.
 
Oh lord, and I keep on doing it.
 
Which I graciously didn't take, but instead toyed with you more subtly.
So.. not too gracious, if I am being honest.
 
I would be gracious but I know in 6 months, next time I'm being slow it's gonna pop up in chat.
lol
 
2:52 PM
as is tradition
 
Nov 9 '16 at 14:45, by Vap0r
Guys, two days ago I was in here and made fun of everyone because I thought my statistics knowledge couldn't be wrong in regards to the election. Well, I have learned my lesson and I'm so, so, sorry.
 
Psssh that makes me look good. I like it because it makes me appear humble which is clearly wrong.
 
you would think, with the sheer number of cables I have, that I couldn't possibly be missing all of the cables to plug in a raspi
but, like card readers, they are all missing
I hate hardware
 
should I change all external styles and external js
from : <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
to: <script src="//code.jquery.com/jquery-3.2.1.min.js"></script> ?
 
@OtávioBarreto no, require https
 
2:55 PM
but some styles in my server on https: just break
when my server is using https
when I use this way: <script src="//code.jquery.com/jquery-3.2.1.min.js"></script> it works
 
@OtávioBarreto if the site offers the resource with https, use it. If it doesn't, consider a different resource. If that's not possible then use "//" instead of "http://" because then it will only attempt to retrieve the http site if the https site isn't reached
 
but I don't know what is right and reccomended to use
 
@OtávioBarreto never use //
 
lol
 
it allows the client to fall back to insecure origins without telling anyone
 
2:57 PM
if your page is served via ssl, isn't that fine?
I mean.. it'll request via ssl
 
@Luggage if there's an http mitm, your scripts will continue to serve and run fine, with possible xss.
 
Also, the url is still valid in development.
 
If you require https, any attempt at that will cause errors and break.
 
HSTS solves all this
 
2:58 PM
OK. I'll defer to ssube.
 
you should be running HTTPS+HSTS, with a 301 redirect from 80 to 443, ideally
 
I don't feel confident enough to counter what he's saying.
 
^ right
 
and a good cipher set, if you want to get really involved
 
md5 is good, right? :)
 
2:59 PM
@ssube 307 to be more accurate
 
no BCRYPT
 
301 won't re-post the body
 
or do the Caesar shuffle
 
307 - will
 

« first day (2414 days earlier)      last day (2534 days later) »