Document that package.json aliases may target only direct subfolders of src #21

Merged
temeddix merged 27 commits from alias-targets into main 2026-10-18 14:37:50 +00:00
Showing only changes of commit 934a3cfd03 - Show all commits
+7 -12
View File
@@ -1,8 +1,6 @@
/**
* `project` — lint rules this repository holds its own source to. Deno lint
* ran here with its `recommended` rules and no plugins; the Oxlint categories
* in `vite.config.ts` plus the rule list below keep at least that coverage.
* Its rules of its own are `no-disable-comments` and `no-non-ts-imports`.
* `project` — lint rules this repository holds its own source to, on top of
* the Oxlint categories in `vite.config.ts`. Its rules of its own are `no-disable-comments` and `no-non-ts-imports`.
*
* Loaded by `vite.config.ts` as an Oxlint `jsPlugins` entry.
*
@@ -150,9 +148,8 @@ const noNonTsImportsRule: ProjectRule = {
};
/**
* This repository's own rule list, spread by `vite.config.ts`: Deno's
* `recommended` rules that sit outside the Oxlint categories, plus the
* template's extras. Built-in Oxlint rule ids sit here too, so
* This repository's own rule list, spread by `vite.config.ts`: rules that
* sit outside the Oxlint categories, plus the template's extras. Built-in Oxlint rule ids sit here too, so
* `vite.config.ts` lists no rule by name.
*/
const rules: DummyRuleMap = {
@@ -164,7 +161,7 @@ const rules: DummyRuleMap = {
"^_*[^_]*_*$|^[^a-z]*$",
{ properties: false, classFields: false, onlyDeclarations: false, ignoreDestructuring: true },
],
// Deno's `recommended` rules outside the categories.
// Rules outside the categories.
"no-array-constructor": "error",
"no-case-declarations": "error",
"no-empty": "error",
@@ -189,8 +186,7 @@ const rules: DummyRuleMap = {
"typescript/prefer-as-const": "error",
"typescript/prefer-namespace-keyword": "error",
"typescript/triple-slash-reference": "error",
// Deno's `no-window`, `no-process-global`, and `no-node-globals`: on Node,
// these come from an explicit `node:` import instead of the global scope.
// On Node, these come from an explicit `node:` import instead of the global scope.
"no-restricted-globals": [
"error",
"window",
@@ -205,8 +201,7 @@ const rules: DummyRuleMap = {
"typescript/consistent-type-imports": "error",
"typescript/no-import-type-side-effects": "error",
"typescript/no-non-null-assertion": "error",
// Deno's `ban-untagged-ignore` and `ban-unused-ignore`, made stricter: no
// disable comments at all.
// No disable comments at all.
"project/no-disable-comments": "error",
"project/no-non-ts-imports": "error",
"unicorn/no-abusive-eslint-disable": "error",