Thanks to visit codestin.com
Credit goes to github.com

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

Commit 092540d

Browse files
author
Chris Clark
committed
Update to ES6 and add no-unused-expressions rule
1 parent 1d405a9 commit 092540d

File tree

2 files changed

+63
-39
lines changed

2 files changed

+63
-39
lines changed

eslintrc

Lines changed: 63 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,33 @@ env:
55
amd: false
66
mocha: true
77
jasmine: false
8+
es6: true
89
rules:
910
no-alert: 2
1011
no-array-constructor: 2
12+
no-arrow-condition: 0
1113
no-bitwise: 0
1214
no-caller: 2
15+
no-case-declarations: 2
1316
no-catch-shadow: 2
14-
comma-dangle: 2
1517
no-class-assign: 2
1618
no-cond-assign: [2, 'always']
1719
no-console: 0
20+
no-const-assign: 2
1821
no-constant-condition: 2
22+
no-continue: 0
1923
no-control-regex: 2
2024
no-debugger: 2
2125
no-delete-var: 2
2226
no-div-regex: 0
27+
no-dupe-class-members: 2
2328
no-dupe-keys: 2
2429
no-dupe-args: 2
2530
no-duplicate-case: 2
26-
no-else-return: 2
31+
no-else-return: 0
2732
no-empty: 2
2833
no-empty-character-class: 2
29-
no-empty-label: 2
34+
no-empty-pattern: 2
3035
no-eq-null: 2
3136
no-eval: 2
3237
no-ex-assign: 2
@@ -43,6 +48,7 @@ rules:
4348
no-inline-comments: 0
4449
no-inner-declarations: [2, 'functions']
4550
no-invalid-regexp: 2
51+
no-invalid-this: 0 # this rule would cause problems with mocha test cases
4652
no-irregular-whitespace: 2
4753
no-iterator: 2
4854
no-label-var: 2
@@ -52,10 +58,12 @@ rules:
5258
no-loop-func: 2
5359
no-mixed-requires: [0, false]
5460
no-mixed-spaces-and-tabs: [2, false]
61+
linebreak-style: [2, 'unix']
5562
no-multi-spaces: 2
5663
no-multi-str: 2
5764
no-multiple-empty-lines: [2, {max: 2}]
5865
no-native-reassign: 2
66+
no-negated-condition: 0
5967
no-negated-in-lhs: 2
6068
no-nested-ternary: 0
6169
no-new: 2
@@ -75,73 +83,106 @@ rules:
7583
no-redeclare: 2
7684
no-regex-spaces: 2
7785
no-restricted-modules: 0
86+
no-restricted-syntax: 0
7887
no-return-assign: 2
7988
no-script-url: 2
8089
no-self-compare: 2
8190
no-sequences: 2
8291
no-shadow: 2
8392
no-shadow-restricted-names: 2
84-
semi-spacing: 2
8593
no-spaced-func: 2
8694
no-sparse-arrays: 2
8795
no-sync: 0
8896
no-ternary: 0
8997
no-trailing-spaces: 2
98+
no-this-before-super: 2
99+
no-throw-literal: 2
90100
no-undef: 2
91101
no-undef-init: 2
92102
no-undefined: 0
103+
no-unexpected-multiline: 2
93104
no-underscore-dangle: 0
105+
no-unneeded-ternary: 0
94106
no-unreachable: 2
95107
no-unused-expressions: 2
96-
no-unused-vars: [2, {vars: 'all', args: 'all'}]
108+
no-unused-vars: [2, {vars: 'all', args: 'all', argsIgnorePattern: '^_'}]
97109
no-use-before-define: 2
98-
no-void: 2
99-
no-var: 0
110+
no-useless-call: 2
111+
no-useless-concat: 0
112+
no-var: 2
100113
no-warning-comments: [0, {terms: ['todo', 'fixme', 'xxx'], location: 'start'}]
101114
no-with: 2
115+
no-magic-numbers: 0
116+
117+
array-bracket-spacing: [2, 'never']
118+
arrow-body-style: 0
119+
arrow-parens: [2, 'as-needed']
120+
arrow-spacing: 2
121+
accessor-pairs: 2
102122
block-scoped-var: 2
123+
block-spacing: 2
103124
brace-style: 2
125+
callback-return: 0
104126
camelcase: 0
127+
comma-dangle: 2
105128
comma-spacing: 2
106129
comma-style: 2
107130
complexity: [0, 11]
131+
computed-property-spacing: 2
108132
consistent-return: 2
109133
consistent-this: [2, 'self']
134+
constructor-super: 2
110135
curly: [2, 'all']
111136
default-case: 0
137+
dot-location: [2, 'property']
112138
dot-notation: [2, {allowKeywords: true}]
113139
eol-last: 2
114140
eqeqeq: 2
115141
func-names: 0
116-
func-style: [2, 'declaration']
117-
generator-star: 0
142+
func-style: [2, 'declaration', {"allowArrowFunctions": true}]
143+
generator-star-spacing: 2
144+
global-require: 0
118145
guard-for-in: 0
119146
handle-callback-err: 2
147+
id-length: 0
120148
indent: [2, 2, {SwitchCase: 1}]
149+
init-declarations: 0
150+
jsx-quotes: 0
121151
key-spacing: [2, {beforeColon: false, afterColon: true}]
122152
keyword-spacing: 2
123-
max-depth: [1, 4]
153+
lines-around-comment: 0
154+
max-depth: [0, 4]
124155
max-len: [2, 80]
125-
max-nested-callbacks: [1, 2]
126-
max-params: [1, 4]
156+
max-nested-callbacks: [0, 2]
157+
max-params: [0, 4]
127158
max-statements: [0, 10]
128159
new-cap: 2
129160
new-parens: 2
130-
one-var: 0
161+
newline-after-var: 0
162+
object-curly-spacing: [2, 'never']
163+
object-shorthand: 0
164+
one-var: [2, 'never']
131165
operator-assignment: [0, 'always']
166+
operator-linebreak: 0
132167
padded-blocks: 0
168+
prefer-arrow-callback: 0
169+
prefer-const: 2
170+
prefer-spread: 2
171+
prefer-reflect: 0
172+
prefer-template: 0
133173
quote-props: 0
134174
quotes: [2, 'single']
135175
radix: 2
136-
semi: 2
176+
id-match: 0
177+
require-jsdoc: 0
178+
require-yield: 0
179+
semi: [2, 'never']
180+
semi-spacing: 2
137181
sort-vars: 0
138182
space-before-blocks: 2
139183
space-before-function-paren: [2, 'never']
140-
object-curly-spacing: [2, 'never']
141-
array-bracket-spacing: [2, 'never']
142184
space-in-parens: 2
143185
space-infix-ops: 2
144-
space-return-throw-case: 2
145186
space-unary-ops: [2, {words: true, nonwords: false}]
146187
spaced-comment: 2
147188
strict: [2, 'global']
@@ -152,5 +193,8 @@ rules:
152193
wrap-iife: 0
153194
wrap-regex: 0
154195
yoda: [2, 'never']
155-
globals:
156-
Promise: true
196+
197+
no-unused-expressions/no-unused-expressions: 2
198+
ecmaFeatures:
199+
jsx: true
200+
plugins: ['no-unused-expressions']

jshintrc

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)