export default {
    extends: [
        'stylelint-config-standard',
        'stylelint-config-standard-scss',
        'stylelint-config-recommended-less',
    ],
    plugins: ['stylelint-order'],
    ignoreFiles: ['dist/**/*', 'public/**/*', '**/node_modules/**/*'],
    rules: {
        'selector-class-pattern': null,
        'selector-pseudo-class-no-unknown': [
            true,
            {
                ignorePseudoClasses: ['global'],
            },
        ],
        'selector-pseudo-element-no-unknown': [
            true,
            {
                ignorePseudoElements: ['v-deep', 'v-slotted', 'v-global'],
            },
        ],
        'at-rule-no-unknown': null,
        'scss/at-rule-no-unknown': [
            true,
            {
                ignoreAtRules: [
                    'tailwind',
                    'apply',
                    'variants',
                    'responsive',
                    'screen',
                    'function',
                    'if',
                    'each',
                    'include',
                    'mixin',
                    'layer',
                ],
            },
        ],
        'no-empty-source': null,
        'string-quotes': null,
        'named-grid-areas-no-invalid': null,
        'no-descending-specificity': null,
        'font-family-no-missing-generic-family-keyword': null,
        'rule-empty-line-before': [
            'always',
            {
                ignore: ['after-comment', 'first-nested'],
            },
        ],
        'unit-no-unknown': [true, { ignoreUnits: ['rpx'] }],
        'order/order': [
            [
                'dollar-variables',
                'custom-properties',
                'at-rules',
                'declarations',
                {
                    type: 'at-rule',
                    name: 'supports',
                },
                {
                    type: 'at-rule',
                    name: 'media',
                },
                'rules',
            ],
            { severity: 'warning' },
        ],
        'color-function-notation': null,
        'alpha-value-notation': null,
        'scss/dollar-variable-colon-space-after': null,
        'scss/dollar-variable-empty-line-before': null,
        'less/color-no-invalid-hex': null,
    },
    overrides: [
        {
            files: ['*.less', '**/*.less'],
            customSyntax: 'postcss-less',
            rules: {
                'at-rule-no-unknown': null,
            },
        },
        {
            files: ['*.scss', '**/*.scss'],
            customSyntax: 'postcss-scss',
            rules: {
                'at-rule-no-unknown': null,
            },
        },
        {
            files: ['*.vue', '**/*.vue'],
            customSyntax: 'postcss-html',
        },
    ],
};
