1
1
import { readableMultilineString } from 'src/utils/string' ;
2
+ import { prettierMutation } from '../stylelint.utils' ;
2
3
import { Config } from './config.interface' ;
3
4
4
- const stylelintConfig = readableMultilineString `
5
- {
6
- "extends": [
7
- "stylelint-config-standard",
8
- "stylelint-config-rational-order-fix"
9
- ],
10
- "plugins": [
11
- "stylelint-order",
12
- "stylelint-config-rational-order-fix/plugin"
5
+ const stylelintConfig : Config [ 'stylelintConfig' ] = {
6
+ extends : [ 'stylelint-config-standard' , 'stylelint-config-rational-order-fix' ] ,
7
+ plugins : [ 'stylelint-order' , 'stylelint-config-rational-order-fix/plugin' ] ,
8
+ rules : {
9
+ 'declaration-empty-line-before' : null ,
10
+ 'no-empty-first-line' : null ,
11
+ 'order/properties-order' : [ ] ,
12
+ 'plugin/rational-order' : [
13
+ true ,
14
+ {
15
+ 'border-in-box-model' : false ,
16
+ 'empty-line-between-groups' : false ,
17
+ } ,
13
18
] ,
14
- "rules": {
15
- "declaration-empty-line-before": null,
16
- "no-empty-first-line": null,
17
- "order/properties-order": [],
18
- "plugin/rational-order": [true, {
19
- "border-in-box-model": false,
20
- "empty-line-between-groups": false
21
- }]
19
+ } ,
20
+ overrides : [
21
+ {
22
+ files : [ '**/*.{js,jsx,ts,tsx}' ] ,
23
+ customSyntax : '@stylelint/postcss-css-in-js' ,
22
24
} ,
23
- "overrides": [
24
- {
25
- "files": ["**/*.{js,jsx,ts,tsx}"],
26
- "customSyntax": "@stylelint/postcss-css-in-js"
27
- }
28
- ]
29
- }
30
- ` ;
25
+ ] ,
26
+ } ;
31
27
32
28
const stylelintIgnore = readableMultilineString `
33
29
node_modules
@@ -50,4 +46,5 @@ export const reactTsConfig: Config = {
50
46
{ name : 'csslint' , script : 'stylelint "src/**/*.{css,js,jsx,ts,tsx}"' } ,
51
47
{ name : 'csslint:fix' , script : 'stylelint "src/**/*.{css,js,jsx,ts,tsx}" --fix' } ,
52
48
] ,
49
+ mutations : [ prettierMutation ] ,
53
50
} ;
0 commit comments