Skip to content

Commit

Permalink
feat: add no-unused eslint rule to find unused styles (#767)
Browse files Browse the repository at this point in the history
* feat: add no-unused eslint rule
* Addressed comments; added tests: named exports, indirect style invoke; added features: non-default export, used style as return, full import pattern support
  • Loading branch information
Samantha-Zhan authored Nov 11, 2024
1 parent 004c821 commit ec13602
Show file tree
Hide file tree
Showing 6 changed files with 680 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/docs/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = {
// The Eslint rule still needs work, but you can
// enable it to test things out.
'@stylexjs/valid-styles': 'error',
// '@stylexjs/no-unused': 'warn',
// 'ft-flow/space-after-type-colon': 0,
// 'ft-flow/no-types-missing-file-annotation': 0,
// 'ft-flow/generic-spacing': 0,
Expand Down
1 change: 1 addition & 0 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
},
"devDependencies": {
"@babel/eslint-parser": "^7.25.8",
"@stylexjs/eslint-plugin": "0.8.0",
"@stylexjs/babel-plugin": "0.9.3",
"clean-css": "^5.3.2",
"eslint": "^8.57.1",
Expand Down
23 changes: 23 additions & 0 deletions package-lock.json

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

Loading

0 comments on commit ec13602

Please sign in to comment.