Init Axo design system

This commit is contained in:
Jamie Kyle
2025-08-04 13:35:20 -07:00
committed by GitHub
parent 7553a85b1c
commit 0d99f8bca2
35 changed files with 4785 additions and 210 deletions

View File

@@ -317,6 +317,66 @@ module.exports = {
'func-names': 'off',
},
},
{
files: ['ts/axo/**/*.tsx'],
plugins: ['better-tailwindcss'],
settings: {
'better-tailwindcss': {
entryPoint: './ts/axo/tailwind.css',
callees: ['css'],
},
},
rules: {
// stylistic: Enforce consistent line wrapping for tailwind classes. (recommended, autofix)
'better-tailwindcss/enforce-consistent-line-wrapping': 'off',
// stylistic: Enforce a consistent order for tailwind classes. (recommended, autofix)
'better-tailwindcss/enforce-consistent-class-order': 'error',
// stylistic: Enforce consistent variable syntax. (autofix)
'better-tailwindcss/enforce-consistent-variable-syntax': 'error',
// stylistic: Enforce consistent position of the important modifier. (autofix)
'better-tailwindcss/enforce-consistent-important-position': 'error',
// stylistic: Enforce shorthand class names. (autofix)
'better-tailwindcss/enforce-shorthand-classes': 'error',
// stylistic: Remove duplicate classes. (autofix)
'better-tailwindcss/no-duplicate-classes': 'error',
// stylistic: Remove deprecated classes. (autofix)
'better-tailwindcss/no-deprecated-classes': 'off',
// stylistic: Disallow unnecessary whitespace in tailwind classes. (autofix)
'better-tailwindcss/no-unnecessary-whitespace': 'error',
// correctness: Report classes not registered with tailwindcss. (recommended)
'better-tailwindcss/no-unregistered-classes': 'error',
// correctness: Report classes that produce conflicting styles.
'better-tailwindcss/no-conflicting-classes': 'error',
// correctness: Disallow restricted classes. (autofix)
'better-tailwindcss/no-restricted-classes': [
'error',
{
restrict: [
{
pattern: '\\[#[a-fA-F0-9]{3,8}?\\]', // ex: "text-[#fff]"
message: 'No arbitrary hex values',
},
{
pattern: '\\[rgba?\\(.*\\)\\]', // ex: "text-[rgb(255,255,255)]"
message: 'No arbitrary rgb values',
},
{
pattern: '\\[hsla?\\(.*\\)\\]', // ex: "text-[hsl(255,255,255)]"
message: 'No arbitrary hsl values',
},
{
pattern: '^.*!$', // ex: "p-4!"
message: 'No !important modifiers',
},
{
pattern: '^\\*+:.*', // ex: "*:mx-0",
message: 'No child variants',
},
],
},
],
},
},
],
rules: {