v3 tweaks: update STYLEGUIDE, minor code style fix
This commit is contained in:
parent
c3b635f83d
commit
9ecb48c108
@ -1,4 +1,9 @@
|
||||
Style guide
|
||||
===========
|
||||
|
||||
For the most part, we follow [MediaWiki coding conventions](https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript). Code should validate with JSHint (see configuration in `.jshintrc`).
|
||||
For the most part, we follow [MediaWiki coding conventions](https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript). Code should validate with JSHint (see configuration in `.jshintrc`) as well as JSCS (see configuration in `.jscsrc`). Travis CI is used to ensure consistent code style/quality; tests are run on all commits and pull requests.
|
||||
|
||||
## Tips
|
||||
* _**TABS!**_
|
||||
* Comments are great; intelligent comments are even better.
|
||||
* Avoid assembling complex DOM structures in JavaScript. Instead, use a hogan template and `AFCH.Views` to access/populate/generate it.
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "afch-rewrite",
|
||||
"version": "0.3",
|
||||
"version": "0.3.0",
|
||||
"homepage": "https://github.com/WPAFC/afch-rewrite",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -5,8 +5,8 @@
|
||||
if ( pageName.indexOf( 'Wikipedia:Articles_for_creation/' ) !== -1 ||
|
||||
pageName.indexOf( 'Wikipedia_talk:Articles_for_creation/' ) !== -1 ||
|
||||
pageName.indexOf( 'User:' ) !== -1 ||
|
||||
pageName.indexOf( 'Draft:' ) !== -1 )
|
||||
{
|
||||
pageName.indexOf( 'Draft:' ) !== -1
|
||||
) {
|
||||
type = 'submissions';
|
||||
} else if ( pageName.indexOf( 'Wikipedia:Articles_for_creation/Redirects' ) !== -1 ) {
|
||||
type = 'redirects';
|
||||
|
Loading…
x
Reference in New Issue
Block a user