A Mitosis plugin containing rules that help you write valid and idiomatic Mitosis code
First, make sure you have ESLint setup correctly. Then, install this plugin by running:
yarn add -D @builder.io/eslint-plugin-mitosis
Finally, add the plugin to the plugins
array, and the rules you want to the rules
array:
module.exports = {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
plugins: ['@builder.io/mitosis'],
extends: [
// Use this approach for our recommended rules configuration
'plugin:@builder.io/mitosis/recommended',
],
rules: {
// Use this to configure rules individually
'@builder.io/mitosis/css-no-vars': 'error',
},
};
- css-no-vars
- jsx-callback-arg-name
- jsx-callback-arrow-function
- no-assign-props-to-state
- no-async-methods-on-state
- no-conditional-logic-in-component-render
- no-state-destructuring
- no-var-declaration-in-jsx
- no-var-declaration-or-assignment-in-component
- no-var-name-same-as-state-property
- only-default-function-and-imports
- ref-no-current
- use-state-var-declarator