diff --git a/.changeset/silly-rocks-lay.md b/.changeset/silly-rocks-lay.md new file mode 100644 index 0000000..70b0e23 --- /dev/null +++ b/.changeset/silly-rocks-lay.md @@ -0,0 +1,5 @@ +--- +'@commencis/stylelint-config': minor +--- + +feat: update styled-components config to resolve conflicts with stylistic rules diff --git a/packages/stylelint-config/src/configs/styled.ts b/packages/stylelint-config/src/configs/styled.ts index 88f8d1e..53c0dc7 100644 --- a/packages/stylelint-config/src/configs/styled.ts +++ b/packages/stylelint-config/src/configs/styled.ts @@ -1,15 +1,14 @@ import { StylelintConfig } from '@/types'; -import { styledRules } from '@/rules'; - -import cssConfig from './css'; +import { cssRules, orderRules, styledRules } from '@/rules'; const styledComponentsConfig: StylelintConfig = { - ...cssConfig, + extends: ['stylelint-config-standard'], + plugins: ['stylelint-order'], customSyntax: 'postcss-styled-syntax', - rules: { - ...cssConfig.rules, + ...cssRules, + ...orderRules, ...styledRules, }, }; diff --git a/packages/stylelint-config/src/rules/styledRules.ts b/packages/stylelint-config/src/rules/styledRules.ts index 48fdb83..5768146 100644 --- a/packages/stylelint-config/src/rules/styledRules.ts +++ b/packages/stylelint-config/src/rules/styledRules.ts @@ -19,6 +19,6 @@ export const styledRules = { 'no-empty-source': null, // Disallow vendor prefixes for values 'value-no-vendor-prefix': true, - // Disallow vendor prefixes for properties + // Disallow vendor prefixes for properties 'property-no-vendor-prefix': true, };