Profile

Cover photo
Νίκος Καλογρίδης
Works at Freelance
Attended University of Wales, Swansea
Lives in Αγία Παρασκευή
26 followers|127,325 views
AboutPostsPhotosVideos

Stream

 
Can we please include the FileReader global variable when the "browser" switch is enabled?
1
Νίκος Καλογρίδης's profile photoЕвгений Орехов (Evgeny Orekhov)'s profile photoDouglas Crockford's profile photo
5 comments
 
So far, FileReader is the only one anyone has shown any interest in. If it turns out that any of the other hundreds are interesting, I will add them too.
Add a comment...
 
var t = "test";
var m = {
[t]: "me"
};

jslint complains with Expected an identifier and instead saw '['. I guess this is a bug?
1
Paul Wilkins's profile photoΝίκος Καλογρίδης's profile photoDouglas Crockford's profile photo
9 comments
 
An inability to see the risks is not the same as a good argument. You need to look beyond the current case. JSLint is unable to distinguish between clever uses and foolish uses. I hear many Language Lawyers who want to argue that JSLint's ruling in their particular case is incorrect. But we have to instead look at the language as a whole and consider all of its uses.
Add a comment...
 
what would be the suggested way of using the window global variable in an es6 module? JSLint does not like the global directive when using modules but how can I reference the window object?
1
Fedge No's profile photoΝίκος Καλογρίδης's profile photo
4 comments
 
I choose the const window = document.defaultView; in my es6 modules together with the /jslint browser/ option and works like a charm
Add a comment...
 
JSLint used to warn on usage of parseInt without the radix parameter. Is that now deprecated?
2
Νίκος Καλογρίδης's profile photoDouglas Crockford's profile photoMathias Nater's profile photo
6 comments
 
I don't know what es6 has fixed here. But IMHO the intent is much clearer when the radix is given.

parseInt("0x1"); //1
parseInt("0x1", 10); //0
parseInt("0x1", 16); //1
parseInt("0x1", 36); //1189

So +1 from me for no radix warning.
Add a comment...
 
Destructuring on import statements. Is there a reason that jslint does not like the following:

/*jslint es6 */
import {a, b} from 'module';

Expected an identifier and instead saw '{'.
1
Thefourtheye dIVi's profile photoЕвгений Орехов (Evgeny Orekhov)'s profile photoΝίκος Καλογρίδης's profile photoDouglas Crockford's profile photo
8 comments
 
Please try it now.
Add a comment...
 
Τώρα και mobile apps για Android και iPhone. Δοκιμάσετε τα και πείτε μας την γνώμη σας :-)
 ·  Translate
Η Funkmartini είναι η πρώτη και μεγαλύτερη online πλατφόρμα αναζήτησης και ...
2
Add a comment...
 
is this a correct warning? I am giving a name to the function instead of making it an anonymous one mainly to be able to print the function name in the stack dump if an error occurs. 

(function () {
    'use strict';
    var x = function x() {
        return;
    };
    x();
}());

produces: Redefinition of 'x' from line 2.
1
Ben Quarmby's profile photoDouglas Crockford's profile photoΝίκος Καλογρίδης's profile photo
4 comments
 
+Douglas Crockford I see your point, so do you suggest declaring functions after the var statement as function statements and not as variables? I was under the impression that it is better to declare functions in the var statement as well. But I see even in jslint.js you are preferring the other way. Thanks
Add a comment...

Communities

7 communities
 
For anyone using node or a node based build system, I have created a node wrapper for jslint with the following features:

- Fetches and uses the latest version of JSLint from its github repository
- Supports file/directory watching
- Command line support
- Glob pattern matching files


3
Ben Pardo's profile photo
 
Thank you.
Add a comment...
 
Passing the following code through jslint:

/*jslint es6 */

import {div} from "@cycle/dom";
import xs from "xstream";

export function App() {
const vtree$ = xs.of(
div("Hello world!")
);
const sinks = {
DOM: vtree$
};
return sinks;
}

returns the following errors:

Unused 'vtree$'.
const vtree$ = xs.of(
Unused 'sinks'.
const sinks = {
Undeclared 'vtree$'.
DOM: vtree$
Undeclared 'sinks'.
return sinks;

Am I missing something?
1
Fedge No's profile photoDouglas Crockford's profile photoΝίκος Καλογρίδης's profile photo
5 comments
 
+Douglas Crockford thanks works like a charm!
Add a comment...
 
Bad module name. The following line produces an error on JSLint:

/*jslint es6 */
import Cycle from '@cycle/core';

-> Bad module name '@cycle/core'

npm uses the @ sign for name spacing modules which I think is a good idea, name spacing of modules, for the @ I am not so sure. Any chance of accepting this in JSLint?
2
Douglas Crockford's profile photoΝίκος Καλογρίδης's profile photoNicola Squartini's profile photo
5 comments
 
Thanks!
Add a comment...
 
/*jslint
browser
*/
/*global
google
*/
(function () {
'use strict';
return new google.maps.places.Autocomplete();
}());

jslint complains with:
Expected 'new' before '.'.
return new google.maps.places.Autocomplete();

if I remove the ".places" part of the statement it seems to not produce that error. Am I missing something or is this a bug?
1
Stéphane Trebel's profile photoЕвгений Орехов (Evgeny Orekhov)'s profile photoDouglas Crockford's profile photo
3 comments
 
Thanks. Please try it now.
Add a comment...
 
For the code below:
/*jslint node */
'use strict';
function applyTo() {
var args = arguments;
return function (f) {
return f.apply(undefined, args);
};
}
applyTo();

JSLint complains with
Unexpected 'arguments'.
what am I missing?
1
Chad Walker's profile photoLong TRAN's profile photoDouglas Crockford's profile photoΝίκος Καλογρίδης's profile photo
9 comments
Add a comment...
Communities
7 communities
Work
Occupation
Web Developer
Employment
  • Freelance
    Web developer, present
  • ΙΒΜ, Vodafone, Velti, Printo
    present
  • Funkmartini
    Web Developer, present
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Αγία Παρασκευή
Previously
Αθήνα - Κυψέλη, Ρέα Δροσιάς
Collections Νίκος is following
Education
  • University of Wales, Swansea
    Computer Science, 1997 - 1999
Basic Information
Gender
Male