Last active
November 22, 2019 03:18
-
-
Save sigwyg/d4c3ef520f3cbcd32b101d7135fd82f3 to your computer and use it in GitHub Desktop.
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
module.exports = { | |
extends: [ | |
'eslint:recommended', | |
'@nuxtjs/eslint-config-typescript', | |
'plugin:vue/recommended', | |
'plugin:nuxt/recommended', | |
'plugin:prettier/recommended', | |
'prettier/vue', | |
], | |
plugins: ['vue'], | |
rules: { | |
'no-console': 'off', | |
'prettier/prettier': ['warn'], | |
'vue/max-attributes-per-line': [ | |
'warn', | |
{ | |
singleline: 3, | |
multiline: { | |
max: 1, | |
allowFirstLine: false, | |
}, | |
}, | |
], | |
}, | |
} |
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
module.exports = { | |
semi: false, | |
singleQuote: true, | |
trailingComma: 'all', | |
printWidth: 100, | |
tabWidth: 2, | |
overrides: [ | |
{ | |
files: ['*.html', '*.css', '*.scss'], | |
options: { | |
tabWidth: 4, | |
}, | |
}, | |
{ | |
files: ['*.vue'], | |
options: { | |
parser: 'vue', | |
}, | |
}, | |
], | |
} |
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
{ | |
"extends": [ | |
"stylelint-config-standard", | |
], | |
"rules": { | |
"indentation": 2 | |
} | |
} |
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
{ | |
"editor.formatOnSave": true, | |
"[vue]": { | |
"editor.defaultFormatter": "octref.vetur", | |
}, | |
"vetur.validation.template": false, | |
"vetur.format.defaultFormatter.scss": "prettier", | |
"vetur.format.defaultFormatter.css": "none", | |
"vetur.format.defaultFormatter.js": "prettier", | |
"vetur.format.defaultFormatter.html": "js-beautify-html", | |
"vetur.format.defaultFormatterOptions": { | |
"js-beautify-html": { | |
"wrap_attributes": "auto" | |
} | |
}, | |
"eslint.validate": [ | |
"javascript", | |
"javascriptreact", | |
{ | |
"language": "vue", | |
"autoFix": true | |
} | |
], | |
"eslint.enable": true, | |
"eslint.alwaysShowStatus": true, | |
"eslint.autoFixOnSave": false, | |
"stylelint.enable": true, | |
"stylelint.autoFixOnSave": true, | |
} |
Stylelintのindentationと、PrettierのtabWidthを切り分けることには失敗。
CSS/SCSSのインデントだけ4とかできなかったので、Vueプロジェクトではインデント固定での運用となる(今後の課題)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
npm i -D eslint-config-prettier eslint-plugin-prettier prettier
VSCode拡張機能いれたやつ
Required:
Optional: