@builder.io/eslint-plugin-mitosis
v0.0.16
Published
A Mitosis plugin containing rules that help you write valid and idiomatic Mitosis code
Downloads
8,188
Readme
Mitosis ESLint plugin
A Mitosis plugin containing rules that help you write valid and idiomatic Mitosis code
Setup
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',
},
};
Rules
- 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