eslint-plugin-cucumber
Advanced tools
Comparing version 0.0.1 to 0.1.0
'use strict'; | ||
var _ = require('lodash'); | ||
module.exports = { | ||
rules: { | ||
'async-then': require('./rules/async-then') | ||
'async-then': require('./rules/async-then'), | ||
'no-restricted-tags': require('./rules/no-restricted-tags') | ||
}, | ||
processors: { | ||
'.feature': { | ||
preprocess: function(text, filename) { | ||
return _.map(text.split("\n"), function (line) { | ||
if (line.trim().match(/^@/)) { | ||
return '/*__CUCUMBER_TAG__' + line.trim() + '*/'; | ||
} else { | ||
return ''; | ||
} | ||
}); | ||
}, | ||
postprocess: function(messages, filename) { | ||
return _.filter(_.flatten(messages), function (message) { | ||
return message.ruleId.match(/^cucumber/); | ||
}); | ||
} | ||
} | ||
} | ||
}; | ||
@@ -35,2 +35,1 @@ 'use strict'; | ||
}; | ||
{ | ||
"name": "eslint-plugin-cucumber", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "eslint rules for cucumber steps", | ||
@@ -14,3 +14,3 @@ "keywords": [ | ||
"scripts": { | ||
"test": "node tests/lib/rules/async-then.js" | ||
"test": "script/test.sh" | ||
}, | ||
@@ -33,3 +33,6 @@ "devDependencies": { | ||
"url": "http://github.com/darrinholst/eslint-plugin-cucumber.git" | ||
}, | ||
"dependencies": { | ||
"lodash": "~3.10.1" | ||
} | ||
} |
@@ -39,3 +39,4 @@ # eslint-plugin-cucumber | ||
"rules": { | ||
"cucumber/async-then": 2 | ||
"cucumber/async-then": 2, | ||
"cucumber/no-restricted-tags": [2, "wip", "broken", "foo"] | ||
} | ||
@@ -47,5 +48,6 @@ } | ||
| Name | Description | | ||
| ------------- | ------------- | | ||
| async-then | If you assume asynchronous steps then your Then steps should either return a promise or provide a callback function | | ||
| Name | Description | | ||
| ------------- | ------------- | | ||
| async-then | If you assume asynchronous steps then your Then steps should either return a promise or provide a callback function | | ||
| no-restricted-tags | Restrict usage of specified tags | | ||
@@ -6,6 +6,3 @@ 'use strict'; | ||
var ruleTester = new RuleTester(); | ||
ruleTester.run('async-then', rule, { | ||
new RuleTester().run('async-then', rule, { | ||
valid: [ | ||
@@ -12,0 +9,0 @@ 'this.Then(/step/, function () {return "anything";})', |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8885
12
121
52
1
+ Addedlodash@~3.10.1
+ Addedlodash@3.10.1(transitive)