All files / packages/sds-stylelint-config/src stylelint.config.ts

0% Statements 0/1
100% Branches 0/0
100% Functions 0/0
0% Lines 0/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24                                               
import path from 'node:path';
import { fileURLToPath } from 'node:url';
 
const __dirname = path.dirname(fileURLToPath(import.meta.url));
 
export default {
  extends: ['stylelint-config-standard'],
  ignoreFiles: ['node_modules', '**/*.md', '__mocks__/*.css'],
  defaultSeverity: 'warning' as const,
  plugins: [
    path.resolve(__dirname, 'plugins/design-token-pattern.js'),
    path.resolve(__dirname, 'plugins/design-token-global-pattern.js'),
    path.resolve(__dirname, 'plugins/design-token-reference-pattern.js'),
    path.resolve(__dirname, 'plugins/design-token-deprecated.js'),
  ],
  rules: {
    'sds-stylelint-plugin/design-token-pattern': [null],
    'sds-stylelint-plugin/design-token-global-pattern': [true],
    'sds-stylelint-plugin/design-token-reference-pattern': [true],
    'sds-stylelint-plugin/design-token-deprecated': [true, { severity: 'warning' }],
    'selector-type-no-unknown': [true, { ignore: ['custom-elements'] }],
  },
};