eslint and stylelint config
eslint:
module.exports = {
root: true,
env: {
browser: true,
es6: true,
node: true
},
extends: [
'plugin:vue/recommended',
'@vue/standard'
],
parserOptions: {
parser: 'babel-eslint'
},
rules: {
'import/order': 2,
'no-var': 2,
'prefer-const': 0,
'no-console': 1,
'no-debugger': 1,
'standard/no-callback-literal': 0,
indent: 2,
'vue/singleline-html-element-content-newline': 0,
'vue/max-attributes-per-line': [2, {
singleline: 2,
multiline: {
max: 1,
allowFirstLine: false
}
}],
'vue/script-indent': [2, 2, {
baseIndent: 1,
switchCase: 1
}],
'vue/order-in-components': 1,
'vue/html-closing-bracket-newline': [2, {
singleline: 'never',
multiline: 'always'
}]
},
overrides: [{ files: ['*.vue'], rules: { indent: 'off' } }]
}
stylelint:
module.exports = {
extends: ['stylelint-config-standard'],
plugins: ['stylelint-order'],
rules: {
'order/order': [
'custom-properties',
'declarations'
],
'order/properties-alphabetical-order': true
}
}
package.json:
"@vue/cli-plugin-babel": "~4.3.0", "@vue/cli-plugin-eslint": "~4.3.0", "@vue/cli-service": "~4.3.0", "@vue/eslint-config-standard": "^5.1.2", "babel-eslint": "^10.1.0", "eslint": "^7.0.0", "eslint-plugin-import": "^2.20.2", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^4.2.1", "eslint-plugin-standard": "^4.0.1", "eslint-plugin-vue": "^6.2.2", "less-loader": "^6.1.0", "stylelint": "^13.5.0", "stylelint-order": "^4.0.0", "stylelint-config-standard": "^20.0.0", "vue-template-compiler": "^2.6.11"