]> git.proxmox.com Git - pve-eslint.git/blob - eslint/tests/fixtures/testers/rule-tester/no-test-filename
import 8.41.0 source
[pve-eslint.git] / eslint / tests / fixtures / testers / rule-tester / no-test-filename
1 /**
2 * @fileoverview Test rule to flag if the filename is missing;
3 * @author Stefan Lau
4 */
5
6 "use strict";
7
8 //------------------------------------------------------------------------------
9 // Rule Definition
10 //------------------------------------------------------------------------------
11
12 module.exports = {
13 meta: {
14 type: "problem",
15 schema: []
16 },
17 create(context) {
18 return {
19 "Program": function(node) {
20 if (context.filename === '<input>') {
21 context.report(node, "Filename test was not defined.");
22 }
23 }
24 };
25 }
26 };