1.6.2 • Published 2 months ago

@griffel/eslint-plugin v1.6.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

ESLint plugin for Griffel

ESLint plugin to follow best practices and anticipate common mistakes when writing styles with Griffel

Install

yarn add --dev @griffel/eslint-plugin
# or
npm install --save-dev @griffel/eslint-plugin

Usage

Add @griffel to the plugins section and plugin:@griffel/recommended to the extends section of your .eslintrc configuration file:

{
  "plugins": ["@griffel"],
  "extends": ["plugin:@griffel/recommended"]
}

Shareable configurations

This plugin exports recommended configuration that enforce good practices, but you can use only uses that are required for your use case:

{
  "plugins": ["@griffel"],
  "rules": {
    "@griffel/hook-naming": "error",
    "@griffel/no-shorthands": "error",
    "@griffel/pseudo-element-naming": "error"
  }
}

You can find more info about enabled rules in the Supported Rules section below.

Supported Rules

Key: 🔧 = fixable

NameDescription🔧
@griffel/hook-namingEnsure that hooks returned by the makeStyles() function start with "use"
@griffel/no-shorthandsEnforce usage of CSS longhands
@griffel/styles-fileEnsures that all makeStyles() and makeResetStyles() calls are placed in a .styles.js or .styles.ts file
@griffel/pseudo-element-namingEnsures that all Pseudo Elements start with two colons
1.6.2

2 months ago

1.6.1

2 months ago

1.6.0

3 months ago

1.5.2

4 months ago

1.5.1

4 months ago

1.5.0

7 months ago

1.4.0

8 months ago

1.3.0

9 months ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

2 years ago