trackler 2.0.8.46 → 2.0.8.47
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/tracks/ecmascript/.travis.yml +1 -1
- data/tracks/ecmascript/README.md +9 -4
- data/tracks/ecmascript/exercises/accumulate/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/accumulate/package.json +7 -2
- data/tracks/ecmascript/exercises/acronym/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/acronym/package.json +7 -2
- data/tracks/ecmascript/exercises/all-your-base/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/all-your-base/package.json +7 -2
- data/tracks/ecmascript/exercises/allergies/allergies.spec.js +1 -1
- data/tracks/ecmascript/exercises/allergies/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/allergies/package.json +7 -2
- data/tracks/ecmascript/exercises/anagram/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/anagram/package.json +7 -2
- data/tracks/ecmascript/exercises/atbash-cipher/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/atbash-cipher/package.json +7 -2
- data/tracks/ecmascript/exercises/beer-song/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/beer-song/package.json +7 -2
- data/tracks/ecmascript/exercises/binary-search-tree/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/binary-search-tree/package.json +7 -2
- data/tracks/ecmascript/exercises/binary-search/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/binary-search/package.json +7 -2
- data/tracks/ecmascript/exercises/binary/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/binary/package.json +7 -2
- data/tracks/ecmascript/exercises/bob/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/bob/package.json +7 -2
- data/tracks/ecmascript/exercises/bracket-push/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/bracket-push/package.json +7 -2
- data/tracks/ecmascript/exercises/circular-buffer/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/circular-buffer/package.json +7 -2
- data/tracks/ecmascript/exercises/clock/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/clock/package.json +7 -2
- data/tracks/ecmascript/exercises/crypto-square/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/crypto-square/package.json +7 -2
- data/tracks/ecmascript/exercises/custom-set/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/custom-set/package.json +7 -2
- data/tracks/ecmascript/exercises/diamond/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/diamond/package.json +7 -2
- data/tracks/ecmascript/exercises/difference-of-squares/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/difference-of-squares/package.json +7 -2
- data/tracks/ecmascript/exercises/etl/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/etl/package.json +7 -2
- data/tracks/ecmascript/exercises/food-chain/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/food-chain/package.json +7 -2
- data/tracks/ecmascript/exercises/gigasecond/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/gigasecond/package.json +7 -2
- data/tracks/ecmascript/exercises/grade-school/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/grade-school/package.json +7 -2
- data/tracks/ecmascript/exercises/grains/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/grains/package.json +7 -2
- data/tracks/ecmascript/exercises/gulpfile.js +89 -0
- data/tracks/ecmascript/exercises/hamming/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/hamming/package.json +7 -2
- data/tracks/ecmascript/exercises/hello-world/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/hello-world/package.json +7 -2
- data/tracks/ecmascript/exercises/hexadecimal/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/hexadecimal/package.json +7 -2
- data/tracks/ecmascript/exercises/isogram/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/isogram/package.json +7 -2
- data/tracks/ecmascript/exercises/kindergarten-garden/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/kindergarten-garden/package.json +7 -2
- data/tracks/ecmascript/exercises/largest-series-product/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/largest-series-product/package.json +7 -2
- data/tracks/ecmascript/exercises/leap/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/leap/package.json +7 -2
- data/tracks/ecmascript/exercises/linked-list/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/linked-list/package.json +7 -2
- data/tracks/ecmascript/exercises/luhn/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/luhn/package.json +7 -2
- data/tracks/ecmascript/exercises/matrix/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/matrix/package.json +7 -2
- data/tracks/ecmascript/exercises/meetup/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/meetup/package.json +7 -2
- data/tracks/ecmascript/exercises/nth-prime/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/nth-prime/package.json +7 -2
- data/tracks/ecmascript/exercises/ocr-numbers/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/ocr-numbers/package.json +7 -2
- data/tracks/ecmascript/exercises/octal/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/octal/package.json +7 -2
- data/tracks/ecmascript/exercises/package.json +28 -0
- data/tracks/ecmascript/exercises/palindrome-products/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/palindrome-products/package.json +7 -2
- data/tracks/ecmascript/exercises/pangram/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/pangram/package.json +7 -2
- data/tracks/ecmascript/exercises/pascals-triangle/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/pascals-triangle/package.json +7 -2
- data/tracks/ecmascript/exercises/perfect-numbers/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/perfect-numbers/package.json +7 -2
- data/tracks/ecmascript/exercises/phone-number/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/phone-number/package.json +7 -2
- data/tracks/ecmascript/exercises/pig-latin/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/pig-latin/package.json +7 -2
- data/tracks/ecmascript/exercises/prime-factors/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/prime-factors/package.json +7 -2
- data/tracks/ecmascript/exercises/pythagorean-triplet/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/pythagorean-triplet/package.json +7 -2
- data/tracks/ecmascript/exercises/queen-attack/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/queen-attack/package.json +7 -2
- data/tracks/ecmascript/exercises/raindrops/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/raindrops/package.json +7 -2
- data/tracks/ecmascript/exercises/rna-transcription/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/rna-transcription/package.json +7 -2
- data/tracks/ecmascript/exercises/robot-name/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/robot-name/package.json +7 -2
- data/tracks/ecmascript/exercises/robot-simulator/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/robot-simulator/package.json +7 -2
- data/tracks/ecmascript/exercises/roman-numerals/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/roman-numerals/package.json +7 -2
- data/tracks/ecmascript/exercises/saddle-points/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/saddle-points/package.json +7 -2
- data/tracks/ecmascript/exercises/say/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/say/package.json +7 -2
- data/tracks/ecmascript/exercises/scrabble-score/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/scrabble-score/package.json +7 -2
- data/tracks/ecmascript/exercises/secret-handshake/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/secret-handshake/package.json +7 -2
- data/tracks/ecmascript/exercises/series/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/series/package.json +7 -2
- data/tracks/ecmascript/exercises/sieve/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/sieve/package.json +7 -2
- data/tracks/ecmascript/exercises/simple-cipher/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/simple-cipher/package.json +7 -2
- data/tracks/ecmascript/exercises/space-age/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/space-age/package.json +7 -2
- data/tracks/ecmascript/exercises/strain/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/strain/package.json +7 -2
- data/tracks/ecmascript/exercises/sum-of-multiples/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/sum-of-multiples/package.json +7 -2
- data/tracks/ecmascript/exercises/triangle/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/triangle/package.json +7 -2
- data/tracks/ecmascript/exercises/triangle/triangle.spec.js +1 -1
- data/tracks/ecmascript/exercises/trinary/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/trinary/package.json +7 -2
- data/tracks/ecmascript/exercises/two-bucket/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/two-bucket/package.json +7 -2
- data/tracks/ecmascript/exercises/word-count/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/word-count/package.json +7 -2
- data/tracks/ecmascript/exercises/wordy/gulpfile.js +41 -38
- data/tracks/ecmascript/exercises/wordy/package.json +7 -2
- data/tracks/ecmascript/gulpfile.js +41 -38
- data/tracks/ecmascript/package.json +7 -2
- data/tracks/julia/exercises/difference-of-squares/difference-of-squares.jl +4 -4
- data/tracks/lfe/docs/INSTALLATION.md +10 -2
- data/tracks/objective-c/config.json +9 -0
- data/tracks/objective-c/exercises/pascals-triangle/PascalsTriangleExample.h +9 -0
- data/tracks/objective-c/exercises/pascals-triangle/PascalsTriangleExample.m +54 -0
- data/tracks/objective-c/exercises/pascals-triangle/PascalsTriangleTest.m +53 -0
- data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/project.pbxproj +18 -0
- data/tracks/python/exercises/grains/example.py +13 -2
- data/tracks/python/exercises/grains/grains_test.py +22 -1
- data/tracks/swift/.travis.yml +9 -2
- data/tracks/swift/exercises/binary-search-tree/Sources/BinarySearchTreeExample.swift +1 -1
- data/tracks/swift/exercises/minesweeper/Sources/MinesweeperExample.swift +4 -0
- data/tracks/swift/exercises/robot-name/Tests/RobotNameTests/RobotNameTests.swift +5 -1
- metadata +7 -2
@@ -9,10 +9,15 @@
|
|
9
9
|
"url": "https://github.com/exercism/xecmascript"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
|
-
"babel": "
|
12
|
+
"babel-cli": "^6.24.1",
|
13
|
+
"babel-core": "^6.24.1",
|
14
|
+
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
15
|
+
"babel-polyfill": "^6.23.0",
|
16
|
+
"babel-preset-env": "^1.3.3",
|
17
|
+
"babel-preset-es2015": "^6.24.1",
|
13
18
|
"del": "~2.0.2",
|
14
19
|
"gulp": "~3.9.0",
|
15
|
-
"gulp-babel": "
|
20
|
+
"gulp-babel": "^6.1.2",
|
16
21
|
"gulp-eslint": "^1.1.0",
|
17
22
|
"gulp-jasmine": "~2.4.2",
|
18
23
|
"yargs": "~3.27.0"
|
@@ -16,65 +16,68 @@ const gulp = require('gulp'),
|
|
16
16
|
eslint = require('gulp-eslint'),
|
17
17
|
jasmine = require('gulp-jasmine'),
|
18
18
|
babel = require('gulp-babel'),
|
19
|
-
polyfill = require('babel
|
19
|
+
polyfill = require('babel-polyfill'),
|
20
20
|
del = require('del'),
|
21
|
-
argv
|
21
|
+
argv = require('yargs').argv,
|
22
22
|
inputDir = getInputDirectory(argv),
|
23
23
|
outputDir = getOutputDirectory(argv);
|
24
24
|
|
25
25
|
// Gulp tasks definition
|
26
26
|
|
27
|
-
gulp.task('default', [
|
27
|
+
gulp.task('default', ['test']);
|
28
28
|
|
29
|
-
gulp.task('test', [
|
30
|
-
return gulp.src([
|
29
|
+
gulp.task('test', ['babel'], function () {
|
30
|
+
return gulp.src([outputDir + '/*.spec.js'])
|
31
31
|
.pipe(jasmine());
|
32
32
|
});
|
33
33
|
|
34
34
|
gulp.task('babel', function () {
|
35
|
-
return gulp.src([
|
36
|
-
.pipe(babel(
|
35
|
+
return gulp.src([inputDir + '/*.js', inputDir + '/lib/*.js'])
|
36
|
+
.pipe(babel({
|
37
|
+
plugins: ["babel-plugin-transform-object-rest-spread"].map(require.resolve),
|
38
|
+
presets: ['babel-preset-env'].map(require.resolve)
|
39
|
+
}))
|
37
40
|
.pipe(gulp.dest(outputDir));
|
38
41
|
});
|
39
42
|
|
40
43
|
gulp.task('lint', function () {
|
41
|
-
return gulp.src([
|
44
|
+
return gulp.src([inputDir + '/*.js'])
|
42
45
|
.pipe(eslint({
|
43
|
-
envs:
|
46
|
+
envs: [
|
44
47
|
'es6' //turns on all es6 features except modules
|
45
48
|
],
|
46
|
-
rules:
|
49
|
+
rules: {
|
47
50
|
// full documentation here : http://eslint.org/docs/rules
|
48
51
|
|
49
52
|
// Possible errors
|
50
|
-
'comma-dangle':
|
51
|
-
'no-cond-assign':
|
52
|
-
'no-console':
|
53
|
-
'no-constant-condition':
|
54
|
-
'no-control-regex':
|
55
|
-
'no-debugger':
|
56
|
-
'no-dupe-args':
|
57
|
-
'no-dupe-keys':
|
58
|
-
'no-duplicate-case':
|
53
|
+
'comma-dangle': [2, 'never'], // don't let a comma at the end of object properties or array element
|
54
|
+
'no-cond-assign': [2, 'always'], // no assignments in conditional statements
|
55
|
+
'no-console': 2, // no console.log() statements in production code
|
56
|
+
'no-constant-condition': 2, // no constants in conditional statements
|
57
|
+
'no-control-regex': 2, // no control characters in regex's
|
58
|
+
'no-debugger': 2, // no debugger in productin code
|
59
|
+
'no-dupe-args': 2, // no duplicated arguments in functions
|
60
|
+
'no-dupe-keys': 2, // no duplicated keys when creating object literals
|
61
|
+
'no-duplicate-case': 2, // no duplicated `case` in `switch` statements
|
59
62
|
'no-empty-character-class': 2, // disallow the use of empty character classes in regular expressions
|
60
|
-
'no-empty':
|
61
|
-
'no-ex-assign':
|
62
|
-
'no-extra-boolean-cast':
|
63
|
-
'no-extra-parens':
|
64
|
-
'no-extra-semi':
|
65
|
-
'no-func-assign':
|
66
|
-
'no-inner-declarations':
|
67
|
-
'no-invalid-regexp':
|
68
|
-
'no-irregular-whitespace':
|
69
|
-
'no-negated-in-lhs':
|
70
|
-
'no-obj-calls':
|
71
|
-
'no-regex-spaces':
|
72
|
-
'no-sparse-arrays':
|
73
|
-
'no-unexpected-multiline':
|
74
|
-
'no-unreachable':
|
75
|
-
'use-isnan':
|
76
|
-
'valid-jsdoc':
|
77
|
-
'valid-typeof':
|
63
|
+
'no-empty': 2, // no empty blocks
|
64
|
+
'no-ex-assign': 2, // do not assign any value to an Exception raised
|
65
|
+
'no-extra-boolean-cast': 2, // do not use !!falseExpression to cast to boolean
|
66
|
+
'no-extra-parens': 2, // do not use extra parenthesis
|
67
|
+
'no-extra-semi': 2, // do not use extra semicolons
|
68
|
+
'no-func-assign': 2, // do not overwrite variables declared as functions
|
69
|
+
'no-inner-declarations': [2, 'both'], // only declare var's and funct's on function scope
|
70
|
+
'no-invalid-regexp': 2, // validates string arguments passed to RegExp constructor
|
71
|
+
'no-irregular-whitespace': 2, // detects special characters used as spaces
|
72
|
+
'no-negated-in-lhs': 2, // do not use negation in the left operand in an `in` expression
|
73
|
+
'no-obj-calls': 2, // prevent calling global objects as if they were functions
|
74
|
+
'no-regex-spaces': 2, // do not use multiple spaces in regex's
|
75
|
+
'no-sparse-arrays': 2, // do not use sparse arrays (empty elements)
|
76
|
+
'no-unexpected-multiline': 2, // Avoid code that looks like two expressions but is actually one
|
77
|
+
'no-unreachable': 2, // detects unreachable statements (after return, throw,...)
|
78
|
+
'use-isnan': 2, // do not compare with `NaN` value, use isNan() instead
|
79
|
+
'valid-jsdoc': 2, // ensure JSDoc comments are valid
|
80
|
+
'valid-typeof': 2 // ensure that the results of typeof are compared against a valid string
|
78
81
|
},
|
79
82
|
ecmaFeatures: {
|
80
83
|
'modules': true //this gives us modules :)
|
@@ -85,5 +88,5 @@ gulp.task('lint', function () {
|
|
85
88
|
});
|
86
89
|
|
87
90
|
gulp.task('clean', function (cb) {
|
88
|
-
del([
|
91
|
+
del([outputDir], cb);
|
89
92
|
});
|
@@ -9,10 +9,15 @@
|
|
9
9
|
"url": "https://github.com/exercism/xecmascript"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
|
-
"babel": "
|
12
|
+
"babel-cli": "^6.24.1",
|
13
|
+
"babel-core": "^6.24.1",
|
14
|
+
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
15
|
+
"babel-polyfill": "^6.23.0",
|
16
|
+
"babel-preset-env": "^1.3.3",
|
17
|
+
"babel-preset-es2015": "^6.24.1",
|
13
18
|
"del": "~2.0.2",
|
14
19
|
"gulp": "~3.9.0",
|
15
|
-
"gulp-babel": "
|
20
|
+
"gulp-babel": "^6.1.2",
|
16
21
|
"gulp-eslint": "^1.1.0",
|
17
22
|
"gulp-jasmine": "~2.4.2",
|
18
23
|
"yargs": "~3.27.0"
|
@@ -16,65 +16,68 @@ const gulp = require('gulp'),
|
|
16
16
|
eslint = require('gulp-eslint'),
|
17
17
|
jasmine = require('gulp-jasmine'),
|
18
18
|
babel = require('gulp-babel'),
|
19
|
-
polyfill = require('babel
|
19
|
+
polyfill = require('babel-polyfill'),
|
20
20
|
del = require('del'),
|
21
|
-
argv
|
21
|
+
argv = require('yargs').argv,
|
22
22
|
inputDir = getInputDirectory(argv),
|
23
23
|
outputDir = getOutputDirectory(argv);
|
24
24
|
|
25
25
|
// Gulp tasks definition
|
26
26
|
|
27
|
-
gulp.task('default', [
|
27
|
+
gulp.task('default', ['test']);
|
28
28
|
|
29
|
-
gulp.task('test', [
|
30
|
-
return gulp.src([
|
29
|
+
gulp.task('test', ['babel'], function () {
|
30
|
+
return gulp.src([outputDir + '/*.spec.js'])
|
31
31
|
.pipe(jasmine());
|
32
32
|
});
|
33
33
|
|
34
34
|
gulp.task('babel', function () {
|
35
|
-
return gulp.src([
|
36
|
-
.pipe(babel(
|
35
|
+
return gulp.src([inputDir + '/*.js', inputDir + '/lib/*.js'])
|
36
|
+
.pipe(babel({
|
37
|
+
plugins: ["babel-plugin-transform-object-rest-spread"].map(require.resolve),
|
38
|
+
presets: ['babel-preset-env'].map(require.resolve)
|
39
|
+
}))
|
37
40
|
.pipe(gulp.dest(outputDir));
|
38
41
|
});
|
39
42
|
|
40
43
|
gulp.task('lint', function () {
|
41
|
-
return gulp.src([
|
44
|
+
return gulp.src([inputDir + '/*.js'])
|
42
45
|
.pipe(eslint({
|
43
|
-
envs:
|
46
|
+
envs: [
|
44
47
|
'es6' //turns on all es6 features except modules
|
45
48
|
],
|
46
|
-
rules:
|
49
|
+
rules: {
|
47
50
|
// full documentation here : http://eslint.org/docs/rules
|
48
51
|
|
49
52
|
// Possible errors
|
50
|
-
'comma-dangle':
|
51
|
-
'no-cond-assign':
|
52
|
-
'no-console':
|
53
|
-
'no-constant-condition':
|
54
|
-
'no-control-regex':
|
55
|
-
'no-debugger':
|
56
|
-
'no-dupe-args':
|
57
|
-
'no-dupe-keys':
|
58
|
-
'no-duplicate-case':
|
53
|
+
'comma-dangle': [2, 'never'], // don't let a comma at the end of object properties or array element
|
54
|
+
'no-cond-assign': [2, 'always'], // no assignments in conditional statements
|
55
|
+
'no-console': 2, // no console.log() statements in production code
|
56
|
+
'no-constant-condition': 2, // no constants in conditional statements
|
57
|
+
'no-control-regex': 2, // no control characters in regex's
|
58
|
+
'no-debugger': 2, // no debugger in productin code
|
59
|
+
'no-dupe-args': 2, // no duplicated arguments in functions
|
60
|
+
'no-dupe-keys': 2, // no duplicated keys when creating object literals
|
61
|
+
'no-duplicate-case': 2, // no duplicated `case` in `switch` statements
|
59
62
|
'no-empty-character-class': 2, // disallow the use of empty character classes in regular expressions
|
60
|
-
'no-empty':
|
61
|
-
'no-ex-assign':
|
62
|
-
'no-extra-boolean-cast':
|
63
|
-
'no-extra-parens':
|
64
|
-
'no-extra-semi':
|
65
|
-
'no-func-assign':
|
66
|
-
'no-inner-declarations':
|
67
|
-
'no-invalid-regexp':
|
68
|
-
'no-irregular-whitespace':
|
69
|
-
'no-negated-in-lhs':
|
70
|
-
'no-obj-calls':
|
71
|
-
'no-regex-spaces':
|
72
|
-
'no-sparse-arrays':
|
73
|
-
'no-unexpected-multiline':
|
74
|
-
'no-unreachable':
|
75
|
-
'use-isnan':
|
76
|
-
'valid-jsdoc':
|
77
|
-
'valid-typeof':
|
63
|
+
'no-empty': 2, // no empty blocks
|
64
|
+
'no-ex-assign': 2, // do not assign any value to an Exception raised
|
65
|
+
'no-extra-boolean-cast': 2, // do not use !!falseExpression to cast to boolean
|
66
|
+
'no-extra-parens': 2, // do not use extra parenthesis
|
67
|
+
'no-extra-semi': 2, // do not use extra semicolons
|
68
|
+
'no-func-assign': 2, // do not overwrite variables declared as functions
|
69
|
+
'no-inner-declarations': [2, 'both'], // only declare var's and funct's on function scope
|
70
|
+
'no-invalid-regexp': 2, // validates string arguments passed to RegExp constructor
|
71
|
+
'no-irregular-whitespace': 2, // detects special characters used as spaces
|
72
|
+
'no-negated-in-lhs': 2, // do not use negation in the left operand in an `in` expression
|
73
|
+
'no-obj-calls': 2, // prevent calling global objects as if they were functions
|
74
|
+
'no-regex-spaces': 2, // do not use multiple spaces in regex's
|
75
|
+
'no-sparse-arrays': 2, // do not use sparse arrays (empty elements)
|
76
|
+
'no-unexpected-multiline': 2, // Avoid code that looks like two expressions but is actually one
|
77
|
+
'no-unreachable': 2, // detects unreachable statements (after return, throw,...)
|
78
|
+
'use-isnan': 2, // do not compare with `NaN` value, use isNan() instead
|
79
|
+
'valid-jsdoc': 2, // ensure JSDoc comments are valid
|
80
|
+
'valid-typeof': 2 // ensure that the results of typeof are compared against a valid string
|
78
81
|
},
|
79
82
|
ecmaFeatures: {
|
80
83
|
'modules': true //this gives us modules :)
|
@@ -85,5 +88,5 @@ gulp.task('lint', function () {
|
|
85
88
|
});
|
86
89
|
|
87
90
|
gulp.task('clean', function (cb) {
|
88
|
-
del([
|
91
|
+
del([outputDir], cb);
|
89
92
|
});
|
@@ -9,10 +9,15 @@
|
|
9
9
|
"url": "https://github.com/exercism/xecmascript"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
|
-
"babel": "
|
12
|
+
"babel-cli": "^6.24.1",
|
13
|
+
"babel-core": "^6.24.1",
|
14
|
+
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
15
|
+
"babel-polyfill": "^6.23.0",
|
16
|
+
"babel-preset-env": "^1.3.3",
|
17
|
+
"babel-preset-es2015": "^6.24.1",
|
13
18
|
"del": "~2.0.2",
|
14
19
|
"gulp": "~3.9.0",
|
15
|
-
"gulp-babel": "
|
20
|
+
"gulp-babel": "^6.1.2",
|
16
21
|
"gulp-eslint": "^1.1.0",
|
17
22
|
"gulp-jasmine": "~2.4.2",
|
18
23
|
"yargs": "~3.27.0"
|
@@ -16,65 +16,68 @@ const gulp = require('gulp'),
|
|
16
16
|
eslint = require('gulp-eslint'),
|
17
17
|
jasmine = require('gulp-jasmine'),
|
18
18
|
babel = require('gulp-babel'),
|
19
|
-
polyfill = require('babel
|
19
|
+
polyfill = require('babel-polyfill'),
|
20
20
|
del = require('del'),
|
21
|
-
argv
|
21
|
+
argv = require('yargs').argv,
|
22
22
|
inputDir = getInputDirectory(argv),
|
23
23
|
outputDir = getOutputDirectory(argv);
|
24
24
|
|
25
25
|
// Gulp tasks definition
|
26
26
|
|
27
|
-
gulp.task('default', [
|
27
|
+
gulp.task('default', ['test']);
|
28
28
|
|
29
|
-
gulp.task('test', [
|
30
|
-
return gulp.src([
|
29
|
+
gulp.task('test', ['babel'], function () {
|
30
|
+
return gulp.src([outputDir + '/*.spec.js'])
|
31
31
|
.pipe(jasmine());
|
32
32
|
});
|
33
33
|
|
34
34
|
gulp.task('babel', function () {
|
35
|
-
return gulp.src([
|
36
|
-
.pipe(babel(
|
35
|
+
return gulp.src([inputDir + '/*.js', inputDir + '/lib/*.js'])
|
36
|
+
.pipe(babel({
|
37
|
+
plugins: ["babel-plugin-transform-object-rest-spread"].map(require.resolve),
|
38
|
+
presets: ['babel-preset-env'].map(require.resolve)
|
39
|
+
}))
|
37
40
|
.pipe(gulp.dest(outputDir));
|
38
41
|
});
|
39
42
|
|
40
43
|
gulp.task('lint', function () {
|
41
|
-
return gulp.src([
|
44
|
+
return gulp.src([inputDir + '/*.js'])
|
42
45
|
.pipe(eslint({
|
43
|
-
envs:
|
46
|
+
envs: [
|
44
47
|
'es6' //turns on all es6 features except modules
|
45
48
|
],
|
46
|
-
rules:
|
49
|
+
rules: {
|
47
50
|
// full documentation here : http://eslint.org/docs/rules
|
48
51
|
|
49
52
|
// Possible errors
|
50
|
-
'comma-dangle':
|
51
|
-
'no-cond-assign':
|
52
|
-
'no-console':
|
53
|
-
'no-constant-condition':
|
54
|
-
'no-control-regex':
|
55
|
-
'no-debugger':
|
56
|
-
'no-dupe-args':
|
57
|
-
'no-dupe-keys':
|
58
|
-
'no-duplicate-case':
|
53
|
+
'comma-dangle': [2, 'never'], // don't let a comma at the end of object properties or array element
|
54
|
+
'no-cond-assign': [2, 'always'], // no assignments in conditional statements
|
55
|
+
'no-console': 2, // no console.log() statements in production code
|
56
|
+
'no-constant-condition': 2, // no constants in conditional statements
|
57
|
+
'no-control-regex': 2, // no control characters in regex's
|
58
|
+
'no-debugger': 2, // no debugger in productin code
|
59
|
+
'no-dupe-args': 2, // no duplicated arguments in functions
|
60
|
+
'no-dupe-keys': 2, // no duplicated keys when creating object literals
|
61
|
+
'no-duplicate-case': 2, // no duplicated `case` in `switch` statements
|
59
62
|
'no-empty-character-class': 2, // disallow the use of empty character classes in regular expressions
|
60
|
-
'no-empty':
|
61
|
-
'no-ex-assign':
|
62
|
-
'no-extra-boolean-cast':
|
63
|
-
'no-extra-parens':
|
64
|
-
'no-extra-semi':
|
65
|
-
'no-func-assign':
|
66
|
-
'no-inner-declarations':
|
67
|
-
'no-invalid-regexp':
|
68
|
-
'no-irregular-whitespace':
|
69
|
-
'no-negated-in-lhs':
|
70
|
-
'no-obj-calls':
|
71
|
-
'no-regex-spaces':
|
72
|
-
'no-sparse-arrays':
|
73
|
-
'no-unexpected-multiline':
|
74
|
-
'no-unreachable':
|
75
|
-
'use-isnan':
|
76
|
-
'valid-jsdoc':
|
77
|
-
'valid-typeof':
|
63
|
+
'no-empty': 2, // no empty blocks
|
64
|
+
'no-ex-assign': 2, // do not assign any value to an Exception raised
|
65
|
+
'no-extra-boolean-cast': 2, // do not use !!falseExpression to cast to boolean
|
66
|
+
'no-extra-parens': 2, // do not use extra parenthesis
|
67
|
+
'no-extra-semi': 2, // do not use extra semicolons
|
68
|
+
'no-func-assign': 2, // do not overwrite variables declared as functions
|
69
|
+
'no-inner-declarations': [2, 'both'], // only declare var's and funct's on function scope
|
70
|
+
'no-invalid-regexp': 2, // validates string arguments passed to RegExp constructor
|
71
|
+
'no-irregular-whitespace': 2, // detects special characters used as spaces
|
72
|
+
'no-negated-in-lhs': 2, // do not use negation in the left operand in an `in` expression
|
73
|
+
'no-obj-calls': 2, // prevent calling global objects as if they were functions
|
74
|
+
'no-regex-spaces': 2, // do not use multiple spaces in regex's
|
75
|
+
'no-sparse-arrays': 2, // do not use sparse arrays (empty elements)
|
76
|
+
'no-unexpected-multiline': 2, // Avoid code that looks like two expressions but is actually one
|
77
|
+
'no-unreachable': 2, // detects unreachable statements (after return, throw,...)
|
78
|
+
'use-isnan': 2, // do not compare with `NaN` value, use isNan() instead
|
79
|
+
'valid-jsdoc': 2, // ensure JSDoc comments are valid
|
80
|
+
'valid-typeof': 2 // ensure that the results of typeof are compared against a valid string
|
78
81
|
},
|
79
82
|
ecmaFeatures: {
|
80
83
|
'modules': true //this gives us modules :)
|
@@ -85,5 +88,5 @@ gulp.task('lint', function () {
|
|
85
88
|
});
|
86
89
|
|
87
90
|
gulp.task('clean', function (cb) {
|
88
|
-
del([
|
91
|
+
del([outputDir], cb);
|
89
92
|
});
|
@@ -9,10 +9,15 @@
|
|
9
9
|
"url": "https://github.com/exercism/xecmascript"
|
10
10
|
},
|
11
11
|
"devDependencies": {
|
12
|
-
"babel": "
|
12
|
+
"babel-cli": "^6.24.1",
|
13
|
+
"babel-core": "^6.24.1",
|
14
|
+
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
15
|
+
"babel-polyfill": "^6.23.0",
|
16
|
+
"babel-preset-env": "^1.3.3",
|
17
|
+
"babel-preset-es2015": "^6.24.1",
|
13
18
|
"del": "~2.0.2",
|
14
19
|
"gulp": "~3.9.0",
|
15
|
-
"gulp-babel": "
|
20
|
+
"gulp-babel": "^6.1.2",
|
16
21
|
"gulp-eslint": "^1.1.0",
|
17
22
|
"gulp-jasmine": "~2.4.2",
|
18
23
|
"yargs": "~3.27.0"
|
@@ -16,65 +16,68 @@ const gulp = require('gulp'),
|
|
16
16
|
eslint = require('gulp-eslint'),
|
17
17
|
jasmine = require('gulp-jasmine'),
|
18
18
|
babel = require('gulp-babel'),
|
19
|
-
polyfill = require('babel
|
19
|
+
polyfill = require('babel-polyfill'),
|
20
20
|
del = require('del'),
|
21
|
-
argv
|
21
|
+
argv = require('yargs').argv,
|
22
22
|
inputDir = getInputDirectory(argv),
|
23
23
|
outputDir = getOutputDirectory(argv);
|
24
24
|
|
25
25
|
// Gulp tasks definition
|
26
26
|
|
27
|
-
gulp.task('default', [
|
27
|
+
gulp.task('default', ['test']);
|
28
28
|
|
29
|
-
gulp.task('test', [
|
30
|
-
return gulp.src([
|
29
|
+
gulp.task('test', ['babel'], function () {
|
30
|
+
return gulp.src([outputDir + '/*.spec.js'])
|
31
31
|
.pipe(jasmine());
|
32
32
|
});
|
33
33
|
|
34
34
|
gulp.task('babel', function () {
|
35
|
-
return gulp.src([
|
36
|
-
.pipe(babel(
|
35
|
+
return gulp.src([inputDir + '/*.js', inputDir + '/lib/*.js'])
|
36
|
+
.pipe(babel({
|
37
|
+
plugins: ["babel-plugin-transform-object-rest-spread"].map(require.resolve),
|
38
|
+
presets: ['babel-preset-env'].map(require.resolve)
|
39
|
+
}))
|
37
40
|
.pipe(gulp.dest(outputDir));
|
38
41
|
});
|
39
42
|
|
40
43
|
gulp.task('lint', function () {
|
41
|
-
return gulp.src([
|
44
|
+
return gulp.src([inputDir + '/*.js'])
|
42
45
|
.pipe(eslint({
|
43
|
-
envs:
|
46
|
+
envs: [
|
44
47
|
'es6' //turns on all es6 features except modules
|
45
48
|
],
|
46
|
-
rules:
|
49
|
+
rules: {
|
47
50
|
// full documentation here : http://eslint.org/docs/rules
|
48
51
|
|
49
52
|
// Possible errors
|
50
|
-
'comma-dangle':
|
51
|
-
'no-cond-assign':
|
52
|
-
'no-console':
|
53
|
-
'no-constant-condition':
|
54
|
-
'no-control-regex':
|
55
|
-
'no-debugger':
|
56
|
-
'no-dupe-args':
|
57
|
-
'no-dupe-keys':
|
58
|
-
'no-duplicate-case':
|
53
|
+
'comma-dangle': [2, 'never'], // don't let a comma at the end of object properties or array element
|
54
|
+
'no-cond-assign': [2, 'always'], // no assignments in conditional statements
|
55
|
+
'no-console': 2, // no console.log() statements in production code
|
56
|
+
'no-constant-condition': 2, // no constants in conditional statements
|
57
|
+
'no-control-regex': 2, // no control characters in regex's
|
58
|
+
'no-debugger': 2, // no debugger in productin code
|
59
|
+
'no-dupe-args': 2, // no duplicated arguments in functions
|
60
|
+
'no-dupe-keys': 2, // no duplicated keys when creating object literals
|
61
|
+
'no-duplicate-case': 2, // no duplicated `case` in `switch` statements
|
59
62
|
'no-empty-character-class': 2, // disallow the use of empty character classes in regular expressions
|
60
|
-
'no-empty':
|
61
|
-
'no-ex-assign':
|
62
|
-
'no-extra-boolean-cast':
|
63
|
-
'no-extra-parens':
|
64
|
-
'no-extra-semi':
|
65
|
-
'no-func-assign':
|
66
|
-
'no-inner-declarations':
|
67
|
-
'no-invalid-regexp':
|
68
|
-
'no-irregular-whitespace':
|
69
|
-
'no-negated-in-lhs':
|
70
|
-
'no-obj-calls':
|
71
|
-
'no-regex-spaces':
|
72
|
-
'no-sparse-arrays':
|
73
|
-
'no-unexpected-multiline':
|
74
|
-
'no-unreachable':
|
75
|
-
'use-isnan':
|
76
|
-
'valid-jsdoc':
|
77
|
-
'valid-typeof':
|
63
|
+
'no-empty': 2, // no empty blocks
|
64
|
+
'no-ex-assign': 2, // do not assign any value to an Exception raised
|
65
|
+
'no-extra-boolean-cast': 2, // do not use !!falseExpression to cast to boolean
|
66
|
+
'no-extra-parens': 2, // do not use extra parenthesis
|
67
|
+
'no-extra-semi': 2, // do not use extra semicolons
|
68
|
+
'no-func-assign': 2, // do not overwrite variables declared as functions
|
69
|
+
'no-inner-declarations': [2, 'both'], // only declare var's and funct's on function scope
|
70
|
+
'no-invalid-regexp': 2, // validates string arguments passed to RegExp constructor
|
71
|
+
'no-irregular-whitespace': 2, // detects special characters used as spaces
|
72
|
+
'no-negated-in-lhs': 2, // do not use negation in the left operand in an `in` expression
|
73
|
+
'no-obj-calls': 2, // prevent calling global objects as if they were functions
|
74
|
+
'no-regex-spaces': 2, // do not use multiple spaces in regex's
|
75
|
+
'no-sparse-arrays': 2, // do not use sparse arrays (empty elements)
|
76
|
+
'no-unexpected-multiline': 2, // Avoid code that looks like two expressions but is actually one
|
77
|
+
'no-unreachable': 2, // detects unreachable statements (after return, throw,...)
|
78
|
+
'use-isnan': 2, // do not compare with `NaN` value, use isNan() instead
|
79
|
+
'valid-jsdoc': 2, // ensure JSDoc comments are valid
|
80
|
+
'valid-typeof': 2 // ensure that the results of typeof are compared against a valid string
|
78
81
|
},
|
79
82
|
ecmaFeatures: {
|
80
83
|
'modules': true //this gives us modules :)
|
@@ -85,5 +88,5 @@ gulp.task('lint', function () {
|
|
85
88
|
});
|
86
89
|
|
87
90
|
gulp.task('clean', function (cb) {
|
88
|
-
del([
|
91
|
+
del([outputDir], cb);
|
89
92
|
});
|