eslint/rules/browser
Browser: the mode of a project's sources (a library, an application), after rules/node: browser globals, no Node module, imports of a neighbour or a folder without extension, devDependencies only in the files never shipped (specs, stories), no console output left behind.
7 rules, 7 on. Source: lint/eslint/rules/browser.mjs.
| Rule | Setting | Files | What it checks | Why |
|---|---|---|---|---|
import-x/no-anonymous-default-export | warn | src/**/*.ts | — | Warn: an anonymous default export has no name to search for; a tool may still require it. |
import-x/no-default-export | warn | src/**/*.ts | — | Warn: named exports are easier to search and rename; a framework may still require a default export. |
import-x/extensions | error, ["never",{"ignorePackages":true,"checkTypeImports":true}] | src/**/*.ts | — | Custom: no extension in relative imports (./format-count): the bundler resolves it. |
import-x/no-extraneous-dependencies | error, {"devDependencies":["**/*.spec.ts"],"optionalDependencies… | src/**/*.ts | — | Custom: devDependencies only in the files never shipped. |
import-x/no-nodejs-modules | error | src/**/*.ts | — | Custom: the sources run in the browser. |
local/import-folders | error, {"mode":"require"} | src/**/*.ts | — | Custom: a relative import names a neighbour file or a folder (its index.ts), never a file of another folder. |
no-console | warn | src/**/*.ts | Disallow the use of console | Warn: a debug trace left behind; a justified log (an error report) may stay. |