44 lines
1.4 KiB
JavaScript
44 lines
1.4 KiB
JavaScript
import eslint from '@eslint/js';
|
|
import eslintPluginVue from 'eslint-plugin-vue';
|
|
import typescriptEslint from 'typescript-eslint';
|
|
import globals from 'globals';
|
|
|
|
export default typescriptEslint.config(
|
|
{ ignores: ['*.d.ts', '**/coverage', '**/dist'] },
|
|
{
|
|
extends: [
|
|
eslint.configs.recommended,
|
|
...typescriptEslint.configs.recommended,
|
|
...eslintPluginVue.configs['flat/recommended'],
|
|
],
|
|
files: ['**/*.{ts,vue}'],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
globals: globals.browser,
|
|
parserOptions: {
|
|
parser: typescriptEslint.parser,
|
|
},
|
|
},
|
|
rules: {
|
|
'indent': ['error', 4],
|
|
'vue/html-indent': ['error', 4],
|
|
'linebreak-style': ['error', 'unix'],
|
|
'quotes': ['error', 'single'],
|
|
'semi': ['error', 'always'],
|
|
'vue/no-reserved-component-names': 'off',
|
|
'vue/multi-word-component-names': 'off',
|
|
'vue/max-attributes-per-line': 'off',
|
|
'vue/singleline-html-element-content-newline': 'off',
|
|
"vue/first-attribute-linebreak": ["error", {
|
|
"singleline": "beside",
|
|
"multiline": "beside"
|
|
}],
|
|
'vue/no-undef-properties': ['error', {
|
|
'ignores': ['/^\\$/']
|
|
}]
|
|
},
|
|
},
|
|
);
|
|
|