processing / p5.accessibility

p5.accessibility.js makes the p5 canvas more accessible to people who are blind and visually impaired. It can be used with any p5.js sketch and it is used in the p5.js web editor.
GNU Lesser General Public License v2.1
74 stars 27 forks source link

grunt curl 's colorNamer.js has lint errors #97

Open mithru opened 6 years ago

mithru commented 6 years ago

Nature of issue?

Details about the bug:

Following this step in the readme generates a new colorNamer.js with indents that eslint doesn't like. run grunt curl to get the latest versions of the CDN libraries

Feature enhancement details:

New feature details:

spiray commented 6 years ago

@mithru I am not seeing the same issue. Maybe it is your text editor settings? Either way, does running eslint src/ --fix work for you? Do you think i should add --fix in to the build script?

lm-n commented 6 years ago

I can fix in the color library.

mithru commented 6 years ago

Tried eslint src/ --fix on a borrowed machine and this happens (I see the same lint errors in colorNamer.js - I was using vim in both scenarios which defaults to 4-spaced tabs instead of a single space):

Error: Cannot find module 'eslint-config-p5js'

npm install --save-dev eslint-config-p5js doesn't seem to help either. I'm definitely missing something on both machines (Windows and Mac). Any ideas? Help, please.

spiray commented 6 years ago

@mithru I am not having this issue. Did you run npm install? If so, can you try it in another editor to see if it is being caused by VIM's behavior?

lm-n commented 6 years ago

@mithru I've updated the colornamer could you try and let me know if there are no linting errors?

mithru commented 6 years ago

@lm-n

The lint setup on p5 accessibility library still complains about spaces, but I think @spiray 's method of adding --fix to the build script might be the way to handle this, since color namer doesn't necessarily have to abide by eslint-config-p5js

In any case, here's what npm run build throws at me. eslint src/ --fix fixes these indent issues.

eslint-config-p5js and eslint are installed globally on my machine though. I have not tried having both just local.

    2:1   error  Expected indentation of 2 spaces but found 4    indent
    3:1   error  Expected indentation of 2 spaces but found 4    indent
mithru commented 6 years ago

changing the colorNamer to es6 definitely helped.