mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-05-08 11:22:10 +00:00

This commit brings the project to support node 22 which became LTS and fixes broken builds with typescript 5.7+ until vue-tsc is updated and replaces npm with pnpm. - Update tsconfig for node 22 - Pin typescript to 5.6.x to not break vue-tsc - Replace npm with pnpm (corepack recommended) - Update Makefile and main workflow for pnpm - Migrate to eslint 9 flat config - Fix broken imports - Exclude non-TS vue files for vue-tsc
40 lines
1009 B
JavaScript
40 lines
1009 B
JavaScript
import pluginVue from "eslint-plugin-vue";
|
|
import vueTsEslintConfig from "@vue/eslint-config-typescript";
|
|
import prettierConfig from "@vue/eslint-config-prettier";
|
|
|
|
export default [
|
|
{
|
|
name: "app/files-to-lint",
|
|
files: ["**/*.{ts,mts,tsx,vue}"],
|
|
},
|
|
|
|
{
|
|
name: "app/files-to-ignore",
|
|
ignores: ["**/dist/**", "**/dist-ssr/**", "**/coverage/**"],
|
|
},
|
|
|
|
...pluginVue.configs["flat/essential"],
|
|
...vueTsEslintConfig(),
|
|
prettierConfig,
|
|
|
|
{
|
|
rules: {
|
|
"no-var": "warn",
|
|
"prefer-const": "warn",
|
|
// Note: you must disable the base rule as it can report incorrect errors
|
|
"no-unused-expressions": "off",
|
|
"@typescript-eslint/no-unused-expressions": "warn",
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
"@typescript-eslint/ban-ts-comment": "warn",
|
|
"vue/block-lang": "warn",
|
|
"vue/multi-word-component-names": "off",
|
|
"vue/no-mutating-props": [
|
|
"error",
|
|
{
|
|
shallowOnly: true,
|
|
},
|
|
],
|
|
},
|
|
},
|
|
];
|