mirror of
https://github.com/enso-org/enso.git
synced 2024-12-22 15:51:40 +03:00
6881bc844e
When using `npm run lint`, there are a lot of warnings for the last couple of weeks, and it is really annoying because I keep skipping important warnings for my files.
56 lines
1.4 KiB
JavaScript
56 lines
1.4 KiB
JavaScript
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 = [
|
|
{
|
|
ignores: ['rust-ffi/pkg', 'rust-ffi/node-pkg', 'dist', 'shared/ast/generated', 'templates'],
|
|
},
|
|
...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',
|
|
project: [
|
|
'./tsconfig.app.json',
|
|
'./tsconfig.node.json',
|
|
'./tsconfig.server.json',
|
|
'./tsconfig.app.vitest.json',
|
|
'./tsconfig.server.vitest.json',
|
|
'./tsconfig.story.json',
|
|
],
|
|
},
|
|
},
|
|
rules: {
|
|
camelcase: [1, { ignoreImports: true }],
|
|
'no-inner-declarations': 0,
|
|
'vue/attribute-hyphenation': [2, 'never'],
|
|
'vue/v-on-event-hyphenation': [2, 'never'],
|
|
'@typescript-eslint/no-unused-vars': [
|
|
1,
|
|
{
|
|
varsIgnorePattern: '^_',
|
|
argsIgnorePattern: '^_',
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
files: ['stories/*.vue'],
|
|
rules: {
|
|
'vue/multi-word-component-names': 0,
|
|
},
|
|
},
|
|
]
|
|
|
|
export default conf
|