Skip to content

Commit

Permalink
upgrade eslint to flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
Kr0nox committed Dec 1, 2024
1 parent 862f483 commit 638c125
Show file tree
Hide file tree
Showing 6 changed files with 454 additions and 419 deletions.
35 changes: 0 additions & 35 deletions report-viewer/.eslintrc.cjs

This file was deleted.

53 changes: 53 additions & 0 deletions report-viewer/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import pluginVue from 'eslint-plugin-vue'
import js from '@eslint/js'
import tseslint from 'typescript-eslint';
import vueParser from 'vue-eslint-parser'
import eslintConfigPrettier from "eslint-config-prettier";
//import vueTypescript from '@vue/eslint-config-typescript'
//import vueSkipFormatting, { ignores } from '@vue/eslint-config-prettier/skip-formatting'
//import vue3Essential from 'eslint-plugin-vue/lib/configs/vue3-essential.js'

export default [
js.configs.recommended,
...pluginVue.configs['flat/recommended'],
...tseslint.configs.recommended,
eslintConfigPrettier,
{
ignores: ['**/*.config.ts', 'node_modules/**' , 'dist/**', '**/playwright-report/**'],
},
{
files: ['**/*.js', '**/*.ts', '**/*.tsx', '**/*.vue'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parser: vueParser,
parserOptions: {
parser: tseslint.parser
}
},
rules: {
'no-console': ['error', { allow: ['warn', 'error', 'info'] }],
'no-restricted-exports': ['error', { restrictDefaultExports: { direct: true } }],
'vue/no-setup-props-reactivity-loss': 'error',
},
},
{
files: ['**/*.config.ts', '**/*.config.js', '**/*.d.ts'],
rules: {
'no-restricted-exports': 'off',
},
},
{
files: ['**/*.test.ts'],
rules: {
'@typescript-eslint/no-unused-expressions': 'off'
}
},
{
files: ['**/*.html'],
rules: {
'vue/comment-directive': 'off',
},
},

]
Loading

0 comments on commit 638c125

Please sign in to comment.