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