Skip to content

Commit

Permalink
feat(DataListAction): Remove isPlainButtonAction prop
Browse files Browse the repository at this point in the history
  • Loading branch information
tlabaj committed Sep 20, 2024
1 parent 57f41a2 commit d1796ba
Show file tree
Hide file tree
Showing 115 changed files with 1,827 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const ruleTester = require("../../ruletester");
import * as rule from "./dataListAction-remove-theme-prop";

ruleTester.run("dataListAction-remove-theme-prop", rule, {
valid: [
{
code: `<PageSidebar theme="dark" />`,
},
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar someOtherProp />`,
},
],
invalid: [
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar theme="dark" />`,
output: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar />`,
errors: [
{
message: `The \`theme\` prop has been removed from PageSidebar as theming is no longer handled React-side.`,
type: "JSXOpeningElement",
},
],
},
],
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const ruleTester = require("../../ruletester");
import * as rule from "./dataListAction-remove-theme-prop";

ruleTester.run("dataListAction-remove-is-prop", rule, {
valid: [
{
code: `<PageSidebar theme="dark" />`,
},
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar someOtherProp />`,
},
],
invalid: [
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar theme="dark" />`,
output: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar />`,
errors: [
{
message: `The \`theme\` prop has been removed from PageSidebar as theming is no longer handled React-side.`,
type: "JSXOpeningElement",
},
],
},
],
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const ruleTester = require("../../ruletester");
import * as rule from "./dataListAction-remove-theme-prop";

ruleTester.run("dataListAction-remove-isPla-prop", rule, {
valid: [
{
code: `<PageSidebar theme="dark" />`,
},
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar someOtherProp />`,
},
],
invalid: [
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar theme="dark" />`,
output: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar />`,
errors: [
{
message: `The \`theme\` prop has been removed from PageSidebar as theming is no longer handled React-side.`,
type: "JSXOpeningElement",
},
],
},
],
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const ruleTester = require("../../ruletester");
import * as rule from "./dataListAction-remove-theme-prop";

ruleTester.run("dataListAction-remove-isPlain-prop", rule, {
valid: [
{
code: `<PageSidebar theme="dark" />`,
},
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar someOtherProp />`,
},
],
invalid: [
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar theme="dark" />`,
output: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar />`,
errors: [
{
message: `The \`theme\` prop has been removed from PageSidebar as theming is no longer handled React-side.`,
type: "JSXOpeningElement",
},
],
},
],
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const ruleTester = require("../../ruletester");
import * as rule from "./dataListAction-remove-theme-prop";

ruleTester.run("dataListAction-remove-isPlainButtonAction-prop", rule, {
valid: [
{
code: `<PageSidebar theme="dark" />`,
},
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar someOtherProp />`,
},
],
invalid: [
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar theme="dark" />`,
output: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar />`,
errors: [
{
message: `The \`theme\` prop has been removed from PageSidebar as theming is no longer handled React-side.`,
type: "JSXOpeningElement",
},
],
},
],
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const ruleTester = require("../../ruletester");
import * as rule from "./dataListAction-remove-isPlainButtonAction-prop";

ruleTester.run("dataListAction-remove-isPlainButtonAction-prop", rule, {
valid: [
{
code: `<PageSidebar theme="dark" />`,
},
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar someOtherProp />`,
},
],
invalid: [
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar theme="dark" />`,
output: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar />`,
errors: [
{
message: `The \`theme\` prop has been removed from PageSidebar as theming is no longer handled React-side.`,
type: "JSXOpeningElement",
},
],
},
],
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const ruleTester = require("../../ruletester");
import * as rule from "./dataListAction-remove-isPlainButtonAction-prop";

ruleTester.run("dataListAction-remove-isPlainButtonAction-prop", rule, {
valid: [
{
code: `<Data theme="dark" />`,
},
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar someOtherProp />`,
},
],
invalid: [
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar theme="dark" />`,
output: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar />`,
errors: [
{
message: `The \`theme\` prop has been removed from PageSidebar as theming is no longer handled React-side.`,
type: "JSXOpeningElement",
},
],
},
],
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const ruleTester = require("../../ruletester");
import * as rule from "./dataListAction-remove-isPlainButtonAction-prop";

ruleTester.run("dataListAction-remove-isPlainButtonAction-prop", rule, {
valid: [
{
code: `<DataList theme="dark" />`,
},
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar someOtherProp />`,
},
],
invalid: [
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar theme="dark" />`,
output: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar />`,
errors: [
{
message: `The \`theme\` prop has been removed from PageSidebar as theming is no longer handled React-side.`,
type: "JSXOpeningElement",
},
],
},
],
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const ruleTester = require("../../ruletester");
import * as rule from "./dataListAction-remove-isPlainButtonAction-prop";

ruleTester.run("dataListAction-remove-isPlainButtonAction-prop", rule, {
valid: [
{
code: `<DataListAction... theme="dark" />`,
},
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar someOtherProp />`,
},
],
invalid: [
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar theme="dark" />`,
output: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar />`,
errors: [
{
message: `The \`theme\` prop has been removed from PageSidebar as theming is no longer handled React-side.`,
type: "JSXOpeningElement",
},
],
},
],
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const ruleTester = require("../../ruletester");
import * as rule from "./dataListAction-remove-isPlainButtonAction-prop";

ruleTester.run("dataListAction-remove-isPlainButtonAction-prop", rule, {
valid: [
{
code: `<DataListAction theme="dark" />`,
},
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar someOtherProp />`,
},
],
invalid: [
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar theme="dark" />`,
output: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar />`,
errors: [
{
message: `The \`theme\` prop has been removed from PageSidebar as theming is no longer handled React-side.`,
type: "JSXOpeningElement",
},
],
},
],
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const ruleTester = require("../../ruletester");
import * as rule from "./dataListAction-remove-isPlainButtonAction-prop";

ruleTester.run("dataListAction-remove-isPlainButtonAction-prop", rule, {
valid: [
{
code: `<DataListAction isPlainButtonAction />`,
},
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar someOtherProp />`,
},
],
invalid: [
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar theme="dark" />`,
output: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar />`,
errors: [
{
message: `The \`theme\` prop has been removed from PageSidebar as theming is no longer handled React-side.`,
type: "JSXOpeningElement",
},
],
},
],
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const ruleTester = require("../../ruletester");
import * as rule from "./dataListAction-remove-isPlainButtonAction-prop";

ruleTester.run("dataListAction-remove-isPlainButtonAction-prop", rule, {
valid: [
{
code: `<DataListAction isPlainButtonAction />`,
},
{
code: `import { Data } from '@patternfly/react-core'; <PageSidebar someOtherProp />`,
},
],
invalid: [
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar theme="dark" />`,
output: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar />`,
errors: [
{
message: `The \`theme\` prop has been removed from PageSidebar as theming is no longer handled React-side.`,
type: "JSXOpeningElement",
},
],
},
],
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const ruleTester = require("../../ruletester");
import * as rule from "./dataListAction-remove-isPlainButtonAction-prop";

ruleTester.run("dataListAction-remove-isPlainButtonAction-prop", rule, {
valid: [
{
code: `<DataListAction isPlainButtonAction />`,
},
{
code: `import { DataListAction } from '@patternfly/react-core'; <PageSidebar someOtherProp />`,
},
],
invalid: [
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar theme="dark" />`,
output: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar />`,
errors: [
{
message: `The \`theme\` prop has been removed from PageSidebar as theming is no longer handled React-side.`,
type: "JSXOpeningElement",
},
],
},
],
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const ruleTester = require("../../ruletester");
import * as rule from "./dataListAction-remove-isPlainButtonAction-prop";

ruleTester.run("dataListAction-remove-isPlainButtonAction-prop", rule, {
valid: [
{
code: `<DataListAction isPlainButtonAction />`,
},
{
code: `import { DataListAction } from '@patternfly/react-core'; <DataListAction someOtherProp />`,
},
],
invalid: [
{
code: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar theme="dark" />`,
output: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar />`,
errors: [
{
message: `The \`theme\` prop has been removed from PageSidebar as theming is no longer handled React-side.`,
type: "JSXOpeningElement",
},
],
},
],
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const ruleTester = require("../../ruletester");
import * as rule from "./dataListAction-remove-isPlainButtonAction-prop";

ruleTester.run("dataListAction-remove-isPlainButtonAction-prop", rule, {
valid: [
{
code: `<DataListAction isPlainButtonAction />`,
},
{
code: `import { DataListAction } from '@patternfly/react-core'; <DataListAction someOtherProp />`,
},
],
invalid: [
{
code: `import { DataListActipo } from '@patternfly/react-core'; <PageSidebar theme="dark" />`,
output: `import { PageSidebar } from '@patternfly/react-core'; <PageSidebar />`,
errors: [
{
message: `The \`theme\` prop has been removed from PageSidebar as theming is no longer handled React-side.`,
type: "JSXOpeningElement",
},
],
},
],
});
Loading

0 comments on commit d1796ba

Please sign in to comment.