Sha256: 1fbd68c9b08d1b8b450009e003b48f9d0d141b002e6c4dd8474e6d93235bae88

Contents?: true

Size: 756 Bytes

Versions: 43

Compression:

Stored size: 756 Bytes

Contents

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

"use strict";

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

module.exports = {
    meta: {
        docs: {
            description: "disallow `with` statements",
            category: "Best Practices",
            recommended: false,
            url: "https://eslint.org/docs/rules/no-with"
        },

        schema: []
    },

    create(context) {

        return {
            WithStatement(node) {
                context.report({ node, message: "Unexpected use of 'with' statement." });
            }
        };

    }
};

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
govuk_publishing_components-18.0.0 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.21.0 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.20.0 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.19.1 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.19.0 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.18.0 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.17.0 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.16.0 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.15.0 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.14.0 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.13.0 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.12.2 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.12.1 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.12.0 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.11.0 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.10.0 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.9.0 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.8.0 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.7.0 node_modules/standard/node_modules/eslint/lib/rules/no-with.js
govuk_publishing_components-17.6.1 node_modules/standard/node_modules/eslint/lib/rules/no-with.js