'use strict';
import { createEslintRule } from '@flint/infra/create-eslint-rule';
import { isTestFile, isIdentifier, isStringLiteral, isNameMatch, isLiteral } from '@flint/infra/analysis';
import { eslintProperties } from '@flint/infra/constants/rules-meta';

var __defProp=Object['defineProperty'],__name=(_0x1cbc38,_0xb9cf86)=>__defProp(_0x1cbc38,'name',{'value':_0xb9cf86,'configurable':!![]});const ruleName='must-not-use-the-single-error-property-in-test';const ruleContent='\x0a###\x20**Must\x20not**\x20use\x20the\x20single\x20`error`\x20property\x20in\x20test\x20files.\x0a\x0a####\x20Wrong\x0a\x0aconst\x20invalidCases:\x20RuleInvalidCase[]\x20=\x20[\x0a\x20\x20\x20\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20`\x0a\x20\x20\x20\x20\x20\x20\x20\x20const\x20foo\x20=\x20\x22bar\x22;\x0a\x20\x20\x20\x20\x20\x20\x20\x20`,\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x20error:\x201\x20},\x0a\x20\x20\x20\x20],\x0a];\x0a\x0a####\x20Correct\x0a\x0aconst\x20invalidCases:\x20RuleInvalidCase[]\x20=\x20[\x0a\x20\x20\x20\x20`\x0a\x20\x20\x20\x20const\x20foo\x20=\x20\x22bar\x22;\x0a\x20\x20\x20\x20`,\x0a];\x0a\x0a####\x20Why\x0a\x0aThis\x20is\x20the\x20default\x20behavior.';var mustNotUseTheSingleErrorPropertyInTest = createEslintRule(ruleName,ruleContent,__name(function create(_0x5597ef){return {'Property'(_0x24aacb){isTestFile(_0x5597ef['filename'])&&(isIdentifier(_0x24aacb['key'])||isStringLiteral(_0x24aacb['key']))&&isNameMatch(_0x24aacb['key'],eslintProperties['error'])&&isLiteral(_0x24aacb['value'])&&_0x24aacb['value']['value']===-0x1135+0x955+0x7e1&&_0x5597ef['report']({'node':_0x24aacb,'messageId':ruleName});}};},'create'));

export { mustNotUseTheSingleErrorPropertyInTest as default, ruleName };
