Skip to content

Commit 19b49dc

Browse files
authored
Updates (#220)
1 parent d885065 commit 19b49dc

File tree

6 files changed

+20
-27
lines changed

6 files changed

+20
-27
lines changed

.travis.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
language: node_js
22
node_js:
3-
- '10'
4-
- '8'
5-
- '6'
6-
before_install:
7-
- npm install --global npm
8-
after_success:
9-
- './node_modules/.bin/nyc report --reporter=text-lcov | ./node_modules/.bin/coveralls'
3+
- 11
4+
- 10
5+
- 8
6+
- 6
7+
before_install: npm install --global npm
8+
after_success: npx codecov --file=./coverage/lcov.info

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,22 @@
4343
"devDependencies": {
4444
"ava": "^1.0.1",
4545
"babel-eslint": "^10.0.1",
46-
"coveralls": "^3.0.2",
46+
"codecov": "^3.2.0",
4747
"eslint": "^5.12.0",
4848
"eslint-ava-rule-tester": "^3.0.0",
4949
"js-combinatorics": "^0.5.4",
5050
"nyc": "^13.1.0",
5151
"pify": "^4.0.1",
52-
"xo": "^0.23.0"
52+
"xo": "^0.24.0"
5353
},
5454
"peerDependencies": {
5555
"eslint": ">=5.9.0"
5656
},
57-
"ava": {
58-
"failWithoutAssertions": true
57+
"nyc": {
58+
"reporter": [
59+
"html",
60+
"lcov",
61+
"text"
62+
]
5963
}
6064
}

rules/no-async-fn-without-await.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const create = context => {
4242
message: 'Function was declared as `async` but doesn\'t use `await`'
4343
});
4444
}
45+
4546
asyncTest = null;
4647
testUsed = false;
4748
})

rules/no-duplicate-modifiers.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const create = context => {
3636
message: `Duplicate test modifier \`${current.name}\`.`
3737
});
3838
}
39+
3940
return current;
4041
});
4142
})
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const config = {}; // eslint-disable-line import/prefer-default-export
1+
export const config = {};

util.js

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,6 @@ exports.getTestModifier = (node, mod) => {
110110
return getTestModifiers(node).find(property => property.name === mod);
111111
};
112112

113-
/**
114-
* Removes given test-modifier from the source surrounding the given node
115-
*
116-
* @param {string} params.modifier - Name of the modifier
117-
* @param {Node} params.node - ESTree-node as provided by ESLint
118-
* @param {Context} params.context - ESLint-context as provided
119-
*
120-
* @return {Array} Compound parameters to be used as arguments for `fix.replaceTextRange()`
121-
*/
122113
exports.removeTestModifier = params => {
123114
const modifier = params.modifier.trim();
124115
const range = exports.getTestModifier(params.node, modifier).range.slice();
@@ -128,6 +119,7 @@ exports.removeTestModifier = params => {
128119
while (source.charAt(dotPosition) !== '.') {
129120
dotPosition -= 1;
130121
}
122+
131123
let snippet = source.slice(dotPosition, range[1]);
132124
snippet = snippet.replace(replacementRegExp, '');
133125
return [[dotPosition, range[1]], snippet];
@@ -146,17 +138,13 @@ const getMembers = node => {
146138
exports.getMembers = getMembers;
147139

148140
const repoUrl = 'https://github.com/avajs/eslint-plugin-ava';
149-
/**
150-
* Return the URL of the rule's documentation, either from parameter or the
151-
* requiring file's name.
152-
* @param {String} ruleName The name of the rule to generate a URL for.
153-
* @return {String} The URL of the rule's documentation.
154-
*/
141+
155142
const getDocsUrl = (filename, commitHash) => {
156143
const ruleName = path.basename(filename, '.js');
157144
commitHash = commitHash || `v${pkg.version}`;
158145
return `${repoUrl}/blob/${commitHash}/docs/rules/${ruleName}.md`;
159146
};
147+
160148
exports.getDocsUrl = getDocsUrl;
161149

162150
const assertionMethodsNumArguments = new Map([

0 commit comments

Comments
 (0)