Skip to content

Commit

Permalink
Use @babel/eslint-parser instead of babel-eslint
Browse files Browse the repository at this point in the history
julianguyen committed Apr 14, 2022
1 parent 05a4929 commit 10c8fea
Showing 10 changed files with 64 additions and 33 deletions.
2 changes: 1 addition & 1 deletion client/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"plugins": ["flowtype", "jest", "react"],
"extends": ["airbnb", "plugin:flowtype/recommended"],
"parser": "babel-eslint",
"parser": "@babel/eslint-parser",
"env": {
"browser": true,
"jest/globals": true
6 changes: 5 additions & 1 deletion client/app/stories/Blockquote.stories.jsx
Original file line number Diff line number Diff line change
@@ -11,7 +11,11 @@ const Template = (args) => <Blockquote {...args} />;

export const Default = Template.bind({});

Default.args = { text: "It's not just all in your head, it's all around you. We can heal together.", author: '❤️' };
Default.args = {
text:
"It's not just all in your head, it's all around you. We can heal together.",
author: '❤️',
};
Default.parameters = {
backgrounds: { default: 'mulberry' },
};
12 changes: 10 additions & 2 deletions client/app/stories/Chart.stories.jsx
Original file line number Diff line number Diff line change
@@ -19,12 +19,20 @@ const ChartTemplate = (args) => <Chart {...args} />;

export const ChartDisplayWithAreaType = ChartTemplate.bind({});

ChartDisplayWithAreaType.args = { title: 'Sample', data: sampleChartData, chartType: 'Area' };
ChartDisplayWithAreaType.args = {
title: 'Sample',
data: sampleChartData,
chartType: 'Area',
};
ChartDisplayWithAreaType.storyName = 'ChartDisplay with area type';

export const ChartDisplayWithLineType = ChartTemplate.bind({});

ChartDisplayWithLineType.args = { title: 'Sample', data: sampleChartData, chartType: 'Line' };
ChartDisplayWithLineType.args = {
title: 'Sample',
data: sampleChartData,
chartType: 'Line',
};
ChartDisplayWithLineType.storyName = 'ChartDisplay with line type';

const ChartControlTemplate = (args) => <ChartControl {...args} />;
4 changes: 3 additions & 1 deletion client/app/stories/I18n.stories.jsx
Original file line number Diff line number Diff line change
@@ -7,7 +7,9 @@ export default {

const TranslationWithNoVariableTemplate = (args) => I18n.t('draft');

export const TranslationWithNoVariable = TranslationWithNoVariableTemplate.bind({});
export const TranslationWithNoVariable = TranslationWithNoVariableTemplate.bind(
{},
);

TranslationWithNoVariable.storyName = 'Translation with no variable';

12 changes: 9 additions & 3 deletions client/app/stories/Input.stories.jsx
Original file line number Diff line number Diff line change
@@ -131,7 +131,9 @@ const InputTextareaWithAccordionTemplate = (args) => (
</>
);

export const InputTextareaWithAccordion = InputTextareaWithAccordionTemplate.bind({});
export const InputTextareaWithAccordion = InputTextareaWithAccordionTemplate.bind(
{},
);

InputTextareaWithAccordion.storyName = 'InputTextarea with accordion';

@@ -185,7 +187,9 @@ const InputTextareaTemplateWithAccordionTemplate = (args) => (
</>
);

export const InputTextareaTemplateWithAccordion = InputTextareaTemplateWithAccordionTemplate.bind({});
export const InputTextareaTemplateWithAccordion = InputTextareaTemplateWithAccordionTemplate.bind(
{},
);

InputTextareaTemplateWithAccordion.storyName = 'InputTextareaTemplate with accordion';

@@ -294,7 +298,9 @@ const CheckboxGroupWithAccordionTemplate = (args) => (
</>
);

export const CheckboxGroupWithAccordion = CheckboxGroupWithAccordionTemplate.bind({});
export const CheckboxGroupWithAccordion = CheckboxGroupWithAccordionTemplate.bind(
{},
);

CheckboxGroupWithAccordion.storyName = 'CheckboxGroup with accordion';

6 changes: 5 additions & 1 deletion client/app/stories/PageTitle.stories.jsx
Original file line number Diff line number Diff line change
@@ -16,7 +16,11 @@ PageTitleWithoutCta.storyName = 'PageTitle without call to action';

export const PageTitleWithCta = Template.bind({});

PageTitleWithCta.args = { title: 'Title', subtitle: 'Subtitle', cta: <button type="button">Hello</button> };
PageTitleWithCta.args = {
title: 'Title',
subtitle: 'Subtitle',
cta: <button type="button">Hello</button>,
};
PageTitleWithCta.storyName = 'PageTitle with call to action';

export const PageTitleWithInstructions = Template.bind({});
6 changes: 4 additions & 2 deletions client/app/stories/Resource.stories.jsx
Original file line number Diff line number Diff line change
@@ -33,7 +33,8 @@ WithTags.storyName = 'With tags';
export const WithoutTags = Template.bind({});

WithoutTags.args = {
title: 'A very long title for a resource that should wrap to two lines and then some or not',
title:
'A very long title for a resource that should wrap to two lines and then some or not',
link: 'https://if-me.org',
author: 'Author with a very very long name that is usually an edge case',
};
@@ -46,7 +47,8 @@ export const WithAllProps = Template.bind({});

WithAllProps.args = {
tags: tags.concat(tags),
title: 'Invisible Illnesses: depression is an ocean, and another measure to consider',
title:
'Invisible Illnesses: depression is an ocean, and another measure to consider',
link: 'https://if-me.org',
author: 'Desi Rottman',
};
16 changes: 12 additions & 4 deletions client/app/stories/Tooltip.stories.jsx
Original file line number Diff line number Diff line change
@@ -49,7 +49,9 @@ const ElementIsTextAndTooltipIsPositionedRightTemplate = (args) => (
</center>
);

export const ElementIsTextAndTooltipIsPositionedRight = ElementIsTextAndTooltipIsPositionedRightTemplate.bind({});
export const ElementIsTextAndTooltipIsPositionedRight = ElementIsTextAndTooltipIsPositionedRightTemplate.bind(
{},
);

ElementIsTextAndTooltipIsPositionedRight.storyName = 'Element is text and tooltip is positioned right';

@@ -62,7 +64,9 @@ const ElementIsHtmlAndTooltipIsPositionedRightTemplate = (args) => (
</center>
);

export const ElementIsHtmlAndTooltipIsPositionedRight = ElementIsHtmlAndTooltipIsPositionedRightTemplate.bind({});
export const ElementIsHtmlAndTooltipIsPositionedRight = ElementIsHtmlAndTooltipIsPositionedRightTemplate.bind(
{},
);

ElementIsHtmlAndTooltipIsPositionedRight.storyName = 'Element is HTML and tooltip is positioned right';
ElementIsHtmlAndTooltipIsPositionedRight.parameters = {
@@ -78,7 +82,9 @@ const ElementIsTextAndTooltipIsPositionedCenterTemplate = (args) => (
</center>
);

export const ElementIsTextAndTooltipIsPositionedCenter = ElementIsTextAndTooltipIsPositionedCenterTemplate.bind({});
export const ElementIsTextAndTooltipIsPositionedCenter = ElementIsTextAndTooltipIsPositionedCenterTemplate.bind(
{},
);

ElementIsTextAndTooltipIsPositionedCenter.storyName = 'Element is text and tooltip is positioned center';

@@ -91,7 +97,9 @@ const ElementIsHtmlAndTooltipIsPositionedCenterTemplate = (args) => (
</center>
);

export const ElementIsHtmlAndTooltipIsPositionedCenter = ElementIsHtmlAndTooltipIsPositionedCenterTemplate.bind({});
export const ElementIsHtmlAndTooltipIsPositionedCenter = ElementIsHtmlAndTooltipIsPositionedCenterTemplate.bind(
{},
);

ElementIsHtmlAndTooltipIsPositionedCenter.storyName = 'Element is HTML and tooltip is positioned center';
ElementIsHtmlAndTooltipIsPositionedCenter.parameters = {
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -55,6 +55,7 @@
},
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/eslint-parser": "^7.17.0",
"@babel/plugin-proposal-class-properties": "^7.14.5",
"@babel/plugin-proposal-private-methods": "^7.16.11",
"@babel/plugin-proposal-private-property-in-object": "^7.16.7",
@@ -72,7 +73,6 @@
"@testing-library/react": "^11.0.4",
"@testing-library/user-event": "^12.1.7",
"babel-cli": "^6.24.1",
"babel-eslint": "^10.0.3",
"babel-jest": "^26.2.2",
"babel-loader": "^8.0.6",
"babel-plugin-flow-react-proptypes": "^26.0.0",
31 changes: 14 additions & 17 deletions client/yarn.lock
Original file line number Diff line number Diff line change
@@ -98,6 +98,15 @@
json5 "^2.2.1"
semver "^6.3.0"

"@babel/eslint-parser@^7.17.0":
version "7.17.0"
resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.17.0.tgz#eabb24ad9f0afa80e5849f8240d0e5facc2d90d6"
integrity sha512-PUEJ7ZBXbRkbq3qqM/jZ2nIuakUBqCYc7Qf52Lj7dlZ6zERnqisdHioL0l4wwQZnmskMeasqUNzLBFKs3nylXA==
dependencies:
eslint-scope "^5.1.1"
eslint-visitor-keys "^2.1.0"
semver "^6.3.0"

"@babel/generator@^7.11.5", "@babel/generator@^7.11.6":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.14.5.tgz#848d7b9f031caca9d0cd0af01b063f226f52d785"
@@ -427,7 +436,7 @@
chalk "^2.0.0"
js-tokens "^4.0.0"

"@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.11.5", "@babel/parser@^7.7.0":
"@babel/parser@^7.1.0", "@babel/parser@^7.10.4", "@babel/parser@^7.11.5":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.5.tgz#4cd2f346261061b2518873ffecdf1612cb032829"
integrity sha512-TM8C+xtH/9n1qzX+JNHi7AN2zHMTiPUtspO0ZdHflW8KaskkALhMmuMHb4bCmNdv9VAPzJX3/bXqkVLnAvsPfg==
@@ -1757,7 +1766,7 @@
globals "^11.1.0"
lodash "^4.17.19"

"@babel/traverse@^7.1.0", "@babel/traverse@^7.1.6", "@babel/traverse@^7.11.5", "@babel/traverse@^7.7.0":
"@babel/traverse@^7.1.0", "@babel/traverse@^7.1.6", "@babel/traverse@^7.11.5":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.14.5.tgz#c111b0f58afab4fea3d3385a406f692748c59870"
integrity sha512-G3BiS15vevepdmFqmUc9X+64y0viZYygubAMO8SvBmKARuF6CPSZtH4Ng9vi/lrWlZFGe3FWdXNy835akH8Glg==
@@ -1788,7 +1797,7 @@
debug "^4.1.0"
globals "^11.1.0"

"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.11.5", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.7.0":
"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.11.5", "@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.5.tgz#3bb997ba829a2104cedb20689c4a5b8121d383ff"
integrity sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==
@@ -4584,18 +4593,6 @@ babel-core@^6.26.0:
slash "^1.0.0"
source-map "^0.5.7"

babel-eslint@^10.0.3:
version "10.1.0"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232"
integrity sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==
dependencies:
"@babel/code-frame" "^7.0.0"
"@babel/parser" "^7.7.0"
"@babel/traverse" "^7.7.0"
"@babel/types" "^7.7.0"
eslint-visitor-keys "^1.0.0"
resolve "^1.12.0"

babel-generator@^6.26.0:
version "6.26.1"
resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90"
@@ -7360,12 +7357,12 @@ eslint-utils@^3.0.0:
dependencies:
eslint-visitor-keys "^2.0.0"

eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==

eslint-visitor-keys@^2.0.0:
eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303"
integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==

0 comments on commit 10c8fea

Please sign in to comment.