Skip to content

Commit

Permalink
Enable aphrodite-add-style-variable-name rule in eslint-plugin-khan d…
Browse files Browse the repository at this point in the history
…emo project (#1095)

## 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

<img width="1056" alt="Screenshot 2024-12-13 at 4 19 12 PM" src="https://github.com/user-attachments/assets/80ce04ae-2526-4c31-bc85-d8d4bc3720de" />

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

<img width="1313" alt="Screenshot 2024-12-13 at 4 22 04 PM" src="https://github.com/user-attachments/assets/55faf91f-cd4d-40c4-89dc-6b55ee00e10b" />

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: #1095
  • Loading branch information
beaesguerra authored Dec 17, 2024
1 parent 0073ccb commit 506ed87
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .changeset/plenty-bats-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
3 changes: 1 addition & 2 deletions packages/eslint-plugin-khan/demo/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
};
2 changes: 1 addition & 1 deletion packages/eslint-plugin-khan/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
6 changes: 4 additions & 2 deletions packages/eslint-plugin-khan/demo/yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 506ed87

Please sign in to comment.