mirror of
https://codeberg.org/Kankys/NewLukasBlog.git
synced 2026-11-11 14:14:36 +01:00
OpravyPoAI
This commit is contained in:
1 parent
99aa797101
commit
24fd53c94c
4746 files changed
+700320
-12
No files matched your search
+37
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @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" });
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
Reference in new issue
Block a user