xref: /openbmc/webui-vue/.eslintrc.js (revision 7d6b44cb)
1module.exports = {
2  root: true,
3  env: {
4    node: true,
5  },
6  extends: [
7    'plugin:vue/vue3-recommended',
8    'eslint:recommended',
9    '@vue/prettier',
10  ],
11  rules: {
12    'no-console': 'off',
13    'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
14    'prettier/prettier': [
15      'error',
16      {
17        singleQuote: true,
18        trailingComma: 'all',
19      },
20    ],
21    'vue/component-name-in-template-casing': ['error', 'kebab-case'],
22    'vue/multi-word-component-names': 'off',
23    'vue/no-deprecated-filter': 'off',
24    'vue/no-useless-template-attributes': 'off',
25    'vue/no-deprecated-props-default-this': 'off',
26  },
27  parser: 'vue-eslint-parser',
28  overrides: [
29    {
30      files: [
31        '**/__tests__/*.{j,t}s?(x)',
32        '**/tests/unit/**/*.spec.{j,t}s?(x)',
33      ],
34      env: {
35        jest: true,
36      },
37    },
38  ],
39};
40