-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstylelint.config.js
41 lines (39 loc) · 1.04 KB
/
stylelint.config.js
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
const argv = require('yargs').argv;
const glob = argv['_'] && argv['_'][0];
const isJsxFile = glob && /.{jsx,tsx}/.test(glob);
if (isJsxFile) {
module.exports = {
extends: [
'stylelint-config-standard',
'stylelint-config-styled-components',
'./node_modules/prettier-stylelint/config.js',
],
plugins: ['stylelint-order'],
processors: ['stylelint-processor-styled-components'],
rules: {
'declaration-empty-line-before': 'never',
'indentation': 2,
'no-missing-end-of-source-newline': null,
'string-quotes': 'single',
'order/properties-alphabetical-order': true
}
};
}
module.exports = {
extends: [
'stylelint-config-standard',
'./node_modules/prettier-stylelint/config.js'
],
ignoreFiles: [
'**/node_modules/**',
'src/styles/**'
],
plugins: ['stylelint-order'],
rules: {
'declaration-empty-line-before': 'never',
'indentation': 2,
'no-missing-end-of-source-newline': null,
'string-quotes': 'single',
'order/properties-alphabetical-order': true
},
};