Skip to content

Conversation

Belema
Copy link

@Belema Belema commented Dec 21, 2015

Added JSHint to project and to build.

Fixed all 18 errors below,

slug.js: line 5, col 19, Expected '{' and instead saw 'return'.
slug.js: line 8, col 60, Missing semicolon.
slug.js: line 15, col 9, Expected '{' and instead saw 'opts'.
slug.js: line 24, col 9, Expected '{' and instead saw 'opts'.
slug.js: line 27, col 18, 'key' is already defined.
slug.js: line 29, col 13, Expected '{' and instead saw 'continue'.
slug.js: line 33, col 13, Expected '{' and instead saw 'lengths'.
slug.js: line 37, col 22, 'i' is already defined.
slug.js: line 37, col 29, 'l' is already defined.
slug.js: line 44, col 20, Expected '{' and instead saw 'return'.
slug.js: line 45, col 10, Don't make functions within a loop.
slug.js: line 61, col 26, Expected '{' and instead saw 'char'.
slug.js: line 68, col 7, Expected '{' and instead saw 'result'.
slug.js: line 70, col 2, Unnecessary semicolon.
slug.js: line 193, col 13, Expected '{' and instead saw 'continue'.
slug.js: line 197, col 40, Missing semicolon.
slug.js: line 203, col 18, 'key' is already defined.
slug.js: line 205, col 13, Expected '{' and instead saw 'continue'.

Note that,

  • I have used [].forEach() where appropriate, because it is as well supported in browsers as [].some() is, so this is a non breaking change.
  • I haven't used Object.keys() because it is not as well supported as [].some, so some browsers would have suffered from the change.
  • I have not changed the algorithm at all, as this in not part of this work.

@Belema Belema force-pushed the lint branch 2 times, most recently from e597fcd to f330442 Compare December 21, 2015 17:18
@lillem4n
Copy link

lillem4n commented Jan 5, 2018

I'm trying to sum up all PR:s from this project to a fork here https://github.com/larvit/larvitslugify until this project comes alive again. Could you pretty please add this PR to that fork?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants