Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create ESLint plugin for using Assembly with React #1028

Open
mbullington opened this issue Oct 12, 2021 · 1 comment
Open

Create ESLint plugin for using Assembly with React #1028

mbullington opened this issue Oct 12, 2021 · 1 comment

Comments

@mbullington
Copy link

Description

Ideally in projects like Studio we'd only use Assembly classes, or a small amount of custom CSS. Sadly sometimes things in className={} are misnamed or don't actually exist.

I think we should make an ESLint plugin that checks all className={} and classnames statements to ensure all classes are valid in MBX Assembly.

An escape hatch could be an ESLint option that accepts additional class names.

@mbullington
Copy link
Author

eslint-plugin-tailwindcss has most of the code needed for this! https://github.com/francoismassart/eslint-plugin-tailwindcss/blob/master/lib/rules/no-custom-classname.js

I think it would be cool if this were generalized beyond just Assembly, like a eslint-plugin-atomiccss or something where you just pass a list of CSS files and it scans class names.

Also need to double check if it supports JSX and classnames helper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants