]>
git.proxmox.com Git - pve-eslint.git/blob - eslint/lib/rules/no-sync.js
06424e0b38f33fb39e993d253b405f0d53707355
2 * @fileoverview Rule to check for properties whose identifier ends with the string Sync
3 * @author Matt DuVall<http://mattduvall.com/>
10 //------------------------------------------------------------------------------
12 //------------------------------------------------------------------------------
23 description
: "disallow synchronous methods",
24 category
: "Node.js and CommonJS",
26 url
: "https://eslint.org/docs/rules/no-sync"
38 additionalProperties
: false
43 noSync
: "Unexpected sync method: '{{propertyName}}'."
48 const selector
= context
.options
[0] && context
.options
[0].allowAtRootLevel
49 ? ":function MemberExpression[property.name=/.*Sync$/]"
50 : "MemberExpression[property.name=/.*Sync$/]";
58 propertyName
: node
.property
.name