Skip to content

Commit 89047f1

Browse files
committed
Add ESLint recommendations
1 parent b17676a commit 89047f1

File tree

2 files changed

+150
-0
lines changed

2 files changed

+150
-0
lines changed

a1/README.md

+150
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ While this guide explains the *what*, *why* and *how*, I find it helpful to see
5050
1. [Comments](#comments)
5151
1. [JSHint](#js-hint)
5252
1. [JSCS](#jscs)
53+
1. [ESLint](#eslint)
5354
1. [Constants](#constants)
5455
1. [File Templates and Snippets](#file-templates-and-snippets)
5556
1. [Yeoman Generator](#yeoman-generator)
@@ -2919,6 +2920,155 @@ Unit testing helps maintain clean code, as such I included some of my recommenda
29192920
29202921
**[Back to top](#table-of-contents)**
29212922
2923+
## ESLint
2924+
2925+
### Use an Options File
2926+
###### [Style [Y236](#style-y236)]
2927+
2928+
- Use ESLint to check your Javscript coding style. Be sure to include the [ESLint options file](assets/.eslintrc) in your source control. See the [ESLint docs](http://eslint.org/) for details on the options.
2929+
2930+
*Why?*: Provides a first alert prior to committing any code to source control.
2931+
2932+
*Why?*: Provides consistency across your team.
2933+
2934+
```javascript
2935+
{
2936+
"env": {
2937+
"browser": true,
2938+
"node": true
2939+
},
2940+
"globals": {
2941+
"angular": false,
2942+
"$": false
2943+
},
2944+
"rules": {
2945+
"no-bitwise": 2,
2946+
"camelcase": [
2947+
2,
2948+
{
2949+
"properties": "never"
2950+
}
2951+
],
2952+
"curly": [
2953+
2,
2954+
"all"
2955+
],
2956+
"eqeqeq": 2,
2957+
"guard-for-in": 2,
2958+
"no-extend-native": 2,
2959+
"wrap-iife": 2,
2960+
"indent": [
2961+
2,
2962+
4,
2963+
{
2964+
"SwitchCase": 1
2965+
}
2966+
],
2967+
"no-use-before-define": [
2968+
2,
2969+
{
2970+
"functions": false
2971+
}
2972+
],
2973+
"new-cap": 2,
2974+
"no-caller": 2,
2975+
"no-empty": 2,
2976+
"no-irregular-whitespace": 2,
2977+
"no-new": 2,
2978+
"no-plusplus": 0,
2979+
"quotes": [
2980+
2,
2981+
"single"
2982+
],
2983+
"no-undef": 2,
2984+
"no-unused-vars": 0,
2985+
"strict": 0,
2986+
"max-params": [
2987+
2,
2988+
10
2989+
],
2990+
"max-depth": [
2991+
2,
2992+
5
2993+
],
2994+
"max-statements": [
2995+
2,
2996+
40
2997+
],
2998+
"complexity": [
2999+
2,
3000+
8
3001+
],
3002+
"max-len": [
3003+
2,
3004+
100
3005+
],
3006+
"semi": 0,
3007+
"no-cond-assign": 0,
3008+
"no-debugger": 0,
3009+
"no-eq-null": 2,
3010+
"no-eval": 0,
3011+
"no-unused-expressions": 0,
3012+
"block-scoped-var": 0,
3013+
"no-iterator": 0,
3014+
"linebreak-style": 0,
3015+
"comma-style": [
3016+
2,
3017+
"first"
3018+
],
3019+
"no-loop-func": 2,
3020+
"no-multi-str": 2,
3021+
"valid-typeof": 0,
3022+
"no-proto": 0,
3023+
"no-script-url": 0,
3024+
"no-shadow": 2,
3025+
"dot-notation": 0,
3026+
"no-new-func": 0,
3027+
"no-new-wrappers": 0,
3028+
"no-invalid-this": 0,
3029+
"require-yield": 0,
3030+
"operator-linebreak": [
3031+
2,
3032+
"after"
3033+
],
3034+
"no-mixed-spaces-and-tabs": 2,
3035+
"no-trailing-spaces": 2,
3036+
"space-unary-ops": [
3037+
2,
3038+
{
3039+
"nonwords": false,
3040+
"overrides": {}
3041+
}
3042+
],
3043+
"keyword-spacing": [
3044+
2,
3045+
{}
3046+
],
3047+
"space-infix-ops": 2,
3048+
"space-before-blocks": [
3049+
2,
3050+
"always"
3051+
],
3052+
"eol-last": 2,
3053+
"array-bracket-spacing": [
3054+
2,
3055+
"never",
3056+
{
3057+
"singleValue": true
3058+
}
3059+
],
3060+
"space-in-parens": [
3061+
2,
3062+
"never"
3063+
],
3064+
"valid-jsdoc": 2,
3065+
"no-multiple-empty-lines": 2
3066+
}
3067+
}
3068+
```
3069+
3070+
**[Back to top](#table-of-contents)**
3071+
29223072
## Constants
29233073
29243074
### Vendor Globals

a1/assets/.eslintrc

4.38 KB
Binary file not shown.

0 commit comments

Comments
 (0)