|
| 1 | +module.exports = { |
| 2 | + root: true, |
| 3 | + env: { |
| 4 | + browser: true, |
| 5 | + es6: true, |
| 6 | + node: true, |
| 7 | + jest: true |
| 8 | + }, |
| 9 | + globals: { |
| 10 | + t: false, |
| 11 | + n: false, |
| 12 | + OC: false, |
| 13 | + OCA: false |
| 14 | + }, |
| 15 | + parserOptions: { |
| 16 | + parser: 'babel-eslint' |
| 17 | + }, |
| 18 | + extends: [ |
| 19 | + 'eslint:recommended', |
| 20 | + 'plugin:node/recommended', |
| 21 | + 'plugin:vue/recommended', |
| 22 | + 'standard' |
| 23 | + ], |
| 24 | + plugins: ['vue', 'node'], |
| 25 | + rules: { |
| 26 | + // space before function () |
| 27 | + 'space-before-function-paren': ['error', 'never'], |
| 28 | + // curly braces always space |
| 29 | + 'object-curly-spacing': ['error', 'always'], |
| 30 | + // stay consistent with array brackets |
| 31 | + 'array-bracket-newline': ['error', 'consistent'], |
| 32 | + // 1tbs brace style |
| 33 | + 'brace-style': 'error', |
| 34 | + // tabs only |
| 35 | + indent: ['error', 'tab'], |
| 36 | + 'no-tabs': 0, |
| 37 | + 'vue/html-indent': ['error', 'tab'], |
| 38 | + // only debug console |
| 39 | + 'no-console': ['error', { 'allow': ['error', 'warn', 'debug'] }], |
| 40 | + // classes blocks |
| 41 | + 'padded-blocks': ['error', { 'classes': 'always' }], |
| 42 | + // es6 import/export and require |
| 43 | + 'node/no-unpublished-require': ['off'], |
| 44 | + 'node/no-unsupported-features': ['off'], |
| 45 | + // space before self-closing elements |
| 46 | + 'vue/html-closing-bracket-spacing': 'error', |
| 47 | + // code spacing with attributes |
| 48 | + 'vue/max-attributes-per-line': [ |
| 49 | + 'error', |
| 50 | + { |
| 51 | + singleline: 3, |
| 52 | + multiline: { |
| 53 | + max: 3, |
| 54 | + allowFirstLine: true |
| 55 | + } |
| 56 | + } |
| 57 | + ] |
| 58 | + } |
| 59 | +}; |
0 commit comments