eslint-plugin-demoforfix

1.1.0 • Public • Published

Minimal eslint plugin

Install

npm i -D eslint-plugin-demoforfix

Then add to .eslintrc

{
    "rules": {
        "demoforfix/no-string-classname": 2
    },
    "plugins": [
        "demoforfix"
    ],
}

And you wil recive error if try to use literall class name

INVALID

import React, { PureComponent } from 'react';

class Cart extends PureComponent {
  render() {
    return (<p className="Cart">cart</p>);
  }
}

export default Cart;

VALID

import React, { PureComponent } from 'react';
import styles from './Cart.pcss';

class Cart extends PureComponent {
    render() {
        return (<p className={styles.Cart}>cart</p>)
    }
}

export default Cart;

Readme

Keywords

none

Package Sidebar

Install

npm i eslint-plugin-demoforfix

Weekly Downloads

0

Version

1.1.0

License

ISC

Unpacked Size

2.16 kB

Total Files

3

Last publish

Collaborators

  • silentimp