/** * @fileoverview Disallow string className alongwith styleName in the same JSX tag * @author Abhas Bhattacharya */ "use strict"; //------------------------------------------------------------------------------ // Requirements //------------------------------------------------------------------------------ var rule = require("../../../lib/rules/no-classname-with-stylename"), RuleTester = require("eslint").RuleTester; //------------------------------------------------------------------------------ // Tests //------------------------------------------------------------------------------ var ruleTester = new RuleTester({ parserOptions: { "ecmaFeatures": { "jsx": true }, ecmaVersion: 7, } }); ruleTester.run("no-classname-with-stylename", rule, { valid: [ "", "", "", "", "", "", "" // give me some code that won't trigger a warning ], invalid: [ { code: "", errors: [{ // message: "Disallow string className alongwith styleName in the same JSX tag", }] }, { code: "", errors: [{ // message: "Disallow string className alongwith styleName in the same JSX tag", }] }, { code: "", errors: [{ // message: "Disallow string className alongwith styleName in the same JSX tag", }] }, { code: "", errors: [{ // message: "Disallow string className alongwith styleName in the same JSX tag", }] }, { code: "", errors: [{ // message: "Disallow string className alongwith styleName in the same JSX tag", }] } ] });