trilium/eslint.config.mjs
2025-08-25 18:42:07 +03:00

60 lines
1.5 KiB
JavaScript

import nx from "@nx/eslint-plugin";
import reactHooks from "eslint-plugin-react-hooks";
export default [
...nx.configs["flat/base"],
...nx.configs["flat/typescript"],
...nx.configs["flat/javascript"],
{
files: ['**/*.{ts,tsx}'],
plugins: { 'react-hooks': reactHooks },
rules: {
'react-hooks/rules-of-hooks': 'error',
}
},
{
"ignores": [
"**/dist",
"**/vite.config.*.timestamp*",
"**/vitest.config.*.timestamp*"
]
},
{
files: [
"**/*.tsx",
],
rules: {
"@nx/enforce-module-boundaries": [
"error",
{
enforceBuildableLibDependency: true,
allow: [
"^.*/eslint(\\.base)?\\.config\\.[cm]?js$"
],
depConstraints: [
{
sourceTag: "*",
onlyDependOnLibsWithTags: [
"*"
]
}
]
}
]
}
},
{
files: [
"**/*.ts",
"**/*.tsx",
"**/*.cts",
"**/*.mts",
"**/*.js",
"**/*.jsx",
"**/*.cjs",
"**/*.mjs"
],
// Override or add rules here
rules: {}
}
];