Skip to content

Commit

Permalink
Add eslint check
Browse files Browse the repository at this point in the history
  • Loading branch information
dknight committed Feb 18, 2018
1 parent 8c6a4fc commit 6df9c1e
Show file tree
Hide file tree
Showing 4 changed files with 2,149 additions and 18 deletions.
19 changes: 19 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
env:
browser: true
commonjs: true
es6: true
node: true
extends: 'eslint:recommended'
rules:
indent:
- error
- 2
linebreak-style:
- error
- unix
quotes:
- error
- single
semi:
- error
- always
28 changes: 14 additions & 14 deletions isikukood.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,18 @@
var firstNumber = this.code.charAt(0),
retval = '';
switch (firstNumber) {
case '1':
case '3':
case '5':
retval = 'male';
break;
case '2':
case '4':
case '6':
retval = 'female';
break;
default:
retval = 'unknown';
case '1':
case '3':
case '5':
retval = 'male';
break;
case '2':
case '4':
case '6':
retval = 'female';
break;
default:
retval = 'unknown';
}
return retval;
};
Expand Down Expand Up @@ -167,7 +167,7 @@
gender = params.gender || ((Math.round(Math.random()) === 0 ) ? 'male' : 'female'),
personalId = '',

// Places of brith (Estonian Hospitals)
// Places of brith (Estonian Hospitals)
hospitals = [
'00', // Kuressaare Haigla (järjekorranumbrid 001 kuni 020)
'01', // Tartu Ülikooli Naistekliinik, Tartumaa, Tartu (011...019)
Expand Down Expand Up @@ -252,7 +252,7 @@
* @copyright 2014-2015
*/
function IsikukoodException(err) {
console.error(err);
throw new Error(err);
}

// Make it available for Browsers and
Expand Down
Loading

0 comments on commit 6df9c1e

Please sign in to comment.