Sha256: cfb366ec1edb88d414b2b4ebc0fa980bb2ce4d903311afbfa31e743589a40572
Contents?: true
Size: 764 Bytes
Versions: 2
Compression:
Stored size: 764 Bytes
Contents
/** * @fileoverview Rule to check for properties whose identifier ends with the string Sync * @author Matt DuVall<http://mattduvall.com/> */ /* jshint node:true */ "use strict"; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = function(context) { return { "MemberExpression": function(node) { var propertyName = node.property.name, syncRegex = /.*Sync$/; if (syncRegex.exec(propertyName) !== null) { context.report(node, "Unexpected sync method: '" + propertyName + "'."); } } }; }; module.exports.schema = [];
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
eslint_node_modules-1.6.0.1 | vendor/node_modules/eslint/lib/rules/no-sync.js |
eslint_node_modules-1.6.0 | vendor/node_modules/eslint/lib/rules/no-sync.js |