diff --git a/package-lock.json b/package-lock.json index 1b701c5..73e13a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,7 @@ "": { "name": "prettier-plugin-tailwindcss", "version": "0.1.13", + "license": "MIT", "devDependencies": { "@tailwindcss/line-clamp": "^0.3.0", "@trivago/prettier-plugin-sort-imports": "^3.3.0", diff --git a/src/index.js b/src/index.js index 5fa72c3..213abee 100644 --- a/src/index.js +++ b/src/index.js @@ -404,7 +404,8 @@ function transformJavaScript(ast, { env }) { if (!node.value) { return } - if (['class', 'className'].includes(node.name.name)) { + + if (['class', 'className', 'style'].includes(node.name.name)) { if (isStringLiteral(node.value)) { sortStringLiteral(node.value, { env }) } else if (node.value.type === 'JSXExpressionContainer') {