Skip to content

Instantly share code, notes, and snippets.

@oukayuka
Created March 21, 2020 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oukayuka/6aa5b52c4a4c04de787378d63de29d50 to your computer and use it in GitHub Desktop.
Save oukayuka/6aa5b52c4a4c04de787378d63de29d50 to your computer and use it in GitHub Desktop.
styled-components 用に JSX ファイルを振り分ける設定
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