Created
March 21, 2020 09:29
-
-
Save oukayuka/6aa5b52c4a4c04de787378d63de29d50 to your computer and use it in GitHub Desktop.
styled-components 用に JSX ファイルを振り分ける設定
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { argv } = require('yargs'); | |
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, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment