mirror of
https://github.com/antebudimir/eslint-plugin-vanilla-extract.git
synced 2025-12-31 08:53:33 +00:00
feat 🥁: add ESLint v9 extends field support and document 8.57.0 compatibility
- confirm compatibility with ESLint 8.57.0 - add support for ESLint v9 extends field in flat config - maintain backward compatibility with existing usage patterns - update docs with configuration examples This commit enhances the plugin's configuration options for ESLint v9 users while ensuring backward compatibility. Users can now use the familiar extends syntax with flat config, simplifying integration into existing projects. Documentation has been updated to demonstrate proper usage with both ESLint 8 and 9.
This commit is contained in:
parent
f880c051ff
commit
35875fbb31
5 changed files with 197 additions and 67 deletions
30
src/index.ts
30
src/index.ts
|
|
@ -5,10 +5,10 @@ import noEmptyStyleBlocksRule from './css-rules/no-empty-blocks/rule-definition.
|
|||
import noUnknownUnitRule from './css-rules/no-unknown-unit/rule-definition.js';
|
||||
import noZeroUnitRule from './css-rules/no-zero-unit/rule-definition.js';
|
||||
|
||||
export const vanillaExtract = {
|
||||
const vanillaExtract = {
|
||||
meta: {
|
||||
name: '@antebudimir/eslint-plugin-vanilla-extract',
|
||||
version: '1.9.0',
|
||||
version: '1.10.0',
|
||||
},
|
||||
rules: {
|
||||
'alphabetical-order': alphabeticalOrderRule,
|
||||
|
|
@ -18,17 +18,21 @@ export const vanillaExtract = {
|
|||
'no-unknown-unit': noUnknownUnitRule,
|
||||
'no-zero-unit': noZeroUnitRule,
|
||||
},
|
||||
configs: {
|
||||
recommended: {
|
||||
plugins: ['vanilla-extract'],
|
||||
rules: {
|
||||
'vanilla-extract/concentric-order': 'error',
|
||||
'vanilla-extract/no-empty-style-blocks': 'error',
|
||||
'vanilla-extract/no-unknown-unit': 'error',
|
||||
'vanilla-extract/no-zero-unit': 'error',
|
||||
},
|
||||
},
|
||||
},
|
||||
configs: {},
|
||||
};
|
||||
|
||||
Object.assign(vanillaExtract.configs, {
|
||||
recommended: {
|
||||
plugins: {
|
||||
'vanilla-extract': vanillaExtract,
|
||||
},
|
||||
rules: {
|
||||
'vanilla-extract/concentric-order': 'error',
|
||||
'vanilla-extract/no-empty-style-blocks': 'error',
|
||||
'vanilla-extract/no-unknown-unit': 'error',
|
||||
'vanilla-extract/no-zero-unit': 'error',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export default vanillaExtract;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue