Skip to content

Commit 502839d

Browse files
committed
Moved everything to ./JavaScript, add 'use strict'
1 parent fac7f8b commit 502839d

28 files changed

+178
-1
lines changed

.eslintrc.yml

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
parserOptions:
2+
ecmaVersion: 6
3+
env:
4+
node: true
5+
extends: 'eslint:recommended'
6+
globals:
7+
Promise: false
8+
rules:
9+
indent:
10+
- error
11+
- 2
12+
- SwitchCase: 1
13+
VariableDeclarator:
14+
var: 2
15+
let: 2
16+
const: 3
17+
MemberExpression: 1
18+
linebreak-style:
19+
- error
20+
- unix
21+
quotes:
22+
- error
23+
- single
24+
semi:
25+
- error
26+
- always
27+
eqeqeq:
28+
- error
29+
- always
30+
no-loop-func:
31+
- error
32+
strict:
33+
- error
34+
- global
35+
block-spacing:
36+
- error
37+
- always
38+
brace-style:
39+
- error
40+
- 1tbs
41+
- allowSingleLine: true
42+
camelcase:
43+
- error
44+
comma-style:
45+
- error
46+
- last
47+
comma-spacing:
48+
- error
49+
- before: false
50+
after: true
51+
eol-last:
52+
- error
53+
func-call-spacing:
54+
- error
55+
- never
56+
key-spacing:
57+
- error
58+
- beforeColon: false
59+
afterColon: true
60+
mode: minimum
61+
keyword-spacing:
62+
- error
63+
- before: true
64+
after: true
65+
overrides:
66+
function:
67+
after: false
68+
max-len:
69+
- error
70+
- code: 80
71+
ignoreUrls: true
72+
max-nested-callbacks:
73+
- error
74+
- max: 5
75+
new-cap:
76+
- error
77+
- newIsCap: true
78+
capIsNew: true
79+
properties: true
80+
new-parens:
81+
- error
82+
no-lonely-if:
83+
- error
84+
no-trailing-spaces:
85+
- error
86+
no-unneeded-ternary:
87+
- error
88+
no-whitespace-before-property:
89+
- error
90+
object-curly-spacing:
91+
- error
92+
- always
93+
operator-assignment:
94+
- error
95+
- always
96+
operator-linebreak:
97+
- error
98+
- after
99+
semi-spacing:
100+
- error
101+
- before: false
102+
after: true
103+
space-before-blocks:
104+
- error
105+
- always
106+
space-before-function-paren:
107+
- error
108+
- never
109+
space-in-parens:
110+
- error
111+
- never
112+
space-infix-ops:
113+
- error
114+
space-unary-ops:
115+
- error
116+
- words: true
117+
nonwords: false
118+
overrides:
119+
typeof: false
120+
no-unreachable:
121+
- error
122+
no-global-assign:
123+
- error
124+
no-self-compare:
125+
- error
126+
no-unmodified-loop-condition:
127+
- error
128+
no-constant-condition:
129+
- error
130+
- checkLoops: false
131+
no-console:
132+
- off
133+
no-useless-concat:
134+
- error
135+
no-useless-escape:
136+
- error
137+
no-shadow-restricted-names:
138+
- error
139+
no-use-before-define:
140+
- error
141+
- functions: false

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
node_modules
2-
npm_debug.log
2+
*.log
33
.DS_Store

.jshintrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"esversion": 6,
3+
"node": true
4+
}

1-callbacks.js renamed to JavaScript/1-callbacks.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
const fs = require('fs');
24

35
fs.readFile('file1.txt', (err, data) => {

10-files.js renamed to JavaScript/10-files.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
const fs = require('fs');
24
const async = require('./async');
35
const promisify = require('./promisify');

11-errors.js renamed to JavaScript/11-errors.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
const fs = require('fs');
24
const async = require('./async');
35
const promisify = require('./promisify');

12-errors.js renamed to JavaScript/12-errors.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
const fs = require('fs');
24
const async = require('./async');
35
const promisify = require('./promisify');

2-promises.js renamed to JavaScript/2-promises.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
const fs = require('fs');
24

35
function readFile(filename) {

3-promises.js renamed to JavaScript/3-promises.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
const fs = require('fs');
24
const promisify = require('./promisify');
35

4-promises.js renamed to JavaScript/4-promises.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
const fs = require('fs');
24
const promisify = require('./promisify');
35

0 commit comments

Comments
 (0)