Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-cucumber

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-cucumber - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

docs/rules/no-restricted-tags.md

26

lib/index.js
'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/);
});
}
}
}
};

1

lib/rules/async-then.js

@@ -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";})',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc