Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Code Quality #1607

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
trim_trailing_whitespace = false
59 changes: 59 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"esversion": 6,
"forin": true,
"freeze": true,
"immed": true,
"indent": 4,
"latedef": "nofunc",
"newcap": true,
"noarg": true,
"noempty": true,
"nonbsp": true,
"nonew": true,
"plusplus": false,
"quotmark": "single",
"undef": true,
"unused": false,
"strict": false,
"maxparams": 10,
"maxdepth": 5,
"maxstatements": 40,
"maxcomplexity": 8,
"maxlen": 120,
"asi": false,
"boss": false,
"debug": false,
"eqnull": true,
"esnext": false,
"evil": false,
"expr": false,
"funcscope": false,
"globalstrict": false,
"iterator": false,
"lastsemic": false,
"laxbreak": false,
"laxcomma": false,
"loopfunc": true,
"maxerr": 50,
"moz": false,
"multistr": false,
"notypeof": false,
"proto": false,
"scripturl": false,
"shadow": false,
"sub": true,
"supernew": false,
"validthis": false,
"noyield": false,

"browser": true,
"node": true,

"globals": {
"angular": false
}
}
24 changes: 12 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,36 @@ We are excited to have you working on the project and cordially request that you
- [You think you've found a bug?](#bug)
- [Code Style Guidelines](#rules)
- [Commit Message Guidelines](#commit)

## <a name="question"></a> Got a question or problem?

Firstly, please go over our FAQ: https://github.com/angular-ui/ui-select/wiki/FAQs

Please, do not open issues for the general support questions as we want to keep GitHub issues for bug reports and feature requests. You've got much better chances of getting your question answered on [StackOverflow](http://stackoverflow.com/questions/tagged/angular-ui-select) where maintainers are looking at questions tagged with `angular-ui-select`.

StackOverflow is a much better place to ask questions since:
* there are hundreds of people willing to help on StackOverflow
* questions and answers stay available for public viewing so your question / answer might help someone else
* SO voting system assures that the best answers are prominently visible.

To save your and our time we will be systematically closing all the issues that are requests for general support and redirecting people to StackOverflow.

## <a name="bug"></a> You think you've found a bug?

Oh, we are ashamed and want to fix it asap! But before fixing a bug we need to reproduce and confirm it. In order to reproduce bugs we will systematically ask you to provide a _minimal_ reproduce scenario using http://plnkr.co/. Having a live reproduce scenario gives us wealth of important information without going back & forth to you with additional questions like:
* version of AngularJS used
* version of this library that you are using
* 3rd-party libraries used, if any
* and most importantly - a use-case that fails

A minimal reproduce scenario using http://plnkr.co/ allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem.

We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more bugs. Interestingly, from our experience users often find coding problems themselves while preparing a minimal plunk. We understand that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate the problem before we can fix it.

The best part is that you don't need to create plunks from scratch - you can use one from our [demo page](http://plnkr.co/edit/a3KlK8dKH3wwiiksDSn2?p=preview).

Unfortunately we are not able to investigate / fix bugs without a minimal reproduce scenario using http://plnkr.co/, so if we don't hear back from you we are going to close an issue that don't have enough info to be reproduced.

## <a name="rules"></a> Coding Rules
To ensure consistency throughout the source code, keep these rules in mind as you are working:

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

AngularJS-native version of [Select2](http://ivaynberg.github.io/select2/) and [Selectize](http://brianreavis.github.io/selectize.js/). [http://angular-ui.github.io/ui-select/](http://angular-ui.github.io/ui-select/)

[Getting Started](https://github.com/angular-ui/ui-select/wiki/Getting-Started)
[Getting Started](https://github.com/angular-ui/ui-select/wiki/Getting-Started)

- [Examples](http://angular-ui.github.io/ui-select/#examples)
- [Examples Source](./docs/examples)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
]
}
}
}
}
6 changes: 3 additions & 3 deletions deploy-docs.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -e

[[ $TRAVIS_SECURE_ENV_VARS == "true" ]] || { echo "No github key avaliable, aborting publishing"; exit 0; }

Expand Down Expand Up @@ -27,5 +27,5 @@ git config user.email "[email protected]"
git commit -m "docs(*): new deploy (angular-ui/ui-select@${ID_REF})"


git push origin --quiet
#> /dev/null 2>&1
git push origin --quiet
#> /dev/null 2>&1
19 changes: 10 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ gulp.task('clean', function(cb) {
del(['dist'], cb);
});

var handleError = function (err) {
console.log(err.toString());
this.emit('end');
};

gulp.task('scripts', ['clean'], function() {

var buildTemplates = function () {
Expand Down Expand Up @@ -160,7 +165,7 @@ gulp.task('docs', function (cb) {
});

gulp.task('docs:clean', function (cb) {
del(['docs-built'], cb)
del(['docs-built'], cb);
});

gulp.task('docs:assets', function () {
Expand All @@ -181,15 +186,11 @@ gulp.task('docs:index', function () {
var exampleFiles = $.filenames.get('exampleFiles');
exampleFiles = exampleFiles.map(function (filename) {
var cleaned = titleCase(filename.replace('demo-', '').replace('.html', ''));
return '<h4><a href="./' + filename + '">' + cleaned + '</a> <plnkr-opener example-path="' + filename + '"></plnkr-opener></h4>';
return '<h4><a href="./' + filename + '">' + cleaned +
'</a> <plnkr-opener example-path="' + filename + '"></plnkr-opener></h4>';
});

return gulp.src('docs/index.html')
.pipe($.replace('<!-- INSERT EXAMPLES HERE -->', exampleFiles.join("\n")))
return gulp.src('docs/index.html')
.pipe($.replace('<!-- INSERT EXAMPLES HERE -->', exampleFiles.join('\n')))
.pipe(gulp.dest('./docs-built/'));
});

var handleError = function (err) {
console.log(err.toString());
this.emit('end');
};