mirror of
https://github.com/lingble/twenty.git
synced 2025-11-01 13:17:57 +00:00
* Fix docker install * Move back twenty-eslint-plugin to eslint-plugin-twenty * fix: add bundled yarn * Improve makeifle structure * Update commands and doc * Add pg_graphql binaries * Fix --------- Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
48 lines
999 B
TypeScript
48 lines
999 B
TypeScript
import { RuleTester } from "@typescript-eslint/rule-tester";
|
|
|
|
import styledComponentsPrefixedWithStyledRule from "../rules/styled-components-prefixed-with-styled";
|
|
|
|
const ruleTester = new RuleTester({
|
|
parser: "@typescript-eslint/parser",
|
|
parserOptions: {
|
|
project: "./tsconfig.json",
|
|
tsconfigRootDir: __dirname,
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
});
|
|
|
|
ruleTester.run(
|
|
"styled-components-prefixed-with-styled",
|
|
styledComponentsPrefixedWithStyledRule,
|
|
{
|
|
valid: [
|
|
{
|
|
code: "const StyledButton = styled.button``;",
|
|
},
|
|
{
|
|
code: "const StyledComponent = styled.div``;",
|
|
},
|
|
],
|
|
invalid: [
|
|
{
|
|
code: "const Button = styled.button``;",
|
|
errors: [
|
|
{
|
|
messageId: "noStyledPrefix",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
code: "const Component = styled.div``;",
|
|
errors: [
|
|
{
|
|
messageId: "noStyledPrefix",
|
|
},
|
|
],
|
|
},
|
|
],
|
|
},
|
|
);
|