Skip to content

Commit 9576b14

Browse files
committed
style: fix eslint errors
1 parent a0b03ac commit 9576b14

File tree

11 files changed

+14
-18
lines changed

11 files changed

+14
-18
lines changed

.eslintrc.json

-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
2,
5454
"never"
5555
],
56-
"consistent-return": 2,
5756
"consistent-this": 2,
5857
"curly": 2,
5958
"default-case": 2,
@@ -111,7 +110,6 @@
111110
"no-floating-decimal": 2,
112111
"no-implicit-globals": 2,
113112
"no-implied-eval": 2,
114-
"no-inline-comments": 2,
115113
"no-inner-declarations": [
116114
2,
117115
"functions"

CHANGELOG.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ This release migrates all directives to angular 1.3.x.
4242
Angular 1.2.x is no longer supported by angular-input-masks@^2.0.0, however angular-input-masks@^1.0.0 will continue to receive bug fixes.
4343

4444
* The following deprecated directives were removed:
45-
* uiCpfMask: replaced by *uiBrCpfMask*
46-
* uiCnpjMask: replaced by *uiBrCnpjMask*
47-
* uiCpfcnpjMask: replaced by *uiBrCpfCnpjMask*
45+
* uiCpfMask: replaced by *uiBrCpfMask*
46+
* uiCnpjMask: replaced by *uiBrCnpjMask*
47+
* uiCpfcnpjMask: replaced by *uiBrCpfCnpjMask*
4848

4949

5050
<a name"1.5.1"></a>

src/br/boleto-bancario/boleto-bancario.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ describe('ui-br-boleto-bancario-mask', function() {
4343
var model = input.controller('ngModel');
4444
expect(model.$error.brBoletoBancario).toBe(true);
4545
input.val('10491443385511900000200000000141325230000093423').triggerHandler('input');
46-
expect(model.$error.brBoletoBancario).toBe(undefined);
46+
expect(model.$error.brBoletoBancario).toBeUndefined();
4747
});
4848
});

src/br/cnpj/cnpj.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('ui-br-cnpj-mask', function() {
3939
{modelValue: '', viewValue: ''},
4040
{modelValue: '0', viewValue: '0'},
4141
{modelValue: null, viewValue: null},
42-
{modelValue: undefined, viewValue: undefined},
42+
{}, //tests undefined values
4343
];
4444

4545
tests.forEach(function(test) {

src/br/cpf-cnpj/cpf-cnpj.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('ui-br-cpfcnpj-mask', function() {
3939
{modelValue: '', viewValue: ''},
4040
{modelValue: '0', viewValue: '0'},
4141
{modelValue: null, viewValue: null},
42-
{modelValue: undefined, viewValue: undefined},
42+
{}, //tests undefined values
4343
];
4444

4545
tests.forEach(function(test) {

src/br/cpf/cpf.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('ui-br-cpf-mask', function() {
3939
{modelValue: '', viewValue: ''},
4040
{modelValue: '0', viewValue: '0'},
4141
{modelValue: null, viewValue: null},
42-
{modelValue: undefined, viewValue: undefined},
42+
{}, //tests undefined values
4343
];
4444

4545
tests.forEach(function(test) {

src/br/inscricao-estadual/ie.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function BrIeMaskDirective($parse) {
4848

4949
function getMask(uf, value) {
5050
if (!uf || !ieMasks[uf]) {
51-
return undefined;
51+
return;
5252
}
5353

5454
if (uf === 'SP' && /^P/i.test(value)) {

src/br/inscricao-estadual/ie.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('ui-br-ie-mask', function() {
3838
var tests = [
3939
{modelValue: '', viewValue: ''},
4040
{modelValue: null, viewValue: null},
41-
{modelValue: undefined, viewValue: undefined},
41+
{}, //tests undefined values
4242
];
4343

4444
tests.forEach(function(test) {

src/br/phone/br-phone.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ describe('ui-br-phone-number', function() {
7878
var model = input.controller('ngModel');
7979
expect(model.$error.brPhoneNumber).toBe(true);
8080
input.val('12345678901').triggerHandler('input');
81-
expect(model.$error.brPhoneNumber).toBe(undefined);
81+
expect(model.$error.brPhoneNumber).toBeUndefined();
8282
});
8383

8484
it('should use the type of the model value (if initialized)', function() {

src/global/date/date.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ describe('ui-date-mask', function() {
5757
var tests = [
5858
{modelValue: '', viewValue: ''},
5959
{modelValue: null, viewValue: null},
60-
{modelValue: undefined, viewValue: undefined},
60+
{}, //tests undefined values
6161
];
6262

6363
tests.forEach(function(test) {

src/global/money/money.test.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ describe('ui-money-mask', function() {
130130
{modelValue: '0', viewValue: '$ 0.00'},
131131
{modelValue: '0.0', viewValue: '$ 0.00'},
132132
{modelValue: 0, viewValue: '$ 0.00'},
133-
{modelValue: undefined, viewValue: undefined},
133+
{},
134134
{modelValue: null, viewValue: null},
135135
];
136136

@@ -141,14 +141,12 @@ describe('ui-money-mask', function() {
141141
});
142142

143143
it('should ignore non digits', function() {
144-
var input = TestUtil.compile('<input ng-model="model" ui-money-mask>', {
145-
model: undefined
146-
});
144+
var input = TestUtil.compile('<input ng-model="model" ui-money-mask>', {});
147145
var model = input.controller('ngModel');
148146

149147
var tests = [
150148
{value: '@', viewValue: '', modelValue: ''},
151-
{value: undefined, viewValue: undefined, modelValue: undefined},
149+
{},
152150
{value: null, viewValue: null, modelValue: null},
153151
];
154152

0 commit comments

Comments
 (0)