|
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + browser: true, |
| 4 | + es2021: true, |
| 5 | + node: true, |
| 6 | + }, |
| 7 | + parser: 'vue-eslint-parser', |
| 8 | + overrides: [ |
| 9 | + { |
| 10 | + files: ['src/**/*.{ts,vue}'], |
| 11 | + parserOptions: { |
| 12 | + parser: '@typescript-eslint/parser', |
| 13 | + ecmaVersion: 'latest', |
| 14 | + sourceType: 'module', |
| 15 | + project: './packages/toasts/tsconfig.json', |
| 16 | + }, |
| 17 | + }, |
| 18 | + ], |
| 19 | + settings: { |
| 20 | + 'vue-i18n': { |
| 21 | + localeDir: 'src/localization/**/*.(json|json5)', |
| 22 | + }, |
| 23 | + }, |
| 24 | + extends: [ |
| 25 | + 'eslint:recommended', |
| 26 | + 'plugin:vue/vue3-recommended', |
| 27 | + '@vue/typescript/recommended', |
| 28 | + '@vue/eslint-config-typescript/recommended', |
| 29 | + 'plugin:vue-i18n/recommended', |
| 30 | + '@vue/prettier', |
| 31 | + '@vue/eslint-config-prettier', |
| 32 | + ], |
| 33 | + plugins: ['promise'], |
| 34 | + globals: { |
| 35 | + defineProps: 'readonly', |
| 36 | + defineEmits: 'readonly', |
| 37 | + defineExpose: 'readonly', |
| 38 | + withDefaults: 'readonly', |
| 39 | + }, |
| 40 | + rules: { |
| 41 | + 'prettier/prettier': [ |
| 42 | + 'warn', |
| 43 | + { |
| 44 | + vueIndentScriptAndStyle: false, |
| 45 | + printWidth: 80, |
| 46 | + trailingComma: 'all', |
| 47 | + endOfLine: 'auto', |
| 48 | + tabWidth: 2, |
| 49 | + semi: false, |
| 50 | + singleQuote: true, |
| 51 | + bracketSpacing: true, |
| 52 | + bracketSameLine: false, |
| 53 | + arrowParens: 'avoid', |
| 54 | + }, |
| 55 | + ], |
| 56 | + 'vue-i18n/no-v-html': 'off', |
| 57 | + 'vue-i18n/no-dynamic-keys': 'warn', |
| 58 | + 'vue-i18n/no-missing-keys': 'warn', |
| 59 | + 'vue-i18n/no-unused-keys': [ |
| 60 | + 'error', |
| 61 | + { |
| 62 | + extensions: ['.js', '.ts', '.vue'], |
| 63 | + }, |
| 64 | + ], |
| 65 | + 'vue-i18n/no-raw-text': [ |
| 66 | + 'error', |
| 67 | + { |
| 68 | + ignoreText: ['—', '|', '×'], |
| 69 | + }, |
| 70 | + ], |
| 71 | + 'arrow-parens': 0, |
| 72 | + 'no-debugger': 1, |
| 73 | + 'no-warning-comments': [ |
| 74 | + 1, |
| 75 | + { |
| 76 | + terms: ['hardcoded'], |
| 77 | + location: 'anywhere', |
| 78 | + }, |
| 79 | + ], |
| 80 | + 'no-return-await': 0, |
| 81 | + 'object-curly-spacing': ['error', 'always'], |
| 82 | + 'no-var': 'error', |
| 83 | + 'comma-dangle': [1, 'always-multiline'], |
| 84 | + 'linebreak-style': ['error', 'unix'], |
| 85 | + 'generator-star-spacing': 0, |
| 86 | + 'no-tabs': 2, |
| 87 | + 'max-len': [ |
| 88 | + 1, |
| 89 | + { |
| 90 | + code: 80, |
| 91 | + comments: 80, |
| 92 | + ignoreUrls: true, |
| 93 | + ignoreStrings: true, |
| 94 | + ignoreTemplateLiterals: true, |
| 95 | + ignoreRegExpLiterals: true, |
| 96 | + }, |
| 97 | + ], |
| 98 | + 'no-console': [ |
| 99 | + 1, |
| 100 | + { |
| 101 | + allow: ['warn', 'error'], |
| 102 | + }, |
| 103 | + ], |
| 104 | + quotes: [2, 'single', { avoidEscape: false }], |
| 105 | + 'no-multiple-empty-lines': [2, { max: 1, maxEOF: 0, maxBOF: 0 }], |
| 106 | + semi: [2, 'never'], |
| 107 | + 'vue/multi-word-component-names': 0, |
| 108 | + 'vue/component-definition-name-casing': ['error', 'kebab-case'], |
| 109 | + 'vue/valid-v-for': 2, |
| 110 | + 'vue/attributes-order': 0, |
| 111 | + 'vue/order-in-components': 1, |
| 112 | + 'vue/html-closing-bracket-newline': 0, |
| 113 | + 'vue/attribute-hyphenation': 1, |
| 114 | + 'vue/component-name-in-template-casing': [2, 'kebab-case'], |
| 115 | + 'vue/html-end-tags': 2, |
| 116 | + 'vue/html-quotes': 1, |
| 117 | + 'vue/multiline-html-element-content-newline': 1, |
| 118 | + 'vue/mustache-interpolation-spacing': 1, |
| 119 | + 'vue/no-async-in-computed-properties': 2, |
| 120 | + 'vue/no-use-v-if-with-v-for': 1, |
| 121 | + 'vue/no-dupe-keys': 2, |
| 122 | + 'vue/no-duplicate-attributes': 2, |
| 123 | + 'vue/no-multi-spaces': 1, |
| 124 | + 'vue/no-reserved-keys': 2, |
| 125 | + 'vue/no-shared-component-data': 2, |
| 126 | + 'vue/no-side-effects-in-computed-properties': 2, |
| 127 | + 'vue/no-spaces-around-equal-signs-in-attribute': 2, |
| 128 | + 'vue/no-template-key': 2, |
| 129 | + 'vue/no-textarea-mustache': 2, |
| 130 | + 'vue/no-unused-components': 1, |
| 131 | + 'vue/no-unused-vars': 1, |
| 132 | + 'vue/no-v-html': 1, |
| 133 | + 'vue/prop-name-casing': 2, |
| 134 | + 'vue/require-default-prop': 2, |
| 135 | + 'vue/require-prop-types': 2, |
| 136 | + 'vue/require-valid-default-prop': 2, |
| 137 | + 'vue/this-in-template': 2, |
| 138 | + 'vue/v-bind-style': 2, |
| 139 | + 'vue/v-on-style': 2, |
| 140 | + 'vue/valid-template-root': 2, |
| 141 | + 'vue/valid-v-bind': 2, |
| 142 | + 'vue/valid-v-else-if': 2, |
| 143 | + 'vue/valid-v-else': 2, |
| 144 | + 'vue/valid-v-model': 2, |
| 145 | + 'vue/valid-v-on': 2, |
| 146 | + 'vue/singleline-html-element-content-newline': [ |
| 147 | + 1, |
| 148 | + { |
| 149 | + ignoreWhenNoAttributes: true, |
| 150 | + ignoreWhenEmpty: true, |
| 151 | + ignores: ['pre', 'textarea', 'span'], |
| 152 | + }, |
| 153 | + ], |
| 154 | + 'promise/always-return': 'error', |
| 155 | + 'promise/no-return-wrap': 'error', |
| 156 | + 'promise/param-names': 'error', |
| 157 | + 'promise/catch-or-return': 'error', |
| 158 | + 'promise/no-nesting': 'warn', |
| 159 | + 'promise/no-callback-in-promise': 'warn', |
| 160 | + 'promise/prefer-await-to-then': 'warn', |
| 161 | + '@typescript-eslint/no-non-null-assertion': 'off', |
| 162 | + }, |
| 163 | +} |
0 commit comments