| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- module.exports = {
- extends: [
- 'eslint:recommended',
- 'plugin:vue/recommended'
- ],
- plugins: [
- 'vue'
- ],
- rules: {
- 'no-console': 'off',
- 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
- 'no-unused-vars': 'warn',
- 'vue/attribute-hyphenation': 'error', // enforce attribute naming style on custom components in template
- 'vue/component-definition-name-casing': ['error', 'PascalCase'],
- 'vue/html-closing-bracket-newline': ['error', {
- 'singleline': 'never',
- 'multiline': 'always'
- }],
- 'vue/html-closing-bracket-spacing': ['error', { // require or disallow a space before tag closing brackets
- 'startTag': 'never',
- 'endTag': 'never',
- 'selfClosingTag': 'always'
- }],
- 'vue/html-indent': ['error', 2, { // enforce consistent indentation in <template>
- 'attribute': 1,
- 'baseIndent': 1,
- 'closeBracket': 0,
- 'alignAttributesVertically': true
- }],
- 'vue/max-attributes-per-line': ['error', { // enforce the maximum number of attributes per line
- 'singleline': 3,
- 'multiline': {
- 'max': 1,
- 'allowFirstLine': false
- }
- }],
- 'vue/no-v-html': 'off', // disallow use of v-html to prevent XSS attack
- 'vue/require-default-prop': 'off',
- 'vue/singleline-html-element-content-newline': 'off',
- }
- };
|