Files
twenty_crm/packages/eslint-plugin-twenty-ts/dist/src/tests/styled-components-prefixed-with-styled.spec.js
Aditya Pimpalkar cb05b1fbc9 feat: reorder columns from table options (#1636)
* draggable prop addition

* draggable component addition

* state modification

* drag select state addition

* changed state name

* main merged

* lint fix

---------

Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
2023-09-19 15:31:21 -07:00

50 lines
1.5 KiB
JavaScript

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const rule_tester_1 = require("@typescript-eslint/rule-tester");
const styled_components_prefixed_with_styled_1 = __importDefault(require("../rules/styled-components-prefixed-with-styled"));
const ruleTester = new rule_tester_1.RuleTester({
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
ecmaFeatures: {
jsx: true,
},
},
});
ruleTester.run("styled-components-prefixed-with-styled", styled_components_prefixed_with_styled_1.default, {
valid: [
{
code: 'const StyledButton = styled.button``;',
filename: 'react.tsx',
},
{
code: 'const StyledComponent = styled.div``;',
filename: 'react.tsx',
},
],
invalid: [
{
code: 'const Button = styled.button``;',
filename: 'react.tsx',
errors: [
{
messageId: 'noStyledPrefix',
},
],
},
{
code: 'const Component = styled.div``;',
filename: 'react.tsx',
errors: [
{
messageId: 'noStyledPrefix',
},
],
},
],
});