Commit Graph

37 Commits

Author SHA1 Message Date
Ivo Julca
e92bb1b07f Rename globals toName|toString to Tools.[getName|getString] 2015-07-06 00:34:44 -05:00
Ivo Julca
aa8423559f Gulpfile: add tasks clear and learnsets
- 'gulp clear' removes everything currently cached.
- `gulp learnsets` is intended to check /**/learnsets.js files for proper packing. This is no longer done in `npm test`.
2015-07-02 03:57:16 -05:00
Ivo Julca
efad2e157f Update dev dependencies
Notable changes: `gulp-jshint` now tracks a proper release and will no longer timeout.
2015-07-02 03:56:52 -05:00
Ivo Julca
c08aba185b Implement JSCS rule to enforce switch cases not to be indented 2015-06-12 03:41:04 -05:00
Ivo Julca
b740197244 Implement JSCS rule to enforce PS conditionals' style 2015-06-12 03:36:36 -05:00
Konrad Borowski
b4f272b9b2 Introduce cache for syntax testing.
This cache is quite awful (welcome to the world of Node.js, I guess),
but at least it works. It has few flaws, like not being able to GC
unused cache files. Still, has to work for now. Changes syntax test
times from 10 minutes on my very slow laptop to 0.6 seconds.

(I wonder how this will work with Travis...)

Later I will try to figure out why JSHint is so unbelievably slow.
2015-03-27 21:28:03 +01:00
Ivo Julca
5059523cab Increase time limit for gulp-jshint 2015-03-27 01:20:31 -05:00
Ivo Julca
f8565c9567 Gulpfile: use more restrictive glob patterns 2015-03-23 14:22:20 -05:00
Ivo Julca
91cf04f4ef Gulpfile: validate line breaks iff OS is *nix 2015-03-18 21:30:42 -05:00
Ivo Julca
d6c3058673 Deps: update dev dependencies
- Remove `gulp-util`: it's not used and its installation is no longer recommended in Gulp's documentation.
- Next minor version for `gulp-jscs`. Next major for `jshint-stylish`.
2015-02-18 19:51:51 -05:00
Ivo Julca
68aaa48974 Gulpfile: no files are exempt from style checks
- Streams are merged to make sure that all errors and warnings are reported.
- Adds dev dependencies: `merge-stream` and `lazypipe`.
- Tracks a fork of `gulp-jshint` to fix https://github.com/spalger/gulp-jshint/issues/88
2015-02-18 19:51:15 -05:00
Ivo Julca
6186a6be60 Gulpfile: rebase JSCS options on Yandex preset 2015-02-18 17:45:05 -05:00
Ivo Julca
8f9f681e4e Gulpfile: add new JSCS options
- Use an ES6 parser.
- Disallow "with".
- Only validate line breaks when running in CI environments.
- Add various missing rules regarding spacing and line breaks.
2015-02-18 17:45:02 -05:00
Ivo Julca
f476c2700a Gulpfile: remove deprecated or redundant rules
- JSCS rule "disallowNewLineBeforeBlockStatements" is already in Google preset.
- JSHint rule "immed" is deprecated in favor of JSCS' "requireParenthesesAroundIIFE".
- JSHint rule "smarttabs" is deprecated in favor of JSCS' "disallowMixedSpacesAndTabs": "smart".
- JSHint rule "trailing" is deprecated in favor of JSCS' "disallowTrailingWhiteSpace".
- JSHint rule "newcap" is deprecated in favor of JSCS' "requireCapitalizedConstructors".
2015-02-18 17:44:58 -05:00
Guangcong Luo
697c7c5eb9 Revert "Gulpfile: Remove let hack"
The `let` hack is completely and utterly intentional.

Declare variables in the scope they're used in. There is no reason to
remove the let hack unless you want bad code to pass. I do not want
bad code to pass.

This reverts commit 0b76e245b6.
2014-12-23 17:33:54 -05:00
Juanma Serrano
0b76e245b6 Gulpfile: Remove let hack
Let hack is not necessary as the test is being passed without it and it makes var in blocks fail.
To get rid of 'let unexpected token' we must either configure traceur to set blockBindings to true or just get rid of the hack and use both var and let properly.
This also fixes the fake build failure from previous commit f0d33f6473
2014-12-23 12:04:51 +01:00
Ivo Julca
63eda40940 Fix EOL checking
The actual special characters are not the appropriate JSCS option.
2014-10-21 02:51:18 -05:00
Ivo Julca
ba4a0c9b97 JSCS: enforce OS-specific line breaks 2014-10-21 02:42:54 -05:00
Ivo Julca
8143365825 Update JSCS options
- Ignore config/config.js
- Ignore line breaks in Windows
2014-10-21 02:00:09 -05:00
小太
fe37f3b6a7 Apply jscs to the data files as well 2014-09-30 18:34:16 +10:00
小太
5027be79fb Add jscs as a style checker, and add some extra jshint options 2014-09-29 18:38:01 +10:00
Ivo Julca
0fb4b18e66 Gulpfile: check for ES3 issues in data files
Also, remove trailing commas everywhere.
2014-09-04 14:12:07 -05:00
Guangcong Luo
354a784370 npm test now exits with code 1 on JSLint fail
This is mostly for Travis CI compatibility
2014-08-16 23:53:13 -05:00
Guangcong Luo
536c6d0d3f Support npm test
Also made linting synchronous, which makes Gulp's output look
slightly nicer (and time it, which is cool).
2014-08-10 21:16:14 -04:00
Guangcong Luo
af2026436a More style fixes and Gulpfile updates
JSHint is now a fair bit stricter, and is now correctly checking
files in `mods/`.

The code has been fixed to match the new stricter standards.

JSHint has now caught its second actual bug: Gen 5 Pinap Berry
was Ice instead of Grass.
2014-08-10 20:43:53 -04:00
Guangcong Luo
12b673bb49 Fix style errors; update gulpfile
I used a hack to make the multiple declaration errors go away,
so all that remained in jsHint were actual errors, which I've
now mostly fixed.

All this linting ended up uncovering one actual bug: Uproar's
message not showing. It's a very minor bug in a move no one uses,
so I'm going to fold it into this commit.
2014-08-10 18:06:44 -04:00
Slayer95
b025743d34 Global 'sanitize' is now 'escapeHTML' method of Tools 2014-05-12 20:52:29 -05:00
小太
5c8fc7b982 Space after function for anonymous functions 2014-04-22 01:58:16 +10:00
Slayer95
05e7060474 Deprecate 'toUserid' global
Replaced by 'toId'.
2014-04-18 16:49:16 -05:00
Slayer95
3fc36ef80f 'clampIntRange is now a method of 'Tools' and no longer global 2014-04-18 15:14:54 -05:00
Slayer95
4c18aa60f1 Remove global 'fs' 2014-04-17 14:37:32 -05:00
Slayer95
1f98a77768 Add globals to gulpfile 2014-04-17 01:13:15 -04:00
Brian Chen
bdede3b5b0 Change gulpfile to take advantage of gulp APIs
Gulp's `gulp.src` can also take an [array of globs](https://github.com/gulpjs/gulp/blob/master/docs/API.md), which makes iterating through all the directories manually rather redundant.
2014-04-16 00:12:04 -07:00
Guangcong Luo
7432f66476 More jsHint options 2014-02-10 00:49:31 -06:00
Tyler Stark
0ffdd34741 Making JSHint actually look helpful, and explicitly ignoring eqeqeq errors 2014-02-09 20:22:33 -06:00
Tyler Stark
9195dbfd35 Adding config for JSHint (as well as DRYing up the lint task.) 2014-02-09 19:31:56 -06:00
Tyler Stark
949d29be63 Adding Gulp and JSHint 2014-02-09 19:02:06 -06:00