Skip to content

Commit cac561f

Browse files
committed
fix: update dependencies
1 parent e39995d commit cac561f

22 files changed

+92
-54
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"extends": "canonical"
2+
"extends": "canonical"
33
}

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ script:
1313
- npm run lint
1414
- npm run build
1515
after_success:
16-
- rm -fr ./dist && npm run build && semantic-release pre && npm publish && semantic-release post
16+
- export NODE_ENV=production
17+
- npm run build
18+
- semantic-release

bin/readmeAssertions.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ const getAssertions = () => {
4141
});
4242

4343
const assertionCodes = _.map(assertionFiles, (filePath) => {
44-
const codes = require(filePath); // eslint-disable-line global-require
44+
// eslint-disable-next-line global-require, import/no-dynamic-require
45+
const codes = require(filePath);
4546

4647
return {
4748
invalid: _.map(codes.invalid, formatCodeSnippet),

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@
55
"url": "http://gajus.com"
66
},
77
"dependencies": {
8-
"lodash": "^4.15.0"
8+
"lodash": "^4.17.10"
99
},
1010
"description": "Flowtype linting rules for ESLint.",
1111
"devDependencies": {
12-
"ajv": "^5.2.1",
13-
"babel-cli": "^6.14.0",
12+
"ajv": "^6.5.0",
13+
"babel-cli": "^6.26.0",
1414
"babel-eslint": "^6.1.2",
1515
"babel-plugin-add-module-exports": "^0.2.1",
16-
"babel-plugin-transform-object-rest-spread": "^6.23.0",
17-
"babel-preset-env": "^1.1.10",
18-
"babel-register": "^6.14.0",
19-
"chai": "^3.5.0",
16+
"babel-plugin-transform-object-rest-spread": "^6.26.0",
17+
"babel-preset-env": "^1.7.0",
18+
"babel-register": "^6.26.0",
19+
"chai": "^4.1.2",
2020
"eslint": "^3.16.0",
2121
"eslint-config-canonical": "1.8.1",
22-
"gitdown": "^2.5.0",
22+
"gitdown": "^2.5.2",
2323
"glob": "^7.1.2",
24-
"husky": "^0.11.7",
25-
"jsonlint": "^1.6.2",
26-
"mocha": "^3.0.2",
27-
"semantic-release": "^6.3.2"
24+
"husky": "^0.14.3",
25+
"jsonlint": "^1.6.3",
26+
"mocha": "^5.2.0",
27+
"semantic-release": "^15.5.0"
2828
},
2929
"engines": {
3030
"node": ">=4"
@@ -45,7 +45,7 @@
4545
"url": "https://github.com/gajus/eslint-plugin-flowtype"
4646
},
4747
"scripts": {
48-
"build": "babel ./src --out-dir ./dist --copy-files",
48+
"build": "rm -fr ./dist && babel ./src --out-dir ./dist --copy-files",
4949
"documentation": "gitdown ./.README/README.md --output-file ./README.md; npm run documentation-add-assertions",
5050
"documentation-add-assertions": "babel-node ./bin/readmeAssertions",
5151
"format-json": "jsonlint --sort-keys --in-place --indent ' ' ./src/configs/recommended.json && echo '' >> ./src/configs/recommended.json",

src/rules/arrayStyle/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export default (defaultConfig, simpleType) => {
4343
});
4444
}
4545
},
46+
4647
// verbose
4748
GenericTypeAnnotation (node) {
4849
if (node.id.name === 'Array') {

src/rules/defineFlowType.js

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,29 @@ const schema = [];
33
const create = (context) => {
44
let globalScope;
55

6-
// do nearly the same thing that eslint does for config globals
7-
// https://github.com/eslint/eslint/blob/v2.0.0/lib/eslint.js#L118-L194
6+
// do nearly the same thing that eslint does for config globals
7+
// https://github.com/eslint/eslint/blob/v2.0.0/lib/eslint.js#L118-L194
88
const makeDefined = (ident) => {
99
let ii;
1010

11-
// start from the right since we're going to remove items from the array
11+
// start from the right since we're going to remove items from the array
1212
for (ii = globalScope.through.length - 1; ii >= 0; ii--) {
1313
const ref = globalScope.through[ii];
1414

1515
if (ref.identifier.name === ident.name) {
16-
// use "__defineGeneric" since we don't have a reference to "escope.Variable"
17-
globalScope.__defineGeneric( // eslint-disable-line no-underscore-dangle
18-
ident.name,
19-
globalScope.set,
20-
globalScope.variables
21-
);
16+
// use "__defineGeneric" since we don't have a reference to "escope.Variable"
17+
// eslint-disable-next-line no-underscore-dangle
18+
globalScope.__defineGeneric(
19+
ident.name,
20+
globalScope.set,
21+
globalScope.variables
22+
);
2223
const variable = globalScope.set.get(ident.name);
2324

2425
variable.writeable = false;
25-
// "through" contains all references whose definition cannot be found
26-
// so we need to update references and remove the ones that were added
26+
27+
// "through" contains all references whose definition cannot be found
28+
// so we need to update references and remove the ones that were added
2729
globalScope.through.splice(ii, 1);
2830
ref.resolved = variable;
2931
variable.references.push(ref);

src/rules/delimiterDangle.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ const create = (context) => {
7070

7171
if (option === 'only-multiline' && isDangling && !isMultiLine) {
7272
report.dangle();
73-
74-
return;
7573
}
7674
};
7775

src/rules/noDupeKeys.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ const create = (context) => {
5959

6060
const checkForDuplicates = (node) => {
6161
const haystack = [];
62+
6263
// filter out complex object types, like ObjectTypeSpreadProperty
6364
const identifierNodes = _.filter(node.properties, {type: 'ObjectTypeProperty'});
6465

src/rules/noTypesMissingFileAnnotation.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ const create = (context) => {
3232
reporter(node, 'imports');
3333
}
3434
if (node.importKind === 'value' &&
35-
node.specifiers.some((specifier) => { return specifier.importKind === 'type'; })) {
35+
node.specifiers.some((specifier) => {
36+
return specifier.importKind === 'type';
37+
})) {
3638
reporter(node, 'imports');
3739
}
3840
},

src/rules/requireTypesAtTop.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,27 @@ const create = (context) => {
1616
// nodes representing type and import declarations
1717
const ignoredNodes = [
1818
// import ...
19-
(node) => { return node.type === 'ImportDeclaration'; },
19+
(node) => {
20+
return node.type === 'ImportDeclaration';
21+
},
22+
2023
// export type Foo = ...
2124
// export opaque type Foo = ...
2225
// export type Foo from ...
2326
// export opaque type Foo from ...
24-
(node) => { return node.type === 'ExportNamedDeclaration' && node.exportKind === 'type'; },
27+
(node) => {
28+
return node.type === 'ExportNamedDeclaration' && node.exportKind === 'type';
29+
},
30+
2531
// type Foo = ...
26-
(node) => { return node.type === 'TypeAlias'; },
32+
(node) => {
33+
return node.type === 'TypeAlias';
34+
},
35+
2736
// opaque type Foo = ...
28-
(node) => { return node.type === 'OpaqueType'; }
37+
(node) => {
38+
return node.type === 'OpaqueType';
39+
}
2940
];
3041

3142
const isIgnoredNode = (node) => {

0 commit comments

Comments
 (0)