2023-09-22 06:43:25 +03:00
|
|
|
import { FlatCompat } from '@eslint/eslintrc'
|
|
|
|
import eslintJs from '@eslint/js'
|
|
|
|
import * as path from 'node:path'
|
|
|
|
import * as url from 'node:url'
|
|
|
|
|
|
|
|
const compat = new FlatCompat()
|
|
|
|
|
|
|
|
const DIR_NAME = path.dirname(url.fileURLToPath(import.meta.url))
|
|
|
|
|
|
|
|
const conf = [
|
|
|
|
{
|
2024-02-02 12:22:18 +03:00
|
|
|
ignores: ['rust-ffi/pkg', 'rust-ffi/node-pkg', 'dist', 'src/generated', 'templates'],
|
2023-09-22 06:43:25 +03:00
|
|
|
},
|
|
|
|
...compat.extends('plugin:vue/vue3-recommended'),
|
|
|
|
eslintJs.configs.recommended,
|
|
|
|
...compat.extends('@vue/eslint-config-typescript', '@vue/eslint-config-prettier'),
|
|
|
|
{
|
|
|
|
// files: ['{**,src}/*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts}'],
|
|
|
|
languageOptions: {
|
|
|
|
parserOptions: {
|
|
|
|
tsconfigRootDir: DIR_NAME,
|
|
|
|
ecmaVersion: 'latest',
|
2023-10-04 13:53:54 +03:00
|
|
|
project: [
|
|
|
|
'./tsconfig.app.json',
|
|
|
|
'./tsconfig.node.json',
|
|
|
|
'./tsconfig.server.json',
|
|
|
|
'./tsconfig.app.vitest.json',
|
|
|
|
'./tsconfig.server.vitest.json',
|
2023-10-29 22:02:07 +03:00
|
|
|
'./tsconfig.story.json',
|
2023-10-04 13:53:54 +03:00
|
|
|
],
|
2023-09-22 06:43:25 +03:00
|
|
|
},
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
camelcase: [1, { ignoreImports: true }],
|
|
|
|
'no-inner-declarations': 0,
|
2023-10-07 23:57:47 +03:00
|
|
|
'vue/attribute-hyphenation': [2, 'never'],
|
2023-09-22 06:43:25 +03:00
|
|
|
'vue/v-on-event-hyphenation': [2, 'never'],
|
|
|
|
'@typescript-eslint/no-unused-vars': [
|
|
|
|
1,
|
|
|
|
{
|
|
|
|
varsIgnorePattern: '^_',
|
|
|
|
argsIgnorePattern: '^_',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2023-10-29 22:02:07 +03:00
|
|
|
{
|
|
|
|
files: ['stories/*.vue'],
|
|
|
|
rules: {
|
|
|
|
'vue/multi-word-component-names': 0,
|
|
|
|
},
|
|
|
|
},
|
2023-09-22 06:43:25 +03:00
|
|
|
]
|
|
|
|
|
|
|
|
export default conf
|