Skip to content

Commit

Permalink
eslint: use flat config format instead of legacy wrapper for @vue/esl…
Browse files Browse the repository at this point in the history
…int-config-prettier

They now support (only) the flat config format.
They also include eslint-plugin-prettier/recommended.
  • Loading branch information
BacLuc committed Jan 3, 2025
1 parent 38bb5fc commit 55c40a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 5 additions & 3 deletions frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import vueEslintConfigPrettier from '@vue/eslint-config-prettier'

import { includeIgnoreFile } from '@eslint/compat'
import localRules from 'eslint-plugin-local-rules'
import globals from 'globals'
Expand All @@ -19,16 +21,16 @@ export default [
'plugin:vue/recommended',
'plugin:vue/vue3-recommended',
'plugin:vue-scoped-css/vue3-recommended',
'eslint:recommended',
'plugin:prettier/recommended',
'@vue/eslint-config-prettier'
'eslint:recommended'
),
{
ignores: ['data/', 'dist/', 'public/twemoji/'],
},

includeIgnoreFile(gitignorePath),

vueEslintConfigPrettier,

{
plugins: {
'local-rules': localRules,
Expand Down
11 changes: 5 additions & 6 deletions pdf/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import vueEslintConfigPrettier from '@vue/eslint-config-prettier'

import { includeIgnoreFile } from '@eslint/compat'
import localRules from 'eslint-plugin-local-rules'
import globals from 'globals'
Expand All @@ -16,18 +18,15 @@ const compat = new FlatCompat({
const gitignorePath = path.resolve(__dirname, '.gitignore')

export default [
...compat.extends(
'plugin:vue/vue3-recommended',
'eslint:recommended',
'plugin:prettier/recommended',
'@vue/eslint-config-prettier'
),
...compat.extends('plugin:vue/vue3-recommended', 'eslint:recommended'),
{
ignores: ['dist/*.mjs'],
},

includeIgnoreFile(gitignorePath),

vueEslintConfigPrettier,

{
plugins: {
'local-rules': localRules,
Expand Down

0 comments on commit 55c40a3

Please sign in to comment.