2 * @fileoverview Rule to check for properties whose identifier ends with the string Sync
3 * @author Matt DuVall<http://mattduvall.com/>
10 //------------------------------------------------------------------------------
12 //------------------------------------------------------------------------------
19 description: "disallow synchronous methods",
20 category: "Node.js and CommonJS",
22 url: "https://eslint.org/docs/rules/no-sync"
34 additionalProperties: false
40 const selector = context.options[0] && context.options[0].allowAtRootLevel
41 ? ":function MemberExpression[property.name=/.*Sync$/]"
42 : "MemberExpression[property.name=/.*Sync$/]";
48 message: "Unexpected sync method: '{{propertyName}}'.",
50 propertyName: node.property.name