eslint.config.mjs 1.18 KB
// @ts-check
import withNuxt from "./.nuxt/eslint.config.mjs";
import js from "@eslint/js";
import eslintPluginVue from "eslint-plugin-vue";
import ts from "typescript-eslint";

export default withNuxt(
  // Your custom configs here
  js.configs.recommended,
  ...ts.configs.recommended,
  ...eslintPluginVue.configs["flat/recommended"],
  {
    files: ["*.vue", "**/*.vue"],
    languageOptions: {
      parserOptions: {
        parser: "@typescript-eslint/parser",
      },
    },
    rules: {
      "vue/multi-word-component-names": "off",
    },
  },
  // your custom flat configs go here, for example:
  // {
  //   files: ['**/*.ts', '**/*.tsx'],
  //   rules: {
  //     'no-console': 'off' // allow console.log in TypeScript files
  //   }
  // },
  // {
  //   ...
  // }
);

// S'inspirer de ça :
//
// export default ts.config(
//   js.configs.recommended,
//   ...ts.configs.recommended,
//   ...eslintPluginVue.configs['flat/recommended'],
//   {
//     files: ['*.vue', '**/*.vue'],
//     languageOptions: {
//       parserOptions: {
//         parser: '@typescript-eslint/parser'
//       }
//     },
//     rules: {
//       'vue/multi-word-component-names': 'off'
//     }
//   }
// )