CodeforAustralia / school-finder

:eyes: Find schools by location
https://education.nsw.gov.au/school-finder
GNU General Public License v3.0
17 stars 7 forks source link

Closes #326 - Spam coming through the help links #327

Closed reekypete closed 7 years ago

techieshark commented 7 years ago

Sweet. A couple things:

1) We'll need some tweaks to make it work with both hover and focus, otherwise it doesn't work for users that are unable to use a mouse. Something like this might do:

$('.mTo').hover(fixMail).focus(fixMail);

2) Running eslint js/app.js gives some errors:

  293:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  293:6    error    'hrf' is not defined                               no-undef
  293:12   warning  Strings must use singlequote                       quotes
  293:19   warning  Strings must use singlequote                       quotes
  294:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  294:6    error    'a' is not defined                                 no-undef
  294:10   warning  Strings must use singlequote                       quotes
  295:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  295:6    error    'b' is not defined                                 no-undef
  295:10   warning  Strings must use singlequote                       quotes
  296:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  296:6    error    'c' is not defined                                 no-undef
  296:10   warning  Strings must use singlequote                       quotes
  297:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  297:6    error    'at' is not defined                                no-undef
  297:11   warning  Strings must use singlequote                       quotes
  298:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  298:6    error    'd' is not defined                                 no-undef
  298:10   warning  Strings must use singlequote                       quotes
  299:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  299:6    error    'e' is not defined                                 no-undef
  299:10   warning  Strings must use singlequote                       quotes
  300:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  300:6    error    'dot' is not defined                               no-undef
  300:12   warning  Strings must use singlequote                       quotes
  301:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  301:6    error    'f' is not defined                                 no-undef
  301:10   warning  Strings must use singlequote                       quotes
  302:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  302:6    error    'g' is not defined                                 no-undef
  302:10   warning  Strings must use singlequote                       quotes
  303:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  303:6    error    'h' is not defined                                 no-undef
  303:10   warning  Strings must use singlequote                       quotes
  304:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  304:6    error    'i' is not defined                                 no-undef
  304:10   warning  Strings must use singlequote                       quotes
  305:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  305:6    error    'j' is not defined                                 no-undef
  305:10   warning  Strings must use singlequote                       quotes
  306:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  306:6    error    'k' is not defined                                 no-undef
  306:10   warning  Strings must use singlequote                       quotes
  307:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  307:6    error    'l' is not defined                                 no-undef
  307:10   warning  Strings must use singlequote                       quotes
  308:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  308:6    error    'm' is not defined                                 no-undef
  308:10   warning  Strings must use singlequote                       quotes
  309:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  309:6    error    'n' is not defined                                 no-undef
  309:10   warning  Strings must use singlequote                       quotes
  310:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  310:6    error    'o' is not defined                                 no-undef
  310:10   warning  Strings must use singlequote                       quotes
  311:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  311:6    error    'p' is not defined                                 no-undef
  311:10   warning  Strings must use singlequote                       quotes
  312:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  312:6    error    'q' is not defined                                 no-undef
  312:10   warning  Strings must use singlequote                       quotes
  313:3    error    Expected indentation of 6 spaces but found 2 tabs  indent
  313:20   error    'hrf' is not defined                               no-undef
  313:28   warning  Strings must use singlequote                       quotes
  314:4    error    Expected indentation of 2 spaces but found 3 tabs  indent
  314:17   error    'hrf' is not defined                               no-undef
  314:22   error    'a' is not defined                                 no-undef
  314:26   error    'b' is not defined                                 no-undef
  314:30   error    'c' is not defined                                 no-undef
  314:34   error    'at' is not defined                                no-undef
  314:39   error    'd' is not defined                                 no-undef
  314:43   error    'e' is not defined                                 no-undef
  314:47   error    'dot' is not defined                               no-undef
  314:53   error    'f' is not defined                                 no-undef
  314:57   error    'g' is not defined                                 no-undef
  314:61   error    'dot' is not defined                               no-undef
  314:67   error    'h' is not defined                                 no-undef
  314:71   error    'i' is not defined                                 no-undef
  314:75   error    'j' is not defined                                 no-undef
  314:79   error    'k' is not defined                                 no-undef
  314:83   error    'l' is not defined                                 no-undef
  314:87   error    'c' is not defined                                 no-undef
  314:91   error    'at' is not defined                                no-undef
  314:96   error    'm' is not defined                                 no-undef
  314:100  error    'n' is not defined                                 no-undef
  314:104  error    'dot' is not defined                               no-undef
  314:110  error    'o' is not defined                                 no-undef
  314:114  error    'p' is not defined                                 no-undef
  314:118  error    'q' is not defined                                 no-undef
  314:120  error    Missing semicolon                                  semi
  315:3    error    Expected indentation of 0 spaces but found 2 tabs  indent
  316:3    error    Expected indentation of 6 spaces but found 2 tabs  indent
  317:4    error    Expected indentation of 2 spaces but found 3 tabs  indent
  317:17   error    'hrf' is not defined                               no-undef
  317:22   warning  Strings must use singlequote                       quotes
  317:25   error    Missing semicolon                                  semi
  318:3    error    Expected indentation of 0 spaces but found 2 tabs  indent
  319:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  320:2    error    Mixed spaces and tabs                              no-mixed-spaces-and-tabs
  321:7    error    Expected indentation of 4 spaces but found 6       indent

Looks like a lot, but it's mostly just a few things (suggest using var = list,of,vars; rather than list;of;vars for example).

techieshark commented 7 years ago

$ eslint js/app.js output:

  296:10  error  Expected indentation of 10 spaces but found 9  indent
  297:10  error  Expected indentation of 10 spaces but found 9  indent
  298:10  error  Expected indentation of 10 spaces but found 9  indent
  299:10  error  Expected indentation of 10 spaces but found 9  indent
  300:10  error  Expected indentation of 10 spaces but found 9  indent
  301:10  error  Expected indentation of 10 spaces but found 9  indent
  302:10  error  Expected indentation of 10 spaces but found 9  indent
  303:10  error  Expected indentation of 10 spaces but found 9  indent
  304:10  error  Expected indentation of 10 spaces but found 9  indent
  305:10  error  Expected indentation of 10 spaces but found 9  indent
  306:10  error  Expected indentation of 10 spaces but found 9  indent
  307:10  error  Expected indentation of 10 spaces but found 9  indent
  308:10  error  Expected indentation of 10 spaces but found 9  indent
  309:10  error  Expected indentation of 10 spaces but found 9  indent
  310:10  error  Expected indentation of 10 spaces but found 9  indent
  311:10  error  Expected indentation of 10 spaces but found 9  indent
  312:10  error  Expected indentation of 10 spaces but found 9  indent
  313:10  error  Expected indentation of 10 spaces but found 9  indent
  314:10  error  Expected indentation of 6 spaces but found 9   indent
  316:10  error  Expected indentation of 6 spaces but found 9   indent
  320:10  error  Expected indentation of 6 spaces but found 9   indent
  321:10  error  Expected indentation of 6 spaces but found 9   indent

✖ 22 problems (22 errors, 0 warnings)
techieshark commented 7 years ago

Addressed by #331