source: imaps-frontend/node_modules/eslint/lib/rules/no-with.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 876 bytes
RevLine 
[d565449]1/**
2 * @fileoverview Rule to flag use of with statement
3 * @author Nicholas C. Zakas
4 */
5
6"use strict";
7
8//------------------------------------------------------------------------------
9// Rule Definition
10//------------------------------------------------------------------------------
11
12/** @type {import('../shared/types').Rule} */
13module.exports = {
14 meta: {
15 type: "suggestion",
16
17 docs: {
18 description: "Disallow `with` statements",
19 recommended: true,
20 url: "https://eslint.org/docs/latest/rules/no-with"
21 },
22
23 schema: [],
24
25 messages: {
26 unexpectedWith: "Unexpected use of 'with' statement."
27 }
28 },
29
30 create(context) {
31
32 return {
33 WithStatement(node) {
34 context.report({ node, messageId: "unexpectedWith" });
35 }
36 };
37
38 }
39};
Note: See TracBrowser for help on using the repository browser.