Skip to content

Commit 2981c01

Browse files
lukeapagegajus
authored andcommitted
fix: run lint fix after npm install (#422)
1 parent 7560260 commit 2981c01

91 files changed

Lines changed: 2536 additions & 2536 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/bin/addAssertions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const getAssertions = () => {
4848

4949
return {
5050
invalid: _.map(codes.invalid, formatCodeSnippet),
51-
valid: _.map(codes.valid, formatCodeSnippet)
51+
valid: _.map(codes.valid, formatCodeSnippet),
5252
};
5353
});
5454

src/bin/checkDocs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import fs from 'fs';
66
import path from 'path';
77
import {
88
getRules,
9-
isFile
9+
isFile,
1010
} from './utilities';
1111

1212
const windows = (array, size) => {

src/bin/checkTests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import fs from 'fs';
44
import path from 'path';
55
import {
66
getRules,
7-
isFile
7+
isFile,
88
} from './utilities';
99

1010
const getTestIndexRules = () => {
@@ -24,7 +24,7 @@ const getTestIndexRules = () => {
2424
return acc;
2525
}, {
2626
inRulesArray: false,
27-
rules: []
27+
rules: [],
2828
});
2929

3030
const rules = result.rules;

src/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ const rules = {
7878
'type-import-style': typeImportStyle,
7979
'union-intersection-spacing': unionIntersectionSpacing,
8080
'use-flow-type': useFlowType,
81-
'valid-syntax': validSyntax
81+
'valid-syntax': validSyntax,
8282
};
8383

8484
export default {
8585
configs: {
86-
recommended
86+
recommended,
8787
},
8888
rules: _.mapValues(rules, (rule, key) => {
8989
if (key === 'no-types-missing-file-annotation') {
@@ -92,7 +92,7 @@ export default {
9292

9393
return {
9494
...rule,
95-
create: _.partial(checkFlowFileAnnotation, rule.create)
95+
create: _.partial(checkFlowFileAnnotation, rule.create),
9696
};
9797
}),
9898
rulesConfig: {
@@ -123,6 +123,6 @@ export default {
123123
'type-import-style': 0,
124124
'union-intersection-spacing': 0,
125125
'use-flow-type': 0,
126-
'valid-syntax': 0
127-
}
126+
'valid-syntax': 0,
127+
},
128128
};

src/rules/arrayStyle/index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import needWrap from './needWrap';
44
const schema = [
55
{
66
enum: ['verbose', 'shorthand'],
7-
type: 'string'
8-
}
7+
type: 'string',
8+
},
99
];
1010

1111
const inlineType = (type) => {
@@ -33,13 +33,13 @@ export default (defaultConfig, simpleType) => {
3333
context.report({
3434
data: {
3535
type: inlinedType,
36-
wrappedType: wrappedInlinedType
36+
wrappedType: wrappedInlinedType,
3737
},
3838
fix (fixer) {
3939
return fixer.replaceText(node, 'Array<' + rawElementType + '>');
4040
},
4141
message: 'Use "Array<{{ type }}>", not "{{ wrappedType }}[]"',
42-
node
42+
node,
4343
});
4444
}
4545
},
@@ -59,7 +59,7 @@ export default (defaultConfig, simpleType) => {
5959
context.report({
6060
data: {
6161
type: inlinedType,
62-
wrappedType: wrappedInlinedType
62+
wrappedType: wrappedInlinedType,
6363
},
6464
fix (fixer) {
6565
if (needWrap(elementTypeNode)) {
@@ -69,17 +69,17 @@ export default (defaultConfig, simpleType) => {
6969
}
7070
},
7171
message: 'Use "{{ wrappedType }}[]", not "Array<{{ type }}>"',
72-
node
72+
node,
7373
});
7474
}
7575
}
7676
}
77-
}
77+
},
7878
};
7979
};
8080

8181
return {
8282
create,
83-
schema
83+
schema,
8484
};
8585
};

src/rules/arrayStyle/isSimpleType.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
const simpleTypePatterns = [
2222
/^(?:Any|Array|Boolean|Generic|Mixed|Number|String|Void)TypeAnnotation$/,
23-
/.+LiteralTypeAnnotation$/
23+
/.+LiteralTypeAnnotation$/,
2424
];
2525

2626
export default (node) => {

src/rules/arrowParens.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const getLocation = (node) => {
22
return {
33
end: node.params[node.params.length - 1].loc.end,
4-
start: node.params[0].loc.start
4+
start: node.params[0].loc.start,
55
};
66
};
77

@@ -40,7 +40,7 @@ export default {
4040

4141
return fixer.replaceTextRange([
4242
firstTokenOfParam.range[0],
43-
closingParenToken.range[1]
43+
closingParenToken.range[1],
4444
], `${shouldAddSpaceForAsync ? ' ' : ''}${paramToken.value}`);
4545
};
4646

@@ -70,7 +70,7 @@ export default {
7070
fix: fixParamsWithParenthesis,
7171
loc: getLocation(node),
7272
messageId: 'unexpectedParensInline',
73-
node
73+
node,
7474
});
7575
}
7676

@@ -88,7 +88,7 @@ export default {
8888
},
8989
loc: getLocation(node),
9090
messageId: 'expectedParensBlock',
91-
node
91+
node,
9292
});
9393
}
9494

@@ -107,7 +107,7 @@ export default {
107107
fix: fixParamsWithParenthesis,
108108
loc: getLocation(node),
109109
messageId: 'unexpectedParens',
110-
node
110+
node,
111111
});
112112
}
113113

@@ -125,14 +125,14 @@ export default {
125125
},
126126
loc: getLocation(node),
127127
messageId: 'expectedParens',
128-
node
128+
node,
129129
});
130130
}
131131
}
132132
};
133133

134134
return {
135-
ArrowFunctionExpression: parens
135+
ArrowFunctionExpression: parens,
136136
};
137137
},
138138

@@ -141,7 +141,7 @@ export default {
141141
category: 'ECMAScript 6',
142142
description: 'require parentheses around arrow function arguments',
143143
recommended: false,
144-
url: 'https://eslint.org/docs/rules/arrow-parens'
144+
url: 'https://eslint.org/docs/rules/arrow-parens',
145145
},
146146

147147
fixable: 'code',
@@ -151,25 +151,25 @@ export default {
151151
expectedParensBlock: 'Expected parentheses around arrow function argument having a body with curly braces.',
152152

153153
unexpectedParens: 'Unexpected parentheses around single function argument.',
154-
unexpectedParensInline: 'Unexpected parentheses around single function argument having a body with no curly braces.'
154+
unexpectedParensInline: 'Unexpected parentheses around single function argument having a body with no curly braces.',
155155
},
156156

157-
type: 'layout'
157+
type: 'layout',
158158
},
159159

160160
schema: [
161161
{
162-
enum: ['always', 'as-needed']
162+
enum: ['always', 'as-needed'],
163163
},
164164
{
165165
additionalProperties: false,
166166
properties: {
167167
requireForBlockBody: {
168168
default: false,
169-
type: 'boolean'
170-
}
169+
type: 'boolean',
170+
},
171171
},
172-
type: 'object'
173-
}
174-
]
172+
type: 'object',
173+
},
174+
],
175175
};

src/rules/booleanStyle.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
const schema = [
22
{
33
enum: ['bool', 'boolean'],
4-
type: 'string'
5-
}
4+
type: 'string',
5+
},
66
];
77

88
const create = (context) => {
@@ -18,7 +18,7 @@ const create = (context) => {
1818
return fixer.replaceText(node, 'boolean');
1919
},
2020
message: 'Use "boolean", not "bool"',
21-
node
21+
node,
2222
});
2323
}
2424

@@ -28,14 +28,14 @@ const create = (context) => {
2828
return fixer.replaceText(node, 'bool');
2929
},
3030
message: 'Use "bool", not "boolean"',
31-
node
31+
node,
3232
});
3333
}
34-
}
34+
},
3535
};
3636
};
3737

3838
export default {
3939
create,
40-
schema
40+
schema,
4141
};

src/rules/defineFlowType.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ const create = (context) => {
7171
node.params.forEach((param) => {
7272
makeDefined(param);
7373
});
74-
}
74+
},
7575
};
7676
};
7777

7878
export default {
7979
create,
80-
schema
80+
schema,
8181
};

src/rules/delimiterDangle.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import _ from 'lodash';
33
const schema = [
44
{
55
enum: ['always', 'always-multiline', 'only-multiline', 'never'],
6-
type: 'string'
7-
}
6+
type: 'string',
7+
},
88
];
99

1010
const create = (context) => {
@@ -16,7 +16,7 @@ const create = (context) => {
1616
context.report({
1717
fix,
1818
message,
19-
node
19+
node,
2020
});
2121
};
2222
};
@@ -28,7 +28,7 @@ const create = (context) => {
2828
}),
2929
noDangle: reporter(node, 'Missing trailing delimiter', (fixer) => {
3030
return fixer.insertTextAfter(tokenToFix, ',');
31-
})
31+
}),
3232
};
3333
};
3434

@@ -105,11 +105,11 @@ const create = (context) => {
105105

106106
TupleTypeAnnotation (node) {
107107
evaluate(node, _.last(node.types));
108-
}
108+
},
109109
};
110110
};
111111

112112
export default {
113113
create,
114-
schema
114+
schema,
115115
};

0 commit comments

Comments
 (0)