From f84950d03b296bd513fcc3f3bd6ca9e196a26829 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Tue, 1 Aug 2023 10:07:00 -0400 Subject: [PATCH 1/2] chore: lint `Coupon.test.jsx` --- src/components/Coupon/Coupon.test.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/Coupon/Coupon.test.jsx b/src/components/Coupon/Coupon.test.jsx index e0a7bd0730..149d7bbf97 100644 --- a/src/components/Coupon/Coupon.test.jsx +++ b/src/components/Coupon/Coupon.test.jsx @@ -67,7 +67,7 @@ describe('', () => { expect(coupon).toMatchSnapshot(); }); - it("without max uses", () => { + it('without max uses', () => { const coupon = renderer .create( ', () => { ...initialCouponData, max_uses: null, }} - /> + />, ) .toJSON(); expect(coupon).toMatchSnapshot(); }); - it("with error state", () => { + it('with error state', () => { const coupon = renderer .create( + />, ) .toJSON(); expect(coupon).toMatchSnapshot(); @@ -138,7 +138,7 @@ describe('', () => { + />, ); fireEvent.keyDown(screen.getByRole('button'), { key: 'A', code: 'KeyA' }); From 5e6e0d946fa689d699d07161edeecdaf37b4fbaf Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Tue, 1 Aug 2023 10:23:08 -0400 Subject: [PATCH 2/2] fix: ensure `npm run lint` returns error on fail --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f7abed1292..c3be565971 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "build": "fedx-scripts webpack", "build:with-theme": "THEME=npm:@edx/brand-edx.org@latest npm run install-theme && fedx-scripts webpack", "check-types": "tsc --noemit", - "lint": "fedx-scripts eslint --ext .js --ext .jsx .; npm run check-types", + "lint": "fedx-scripts eslint --ext .js --ext .jsx . && npm run check-types", "lint:fix": "fedx-scripts eslint --fix --ext .js --ext .jsx --ext .tsx --ext .ts .", "precommit": "npm run lint", "prepublishOnly": "npm run build",