Files
agency/.pnpm-store/v3/files/31/37d8a589b03e176d51051cc3599a50d904503dfb63ff479b8dd40a247d3056325277611cfe4b90c17d00437d47da6f587a4c8de89882b2b9bb4ccb8afb2bca
hanzo-agent 5af6960b87 run project
Run: sess_f37640604ae254cb4d11dc6217f7b721
2026-09-30 00:04:56 +00:00

38 lines
757 B
Plaintext

/**
* @fileoverview Rule to flag use of with statement
* @author Nicholas C. Zakas
*/
"use strict";
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description: "Disallow `with` statements",
recommended: true,
url: "https://eslint.org/docs/latest/rules/no-with",
},
schema: [],
messages: {
unexpectedWith: "Unexpected use of 'with' statement.",
},
},
create(context) {
return {
WithStatement(node) {
context.report({ node, messageId: "unexpectedWith" });
},
};
},
};