]> git.proxmox.com Git - pve-eslint.git/blob - eslint/tests/fixtures/testers/rule-tester/no-test-settings.js
07ecfa7bca6c6f8900af8eff2292d26d250f6f18
[pve-eslint.git] / eslint / tests / fixtures / testers / rule-tester / no-test-settings.js
1 /**
2 * @fileoverview Test rule to flag if the settings var `test` is missing;
3 * @author Ilya Volodin
4 */
5
6 //------------------------------------------------------------------------------
7 // Rule Definition
8 //------------------------------------------------------------------------------
9
10 module.exports = function(context) {
11 "use strict";
12
13 return {
14 "Program": function(node) {
15 if (!context.settings || !context.settings.test) {
16 context.report(node, "Global settings test was not defined.");
17 }
18 }
19 };
20 };