module.exports = {
    env: {
        browser: true,
        jest: true
    },
    parserOptions: {
        ecmaVersion: 'latest'
    },
    extends: [
        'eslint-config-airbnb-base',
        'plugin:vue/vue3-recommended',
        'plugin:jsdoc/recommended'
    ],
    rules: {
        'linebreak-style': 'off',
        'vue/component-definition-name-casing': ['warn', 'kebab-case'],
        'vue/require-default-prop': 'off',
        'vue/attribute-hyphenation': ['warn', 'never'],
        'vue/v-on-event-hyphenation': ['warn', 'never'],
        'object-curly-newline': ['error', { consistent: true }],
        'function-paren-newline': ['error', 'multiline'],
        'operator-linebreak': ['error', 'before', { overrides: { '=': 'after' } }],
        'implicit-arrow-linebreak': ['off'],
        'comma-dangle': ['error', 'never'],
        indent: ['error', 4, { SwitchCase: 1 }],
        'max-len': ['error', { code: 160 }],
        'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
        'vue/html-indent': 'off',
        'vue/html-closing-bracket-newline': ['error', {
            singleline: 'never',
            multiline: 'never'
        }],
        'jsdoc/check-tag-names': ['error', {
            definedTags: ['store', 'endpoint', 'category', 'subcategory', 'remarks']
        }],
        'jsdoc/require-jsdoc': 0,
        'vue/html-self-closing': ['error', {
            html: {
                void: 'any',
                normal: 'any',
                component: 'any'
            },
            svg: 'always',
            math: 'always'
        }],
        'import/extensions': ['error', 'always', { js: 'ignorePackages' }],
        'no-param-reassign': ['error', { props: true, ignorePropertyModificationsFor: ['item'] }],
        'no-restricted-syntax': ['off', 'ForOfStatement'],
        'no-return-await': 'off'
    },
    settings: {
        'import/resolver': {
            alias: {
                map: [['@', './src/']],
                extensions: ['.js', '.vue']
            }
        }
    }
};
