From 506ed8719342b72d28de3f2f06b0b362e34684c4 Mon Sep 17 00:00:00 2001 From: Bea Esguerra Date: Tue, 17 Dec 2024 11:08:03 -0700 Subject: [PATCH] Enable aphrodite-add-style-variable-name rule in eslint-plugin-khan demo project (#1095) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary: Now that the `eslint-plugin-khan` package is released with the new `aphrodite-add-style-variable-name` rule, we can update the demo project to test that the rule works as expected Issue: FEI-5952 ## Test plan: Linting error - Run `yarn lint` in `packages/eslint-plugin-khan/demo` - Notice there is an error for the `aphrodite-add-style-variable-name` rule Screenshot 2024-12-13 at 4 19 12 PM Hints in vs code - Open `packages/eslint-plugin-khan/demo` in vs code (the demo project needs to be opened separately) - Open the `foo.tsx` file - Notice the linting error on the variable name when using addStyle Screenshot 2024-12-13 at 4 22 04 PM Author: beaesguerra Reviewers: kevinb-khan Required Reviewers: Approved By: kevinb-khan Checks: ✅ codecov/project, ✅ Test (macos-latest, 20.x), ✅ CodeQL, ✅ Lint, typecheck, and coverage check (ubuntu-latest, 20.x), ✅ gerald, ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 20.x), ✅ Analyze (javascript), ⏭️ dependabot Pull Request URL: https://github.com/Khan/wonder-stuff/pull/1095 --- .changeset/plenty-bats-flow.md | 2 ++ packages/eslint-plugin-khan/demo/.eslintrc.js | 3 +-- packages/eslint-plugin-khan/demo/package.json | 2 +- packages/eslint-plugin-khan/demo/yarn.lock | 6 ++++-- 4 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 .changeset/plenty-bats-flow.md diff --git a/.changeset/plenty-bats-flow.md b/.changeset/plenty-bats-flow.md new file mode 100644 index 00000000..a845151c --- /dev/null +++ b/.changeset/plenty-bats-flow.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/eslint-plugin-khan/demo/.eslintrc.js b/packages/eslint-plugin-khan/demo/.eslintrc.js index 7bc4481e..dc77ef93 100644 --- a/packages/eslint-plugin-khan/demo/.eslintrc.js +++ b/packages/eslint-plugin-khan/demo/.eslintrc.js @@ -23,7 +23,6 @@ module.exports = { rootDir: __dirname, }, ], - // TODO(kevinb): re-enable after publishing @khanacademy/eslint-plugin - // "@khanacademy/aphrodite-add-style-variable-name": "error", + "@khanacademy/aphrodite-add-style-variable-name": "error", }, }; diff --git a/packages/eslint-plugin-khan/demo/package.json b/packages/eslint-plugin-khan/demo/package.json index 5de897a5..7ded9e59 100644 --- a/packages/eslint-plugin-khan/demo/package.json +++ b/packages/eslint-plugin-khan/demo/package.json @@ -7,7 +7,7 @@ "lint": "eslint --ext .ts --ext .js --ext .tsx --ext .jsx ." }, "devDependencies": { - "@khanacademy/eslint-plugin": "^3.0.1", + "@khanacademy/eslint-plugin": "^3.1.1", "eslint": "^8.55.0", "typescript": "^5.0.4" }, diff --git a/packages/eslint-plugin-khan/demo/yarn.lock b/packages/eslint-plugin-khan/demo/yarn.lock index dc5321c9..f07d39d3 100644 --- a/packages/eslint-plugin-khan/demo/yarn.lock +++ b/packages/eslint-plugin-khan/demo/yarn.lock @@ -78,8 +78,10 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3" integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== -"@khanacademy/eslint-plugin@../": - version "3.0.1" +"@khanacademy/eslint-plugin@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@khanacademy/eslint-plugin/-/eslint-plugin-3.1.1.tgz#86cf706c28fbaa11083dc175202056665ab44124" + integrity sha512-1tOJRN1MWc7tOiSwxBT9KfOmo46d0/eB3P3On4PCZKkrrdC+wDNTxQ3FWX+xZBCjl6bSdh/ab5HZkOatDD7efA== dependencies: "@babel/types" "^7.23.0" "@typescript-eslint/utils" "8.17.0"