123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- import globals from 'globals'
- import pluginJs from '@eslint/js'
- import pluginVue from 'eslint-plugin-vue'
- import prettier from 'eslint-plugin-prettier'
- import eslintConfigPrettier from 'eslint-config-prettier'
- export default [
- { ignores: ['node_modules', 'dist'] },
- { files: ['**/*.{js,mjs,cjs,vue}'] },
- { languageOptions: { globals: { ...globals.browser, ...globals.node } } },
- pluginJs.configs.recommended,
- ...pluginVue.configs['flat/essential'],
- ...pluginVue.configs['flat/strongly-recommended'],
- eslintConfigPrettier,
- {
- plugins: {
- prettier
- },
- rules: {
-
- 'prettier/prettier': [
- 'error',
- {
- singleAttributePerLine: false,
- htmlWhitespaceSensitivity: 'ignore'
- }
- ],
-
- 'no-console': ['warn', { allow: ['warn', 'error'] }],
- semi: 'off',
- 'no-var': 'error',
- 'prefer-const': 'error',
- 'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
-
- 'vue/multi-word-component-names': 'off',
- 'vue/no-v-html': 'warn',
- 'vue/require-default-prop': 'error',
-
- 'vue/no-async-in-computed-properties': 'error',
- 'vue/no-side-effects-in-computed-properties': 'error',
-
- 'vue/html-indent': ['error', 2],
- 'vue/html-closing-bracket-newline': [
- 'error',
- {
-
- singleline: 'never',
- multiline: 'always'
- }
- ]
- }
- }
- ]
|