mirror of
https://github.com/antebudimir/eslint-plugin-vanilla-extract.git
synced 2026-06-27 15:10:47 +00:00
fix: move wrapper detection to global settings and support cross-module style/recipe wrappers (#9)
This commit is contained in:
parent
aec1bf7d5d
commit
787d74ec6b
10 changed files with 486 additions and 10 deletions
|
|
@ -122,6 +122,36 @@ run({
|
|||
}],
|
||||
});
|
||||
`,
|
||||
},
|
||||
|
||||
// Imported local recipe wrapper with global settings recipe
|
||||
{
|
||||
code: `
|
||||
import { componentRecipe } from './component-recipe.css.js';
|
||||
|
||||
const myRecipe = componentRecipe({
|
||||
base: {
|
||||
display: 'flex',
|
||||
alignItems: 'center'
|
||||
}
|
||||
});
|
||||
`,
|
||||
settings: {
|
||||
'vanilla-extract': {
|
||||
recipe: ['componentRecipe'],
|
||||
},
|
||||
},
|
||||
errors: [{ messageId: 'alphabeticalOrder' }],
|
||||
output: `
|
||||
import { componentRecipe } from './component-recipe.css.js';
|
||||
|
||||
const myRecipe = componentRecipe({
|
||||
base: {
|
||||
alignItems: 'center',
|
||||
display: 'flex'
|
||||
}
|
||||
});
|
||||
`,
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue