Sha256: 0744bfaa9c954076cc818c83e179c9960622d3fbf08ca4524a0963d2b7b946f4

Contents?: true

Size: 869 Bytes

Versions: 6

Compression:

Stored size: 869 Bytes

Contents

/**
 * @fileoverview Rule to flag use of with statement
 * @author Nicholas C. Zakas
 */

"use strict";

//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------

/** @type {import('../shared/types').Rule} */
module.exports = {
    meta: {
        type: "suggestion",

        docs: {
            description: "disallow `with` statements",
            recommended: true,
            url: "https://eslint.org/docs/rules/no-with"
        },

        schema: [],

        messages: {
            unexpectedWith: "Unexpected use of 'with' statement."
        }
    },

    create(context) {

        return {
            WithStatement(node) {
                context.report({ node, messageId: "unexpectedWith" });
            }
        };

    }
};

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-0.27.1 packages/webpacker/node_modules/eslint/lib/rules/no-with.js
decidim-0.26.4 packages/webpacker/node_modules/eslint/lib/rules/no-with.js
decidim-0.27.0 packages/webpacker/node_modules/eslint/lib/rules/no-with.js
decidim-0.26.3 packages/webpacker/node_modules/eslint/lib/rules/no-with.js
decidim-0.27.0.rc2 packages/webpacker/node_modules/eslint/lib/rules/no-with.js
decidim-0.27.0.rc1 packages/webpacker/node_modules/eslint/lib/rules/no-with.js