mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00

this is already used across codebase: using "_" as placeholder for deliberately unused vars (e.g. when destructuring arrays)
44 lines
1.1 KiB
JavaScript
44 lines
1.1 KiB
JavaScript
import eslint from "@eslint/js";
|
|
import tseslint from "typescript-eslint";
|
|
|
|
export default tseslint.config(
|
|
eslint.configs.recommended,
|
|
tseslint.configs.recommended,
|
|
// consider using rules below, once we have a full TS codebase and can be more strict
|
|
// tseslint.configs.strictTypeChecked,
|
|
// tseslint.configs.stylisticTypeChecked,
|
|
// tseslint.configs.recommendedTypeChecked,
|
|
{
|
|
languageOptions: {
|
|
parserOptions: {
|
|
projectService: true,
|
|
tsconfigRootDir: import.meta.dirname
|
|
}
|
|
}
|
|
},
|
|
{
|
|
rules: {
|
|
// add rule overrides here
|
|
"no-undef": "off",
|
|
"no-unused-vars": "off",
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"error",
|
|
{
|
|
"argsIgnorePattern": "^_",
|
|
"varsIgnorePattern": "^_",
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
ignores: [
|
|
"build/*",
|
|
"dist/*",
|
|
"docs/*",
|
|
"libraries/*",
|
|
"src/public/app-dist/*",
|
|
"src/public/app/doc_notes/*"
|
|
]
|
|
}
|
|
);
|