Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/rentals.picotech.app/public_html/node_modules/eslint/lib/rules/ drwxr-xr-x |
Viewing file: Select action/file-type: /** * @fileoverview Rule to flag use of certain node types * @author Burak Yigit Kaya */ "use strict"; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ /** @type {import('../shared/types').Rule} */ module.exports = { meta: { type: "suggestion", docs: { description: "Disallow specified syntax", recommended: false, url: "https://eslint.org/docs/latest/rules/no-restricted-syntax" }, schema: { type: "array", items: { oneOf: [ { type: "string" }, { type: "object", properties: { selector: { type: "string" }, message: { type: "string" } }, required: ["selector"], additionalProperties: false } ] }, uniqueItems: true, minItems: 0 }, messages: { // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period restrictedSyntax: "{{message}}" } }, create(context) { return context.options.reduce((result, selectorOrObject) => { const isStringFormat = (typeof selectorOrObject === "string"); const hasCustomMessage = !isStringFormat && Boolean(selectorOrObject.message); const selector = isStringFormat ? selectorOrObject : selectorOrObject.selector; const message = hasCustomMessage ? selectorOrObject.message : `Using '${selector}' is not allowed.`; return Object.assign(result, { [selector](node) { context.report({ node, messageId: "restrictedSyntax", data: { message } }); } }); }, {}); } }; |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0033 ]-- |