Skip to content

Commit

Permalink
Update/tailwindcss@v2.1.0 (#6)
Browse files Browse the repository at this point in the history
* ADD new classnames for Tailwind CSS `v2.1.0`

* 1.3.0
  • Loading branch information
francoismassart committed Apr 5, 2021
1 parent 51b2652 commit 6f2e721
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

![eslint-plugin-tailwindcss logo](https://repository-images.githubusercontent.com/350840995/d9bbe080-9211-11eb-8148-0a9167a8b3ff)

Rules enforcing best practices and consitency using [Tailwind CSS](https://tailwindcss.com/) v2.0.3
Rules enforcing best practices and consitency using [Tailwind CSS](https://tailwindcss.com/) v2.1.0

## Installation

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/classnames-order.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Enforces a consistent order of the Tailwind CSS classnames and its variants.

> **Note**: By default, it uses the same order as the official [Tailwind CSS documentation](https://tailwindcss.com/docs/container) **v2.0.3**
> **Note**: By default, it uses the same order as the official [Tailwind CSS documentation](https://tailwindcss.com/docs/container) **v2.1.0**
## Rule Details

Expand Down
105 changes: 103 additions & 2 deletions lib/config/groups.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @fileoverview Default grouping for Tailwind CSS classnames following the order of the official docs
* @description The hierarchy of `members` can be useful to detect redundant and/or contradicting classnames
* @version v2.0.3
* @version v2.1.0
* @see https://tailwindcss.com/docs/container
* @author François Massart
*/
Expand All @@ -13,13 +13,17 @@ module.exports.groups = [
type: 'Container',
members: 'container',
},
{
type: 'Box Decoration Break',
members: 'decoration\\-(slice|clone)',
},
{
type: 'Box Sizing',
members: 'box\\-(border|content)',
},
{
type: 'Display',
members: '(block|flex|grid|flow\\-root|contents|hidden|inline(\\-(block|flex|grid))?|table\\-(column|footer|header|row)\\-group|table(\\-(caption|row|cell|column))?)',
members: '(block|flex|grid|flow\\-root|contents|hidden|inline(\\-(block|flex|table|grid))?|table\\-(column|footer|header|row)\\-group|table(\\-(caption|row|cell|column))?|list\\-item)',
},
{
type: 'Floats',
Expand All @@ -29,6 +33,10 @@ module.exports.groups = [
type: 'Clear',
members: 'float\\-(left|right|both|none)',
},
{
type: 'Isolation',
members: '(isolate|isolation\\-auto)',
},
{
type: 'Object Fit',
members: 'object\\-(contain|cover|fill|none|scale\\-down)',
Expand Down Expand Up @@ -676,6 +684,99 @@ module.exports.groups = [
type: 'Opacity',
members: 'opacity\\-(0|5|[1-9](0|5)0?)',
},
{
type: 'Mix Blend Mode',
members: 'mix\\-blend\\-(normal|multiply|screen|overlay|darken|lighten|color\\-(burn|dodge)|(hard|soft)\\-light|difference|exclusion|hue|saturation|color|luminosity)',
},
{
type: 'Background Blend Mode',
members: 'bg\\-blend\\-(normal|multiply|screen|overlay|darken|lighten|color\\-(dodge|burn)|(hard|soft)\\-light|difference|exclusion|hue|saturation|color|luminosity)',
},
],
},
{
type: 'FILTERS',
members: [
{
type: 'Filter',
members: 'filter(\\-none)?',
},
{
type: 'Blur',
members: 'blur(\\-(0|sm|md|lg|(2|3)?xl))?',
},
{
type: 'Brightness',
members: 'bightness\\-(0|50|75|90|95|100|105|110|125|150|200)',
},
{
type: 'Contrast',
members: 'contrast\\-(0|50|75|100|125|150|200)',
},
{
type: 'Drop Shadow',
members: 'drop\\-shadow(\\-(sm|md|lg|2?xl|none))?',
},
{
type: 'Grayscale',
members: 'grayscale(\\-0)?',
},
{
type: 'Hue Rotate',
members: '(\\-)?hue\\-rotate\\-(0|15|30|60|90|180)',
},
{
type: 'Invert',
members: 'invert(\\-0)?',
},
{
type: 'Saturate',
members: 'saturate\\-(0|50|100|150|200)',
},
{
type: 'Sepia',
members: 'sepia(\\-0)?',
},
{
type: 'Backdrop Filter',
members: 'backdrop\\-filter(\\-none)?',
},
{
type: 'Backdrop Blur',
members: 'backdrop\\-blur(\\-(0|sm|md|lg|(2|3)?xl))?',
},
{
type: 'Backdrop Brightness',
members: 'backdrop\\-bightness\\-(0|50|75|90|95|100|105|110|125|150|200)',
},
{
type: 'Backdrop Contrast',
members: 'backdrop\\-contrast\\-(0|50|75|100|125|150|200)',
},
{
type: 'Backdrop Grayscale',
members: 'backdrop\\-grayscale(\\-0)?',
},
{
type: 'Backdrop Hue Rotate',
members: '(\\-)?backdrop\\-hue\\-rotate\\-(0|15|30|60|90|180)',
},
{
type: 'Backdrop Invert',
members: 'backdrop\\-invert(\\-0)?',
},
{
type: 'Backdrop Opacity',
members: 'backdrop\\-opacity\\-(0|5|(1-9)0|25|75|95|100)',
},
{
type: 'Backdrop Saturate',
members: 'backdrop\\-saturate\\-(0|50|100|150|200)',
},
{
type: 'Backdrop Sepia',
members: 'backdrop\\-sepia(\\-0)?',
},
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-tailwindcss",
"version": "1.2.0",
"version": "1.3.0",
"description": "Rules enforcing best practices while using Tailwind CSS",
"keywords": [
"eslint",
Expand Down

0 comments on commit 6f2e721

Please sign in to comment.