Repository navigation
Expand file tree
/
Copy pathstylelint.config.cjs
More file actions
54 lines (54 loc) · 1.7 KB
/
Copy pathstylelint.config.cjs
File metadata and controls
54 lines (54 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
* Stylelint config for the monorepo's SCSS: the WordPress SCSS preset (with
* stylistic rules) plus the relaxations that the existing code relies on.
*/
module.exports = {
extends: '@wordpress/stylelint-config/scss-stylistic',
plugins: [ '@wordpress/theme/stylelint-plugins/no-token-fallback-values' ],
reportNeedlessDisables: true,
ignoreFiles: [
'docs/**',
'packages/php/**',
'plugins/woocommerce-beta-tester/**',
'plugins/woocommerce/tests/**',
],
rules: {
'no-descending-specificity': null,
'no-duplicate-selectors': null,
'selector-class-pattern': null,
'at-rule-empty-line-before': null,
'comment-empty-line-before': null,
'font-weight-notation': null,
'rule-empty-line-before': null,
'value-keyword-case': null,
'@stylistic/declaration-colon-newline-after': null,
'@stylistic/function-parentheses-space-inside': null,
'@stylistic/indentation': null,
'@stylistic/max-line-length': null,
// TODO: fix these rules. They were added to the preset after most of
// the existing SCSS was written.
'scss/load-partial-extension': null,
'scss/load-no-partial-leading-underscore': null,
'scss/no-global-function-names': null,
'scss/selector-no-redundant-nesting-selector': null,
'selector-id-pattern': null,
'length-zero-no-unit': [ true, { ignoreFunctions: [ 'calc', 'var' ] } ],
'plugin-wpds/no-token-fallback-values': true,
},
overrides: [
{
// CSS modules use `:global`/`:local` and the `composes` property.
files: [ '**/*.module.css' ],
rules: {
'selector-pseudo-class-no-unknown': [
true,
{ ignorePseudoClasses: [ 'global', 'local' ] },
],
'property-no-unknown': [
true,
{ ignoreProperties: [ 'composes' ] },
],
},
},
],
};