Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More β†’
Socket
Sign inDemoInstall
Socket

eslint-plugin-tailwindcss

Package Overview
Dependencies
Maintainers
1
Versions
184
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-tailwindcss - npm Package Compare versions

Comparing version 3.12.0 to 3.12.1-beta.0

lib/util/regex.js

7

lib/rules/no-custom-classname.js

@@ -17,2 +17,3 @@ /**

const generated = require('../util/generated');
const escapeRegex = require('../util/regex').escapeRegex;

@@ -30,3 +31,4 @@ //------------------------------------------------------------------------------

// validate these avoids false reports.
const GROUP_NAME_REGEXP = /^(group|peer)\/[\w\$\#\@\%\^\&\*\_\-]+$/i;
const getGroupNameRegex = (prefix = '') =>
new RegExp(`^${escapeRegex(prefix)}(group|peer)\/[\\w\\$\\#\\@\\%\\^\\&\\*\\_\\-]+$`, 'i');

@@ -115,2 +117,3 @@ const contextFallbackCache = new WeakMap();

const classnamesFromFiles = getClassnamesFromCSS(cssFiles, cssFilesRefreshRate);
const groupNameRegex = getGroupNameRegex(mergedConfig.prefix);

@@ -140,3 +143,3 @@ /**

}
if (GROUP_NAME_REGEXP.test(className)) {
if (groupNameRegex.test(className)) {
return; // Lazier is faster... processing next className!

@@ -143,0 +146,0 @@ }

@@ -7,2 +7,3 @@ /**

const { separatorRegEx } = require('./regex');
// context.parserPath

@@ -221,3 +222,2 @@ // /.../eslint-plugin-tailwindcss/node_modules/espree/espree.js

}
const separatorRegEx = /(\s+)/;
let parts = classStr.split(separatorRegEx);

@@ -224,0 +224,0 @@ if (parts[0] === '') {

@@ -0,1 +1,3 @@

const { separatorRegEx } = require('../regex');
function bigSign(bigIntValue) {

@@ -48,3 +50,3 @@ return (bigIntValue > 0n) - (bigIntValue < 0n);

let result = '';
let parts = classStr.split(/(\s+)/);
let parts = classStr.split(separatorRegEx);
let classes = parts.filter((_, i) => i % 2 === 0);

@@ -51,0 +53,0 @@ let whitespace = parts.filter((_, i) => i % 2 !== 0);

{
"name": "eslint-plugin-tailwindcss",
"version": "3.12.0",
"version": "3.12.1-beta.0",
"description": "Rules enforcing best practices while using Tailwind CSS",

@@ -5,0 +5,0 @@ "keywords": [

# eslint-plugin-tailwindcss
![npm (scoped)](https://img.shields.io/npm/v/eslint-plugin-tailwindcss?style=for-the-badge) ![npm bundle size (scoped)](https://img.shields.io/npm/l/eslint-plugin-tailwindcss?style=for-the-badge)
![npm latest version](https://img.shields.io/npm/v/eslint-plugin-tailwindcss?style=for-the-badge) ![license](https://img.shields.io/npm/l/eslint-plugin-tailwindcss?style=for-the-badge) ![downloads](https://img.shields.io/npm/dt/eslint-plugin-tailwindcss?style=for-the-badge)

@@ -43,2 +43,4 @@ ![eslint-plugin-tailwindcss logo](.github/logo.png)

- fix: [do not handle non-ASCII whitespace as separator](https://github.com/francoismassart/eslint-plugin-tailwindcss/pull/246) (by [uhyo](https://github.com/uhyo) πŸ™)
- fix: [prefix support for named group/peer syntax](https://github.com/francoismassart/eslint-plugin-tailwindcss/pull/244) (by [bezbac](https://github.com/bezbac) πŸ™)
- feat: [support tailwind config in typescript](https://github.com/francoismassart/eslint-plugin-tailwindcss/pull/242) (by [quesabe](https://github.com/quesabe) πŸ™)

@@ -45,0 +47,0 @@ **You may have to upgrade your Tailwind CSS version to `3.3.2`**

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc