eslint-config-complete
Introduction
This is a sharable configuration for ESLint that is intended to be used in TypeScript projects that want to be as safe as possible.
The config is environment-agnostic, meaning that it will work in client-side projects (e.g. React), server-side projects (e.g. Node.js), and so on.
Install
Using complete-lint
This package is part of the complete-lint meta-linting package. It is recommended that instead of consuming eslint-config-complete directly, you instead list complete-lint as a dependency, as that will install both this config and other goodies.
For installation instructions, see the complete-lint page.
Manually
If you do not want to use the complete-lint meta-package, then you can install this config manually:
npm install --save-dev eslint typescript eslint-plugin-complete
(eslint and typescript are peer-dependencies.)
Usage
Here's an example "eslint.config.mjs" file that loads the base config:
// @ts-check
import { completeConfigBase } from "eslint-config-complete";
import { defineConfig } from "eslint/config";
export default defineConfig(...completeConfigBase);
Configs
This package exports two configs:
completeConfigBase- The general-purpose config that people should use for TypeScript projects.completeConfigESLintPlugin- Enables extra rules for custom ESLint plugins fromeslint-plugin-eslint-plugin. (This should only be used in custom ESLint plugins.)
Why Do I Need To Use ESLint?
If you are reading this page, you are likely a user of TypeScript. As you probably know, TypeScript is great because it saves you an enormous amount of time. The hours spent troubleshooting run-time errors caused from small typos have become a thing of the past. Good riddance!
But there are many other code problems that do not have to do with types. For example, ESLint can show you when you forgot to use the await keyword. And it can help show you lines of code that you think are doing something but are not really doing anything. In the same way that you want to use TypeScript to catch as many bugs as possible, you also want to use ESLint with a config that enables lots of good linting rules to catch even more bugs.
ESLint rules can help catch bugs, but they can also help to make your codebase more consistent and adhere to best-practices within the TypeScript ecosystem. Remember that code is read more often than it is written. If you care about your code being the best that it can possibly be, then using ESLint is a must!
Why Do I Need eslint-config-complete?
eslint-config-complete is one of the most comprehensive ESLint configs out there.
Building an ESLint config from scratch takes many, many hours. ESLint has over 250 rules. typescript-eslint has over 125 rules. And that's just the beginning.
Don't bother creating and maintaining a huge ESLint config yourself. We've done the work to:
- Enable every ESLint rule that we can find from trusted sources that provides value.
- Weed out the rules that don't apply to TypeScript codebases (because many ESLint rules were written before TypeScript existed).
- Weed out the rules covered by Prettier (because many ESLint rules were written before Prettier existed).
- Weed out the rules that are too noisy to provide value (and document them below).
Our Config Philosophy
We want to enable as many lint rules as possible, so that we can catch as many bugs as possible. Of course, this is a tradeoff: with more lint rules, we get more false positives. But in general, a few false positives are worth the time saved from investigating and squashing bugs. (More on false positives later.)
In line with this philosophy, our linting config enables nearly all of the recommended rules from both the core ESLint team and the TypeScript ESLint team, as well as some additional rules that catch even more bugs.
This config also assumes that you are using Prettier to format your TypeScript code, which is considered to be best-practice in the ecosystem. Subsequently, all formatting-related rules that conflict with Prettier are disabled. (However, we use a few formatting-related rules that are not handled by Prettier.)
Auto-Fixing
Deploying this ESLint config on an existing codebase can generate a ton of warnings. Fixing them all might seem overwhelming. While some warnings need to be fixed manually, a ton of ESLint rules have "auto-fixers". This means that the code will fix itself if you run ESLint with the --fix flag. So, by running npx eslint --fix . in the root of your project, you can take care of a lot of the warnings automatically.
Additionally, we recommend that you configure your IDE (i.e. Visual Studio Code) to automatically run --fix whenever you save a file.
Dealing with False Positives
Your first reaction to having a bunch of yellow squiggly lines might be to disable any rule that gets in your way. However, even if you think an ESLint warning is superfluous, it is often a sign that your codebase is structured in a bug-prone or non-idiomatic way. Before simply disabling a rule, sometimes it is good to do some research and think carefully if your code can be refactored in some way to be cleaner.
Additionally, some ESLint rules are not about catching bugs, but are about code style and code consistency. If you find the new style to be foreign and weird, it can be tempting to ignore or disable the rule. But before you do that, consider the cost: your codebase will be deviating from others in the TypeScript ecosystem. It is really nice for everyone's code to adhere to the same look and the same standards!
With that said, with so many ESLint rules turned on, you will undoubtedly come across some false positives. You can quickly take care of these by adding a // eslint-disable-next-line insert-rule-name-here comment. And you can automatically add the comment by selecting "Quick Fix" in Visual Studio Code, which is mapped to Ctrl + . by default.
If you find yourself adding a lot of disable comments for a specific rule, then turn the rule off for the entire project by adding an entry for it in your eslint.config.mjs file: like this:
// @ts-check
import { completeConfigBase } from "eslint-config-complete";
import { defineConfig } from "eslint/config";
export default defineConfig(...completeConfigBase, {
rules: {
// We intentionally use number enums to save bandwidth between the client and server. Number
// enums are almost always safe with the `complete/strict-enums` rule.
"@typescript-eslint/prefer-enum-initializers": "off",
},
});
Some rules won't make sense for every project and that's okay!
Red Squigglies & Yellow Squigglies
The legendary Josh Goldberg has an excellent blog explaining why using warnings in ESLint should be avoided. In fact, the ESLint ecosystem has standardized around not using warnings, so this config follows suit.
Furthermore, we especially agree with Josh's opinion on squigglies: red squigglies should be reserved for TypeScript errors (which are often critical bugs that will cause a run-time error) and yellow squigglies should be reserved for ESLint errors (which are often code-quality issues).
If you use Visual Studio Code, you can accomplish this with the following configuration:
"eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }],
Rule List
Below, we provide documentation for every rule that is disabled. (We take a blacklist approach rather than a whitelist approach.)
Core ESLint Rules
| Rule Name | Enabled | Parent Configs | Notes | Source File |
|---|---|---|---|---|
accessor-pairs | ✅ | base-eslint.js | ||
array-callback-return | ✅ | The checkForEach option is enabled to make the rule stricter. | base-eslint.js | |
arrow-body-style | ✅ | base-eslint.js | ||
block-scoped-var | ✅ | base-eslint.js | ||
camelcase | ❌ | Superseded by the @typescript-eslint/naming-convention rule. (camelcase is used to enforce naming conventions.) | base-eslint.js | |
capitalized-comments | ❌ | Superseded by the complete/complete-sentences-jsdoc and complete/complete-sentences-line-comments rules. | base-eslint.js | |
class-methods-use-this | ❌ | Superseded by the @typescript-eslint/class-methods-use-this rule. | base-eslint.js | |
complexity | ❌ | Disabled since cyclomatic complexity is not a good enough general indicator of code complexity and leads to too many false positives. | base-eslint.js | |
consistent-return | ❌ | Superseded by the @typescript-eslint/consistent-return rule. | base-eslint.js | |
consistent-this | ✅ | base-eslint.js | ||
constructor-super | ❌ | Disabled since this is already enforced by TypeScript (ts(2335) & ts(2377)). | base-eslint.js | |
curly | ✅ | Always requiring curly braces can partially ward against Apple-style if statement bugs. Additionally, this rule needs to be set to "all" to work properly with Prettier. | base-eslint.js | |
default-case | ❌ | Disabled since it would cause the @typescript-eslint/switch-exhaustiveness-check rule to not work properly. | base-eslint.js | |
default-case-last | ✅ | base-eslint.js | ||
default-param-last | ❌ | Superseded by the @typescript-eslint/default-param-last rule. | base-eslint.js | |
dot-notation | ❌ | Superseded by the @typescript-eslint/dot-notation rule. | base-eslint.js | |
eqeqeq | ❌ | Superseded by the complete/eqeqeq-fix rule (since we want auto-fix to work properly). | base-eslint.js | |
for-direction | ✅ | base-eslint.js | ||
func-name-matching | ✅ | base-eslint.js | ||
func-names | ✅ | base-eslint.js | ||
func-style | ❌ | Disabled since it is common in the TypeScript ecosystem to use both function forms, depending on the situation. | base-eslint.js | |
getter-return | ❌ | Disabled since this is already enforced by TypeScript (ts(2378)). | base-eslint.js | |
grouped-accessor-pairs | ✅ | base-eslint.js | ||
guard-for-in | ❌ | Superseded by the complete/no-for-in rule. | base-eslint.js | |
id-denylist | ❌ | Disabled since it is expected to be configured with project-specific keywords. | base-eslint.js | |
id-length | ❌ | Disabled because short variable names are understandable in many contexts. | base-eslint.js | |
id-match | ❌ | Superseded by the @typescript-eslint/naming-convention rule. (id-match is used to enforce naming conventions.) | base-eslint.js | |
init-declarations | ❌ | Superseded by the @typescript-eslint/init-declarations rule. | base-eslint.js | |
logical-assignment-operators | ✅ | The enforceForIfStatements option is enabled to make the rule stricter. | base-eslint.js | |
max-classes-per-file | ✅ | base-eslint.js | ||
max-depth | ❌ | Disabled since this rule is too prescriptive for general-purpose use. | base-eslint.js | |
max-lines | ❌ | Disabled because enforcing an arbitrary line threshold for every file in a project does not provide much value. | base-eslint.js | |
max-lines-per-function | ❌ | Disabled because enforcing an arbitrary line threshold for every function in a project does not provide much value. | base-eslint.js | |
max-nested-callbacks | ✅ | base-eslint.js | ||
max-params | ❌ | Superseded by the @typescript-eslint/max-params rule. | base-eslint.js | |
max-statements | ❌ | Disabled because enforcing an arbitrary statement threshold for every function in a project does not provide much value. | base-eslint.js | |
new-cap | ✅ | base-eslint.js | ||
no-alert | ✅ | base-eslint.js | ||
no-array-constructor | ❌ | Superseded by the @typescript-eslint/no-array-constructor rule. | base-eslint.js | |
no-async-promise-executor | ✅ | base-eslint.js | ||
no-await-in-loop | ✅ | base-eslint.js | ||
no-bitwise | ✅ | base-eslint.js | ||
no-caller | ✅ | base-eslint.js | ||
no-case-declarations | ✅ | base-eslint.js | ||
no-class-assign | ✅ | Disabled since this is already enforced by TypeScript (ts(2629)). | base-eslint.js | |
no-compare-neg-zero | ✅ | base-eslint.js | ||
no-cond-assign | ✅ | base-eslint.js | ||
no-console | ❌ | Disabled because command-line programs written in TypeScript commonly write to standard out and standard error. | base-eslint.js | |
no-const-assign | ❌ | Disabled since this is already enforced by TypeScript (ts(2588)). | base-eslint.js | |
no-constant-binary-expression | ✅ | base-eslint.js | ||
no-constant-condition | ✅ | base-eslint.js | ||
no-constructor-return | ✅ | base-eslint.js | ||
no-continue | ❌ | Disabled because proper use of continues can reduce indentation for long blocks of code in the same way as the early return pattern. | base-eslint.js | |
no-control-regex | ✅ | base-eslint.js | ||
no-debugger | ✅ | base-eslint.js | ||
no-delete-var | ✅ | base-eslint.js | ||
no-div-regex | ❌ | Disabled since it is incompatible with the unicorn/better-regex rule. | base-eslint.js | |
no-dupe-args | ❌ | Disabled since this is already enforced by TypeScript (ts(2300)). | base-eslint.js | |
no-dupe-class-members | ❌ | Disabled since this is already enforced by TypeScript (ts(2393) & ts(2300)). | base-eslint.js | |
no-dupe-else-if | ✅ | base-eslint.js | ||
no-dupe-keys | ❌ | Disabled since this is already enforced by TypeScript (ts(1117)). | base-eslint.js | |
no-duplicate-case | ✅ | base-eslint.js | ||
no-duplicate-imports | ❌ | Superseded by the import-x/no-duplicates rule. | base-eslint.js | |
no-else-return | ✅ | The allowElseIf option is disabled to make the rule stricter. | base-eslint.js | |
no-empty | ✅ | base-eslint.js | ||
no-empty-character-class | ✅ | base-eslint.js | ||
no-empty-function | ❌ | Superseded by the @typescript-eslint/no-empty-function rule. | base-eslint.js | |
no-empty-pattern | ✅ | base-eslint.js | ||
no-empty-static-block | ✅ | base-eslint.js | ||
no-eq-null | ✅ | base-eslint.js | ||
no-eval | ✅ | base-eslint.js | ||
no-ex-assign | ✅ | base-eslint.js | ||
no-extend-native | ✅ | base-eslint.js | ||
no-extra-bind | ✅ | base-eslint.js | ||
no-extra-boolean-cast | ✅ | base-eslint.js | ||
no-extra-label | ✅ | base-eslint.js | ||
no-fallthrough | ✅ | base-eslint.js | ||
no-func-assign | ❌ | Disabled since this is already enforced by TypeScript (ts(2630)). | base-eslint.js | |
no-global-assign | ✅ | base-eslint.js | ||
no-implicit-coercion | ✅ | base-eslint.js | ||
no-implicit-globals | ✅ | base-eslint.js | ||
no-implied-eval | ❌ | Superseded by the @typescript-eslint/no-implied-eval rule. | base-eslint.js | |
no-import-assign | ❌ | Disabled since this is already enforced by TypeScript (ts(2632) & ts(2540)). | base-eslint.js | |
no-inline-comments | ❌ | Disabled because inline comments are common in the TypeScript ecosystem. | base-eslint.js | |
no-inner-declarations | ✅ | base-eslint.js | ||
no-invalid-regexp | ✅ | base-eslint.js | ||
no-invalid-this | ❌ | Superseded by the @typescript-eslint/no-invalid-this rule. | base-eslint.js | |
no-irregular-whitespace | ✅ | base-eslint.js | ||
no-iterator | ✅ | base-eslint.js | ||
no-label-var | ✅ | base-eslint.js | ||
no-labels | ✅ | base-eslint.js | ||
no-lone-blocks | ✅ | base-eslint.js | ||
no-lonely-if | ✅ | base-eslint.js | ||
no-loop-func | ❌ | Superseded by the @typescript-eslint/no-loop-func rule. | base-eslint.js | |
no-loss-of-precision | ❌ | Superseded by the @typescript-eslint/no-loss-of-precision rule. | base-eslint.js | |
no-magic-numbers | ❌ | Superseded by the @typescript-eslint/no-magic-numbers rule. | base-eslint.js | |
no-misleading-character-class | ✅ | base-eslint.js | ||
no-multi-assign | ✅ | base-eslint.js | ||
no-multi-str | ✅ | base-eslint.js | ||
no-negated-condition | ❌ | Superseded by the unicorn/no-negated-condition rule. | base-eslint.js | |
no-nested-ternary | ✅ | unicorn/no-nested-ternary is a modified version of this rule but that version is less strict. | base-eslint.js | |
no-new | ✅ | base-eslint.js | ||
no-new-func | ✅ | base-eslint.js | ||
no-new-native-nonconstructor | ❌ | Disabled since this is already enforced by TypeScript (ts(7009)). | base-eslint.js | |
no-new-wrappers | ✅ | base-eslint.js | ||
no-nonoctal-decimal-escape | ✅ | base-eslint.js | ||
no-obj-calls | ❌ | Disabled since this is already enforced by TypeScript (ts(2349)). | base-eslint.js | |
no-object-constructor | ✅ | base-eslint.js | ||
no-octal | ✅ | base-eslint.js | ||
no-octal-escape | ✅ | base-eslint.js | ||
no-param-reassign | ✅ | The options are copied from Airbnb. | base-eslint.js | |
no-plusplus | ❌ | Disabled because the rule is unnecessary when using Prettier. (Unary operators can lead to errors with minified code, but Prettier adds semicolons automatically.) | base-eslint.js | |
no-promise-executor-return | ✅ | base-eslint.js | ||
no-proto | ✅ | base-eslint.js | ||
no-prototype-builtins | ✅ | base-eslint.js | ||
no-redeclare | ❌ | Disabled since this is already enforced by TypeScript (ts(2451)). | base-eslint.js | |
no-regex-spaces | ✅ | base-eslint.js | ||
no-restricted-exports | ✅ | The options are copied from Airbnb. | base-eslint.js | |
no-restricted-globals | ✅ | The options are copied from Airbnb. | base-eslint.js | |
no-restricted-imports | ❌ | Superseded by the @typescript-eslint/no-restricted-imports rule. | base-eslint.js | |
no-restricted-properties | ✅ | The options are copied from Airbnb. | base-eslint.js | |
no-restricted-syntax | ❌ | Disabled because it is intended for disallowing specific language features per-project. | base-eslint.js | |
no-return-assign | ✅ | The always option is provided to make the rule stricter. | base-eslint.js | |
no-script-url | ✅ | base-eslint.js | ||
no-self-assign | ✅ | base-eslint.js | ||
no-self-compare | ✅ | base-eslint.js | ||
no-sequences | ❌ | Disabled because it can conflict with Prettier. | base-eslint.js | |
no-setter-return | ❌ | Disabled since this is already enforced by TypeScript (ts(2408)). | base-eslint.js | |
no-shadow | ❌ | Superseded by the @typescript-eslint/no-shadow rule. | base-eslint.js | |
no-shadow-restricted-names | ✅ | base-eslint.js | ||
no-sparse-arrays | ✅ | base-eslint.js | ||
no-template-curly-in-string | ❌ | Superseded by the complete/eqeqeq-fix rule (since we want auto-fix to work properly). | base-eslint.js | |
no-ternary | ❌ | Disabled because ternaries are common in the TypeScript ecosystem and can often lead to concise code that is easy to read. | base-eslint.js | |
no-this-before-super | ❌ | Disabled since this is already enforced by TypeScript (ts(2376) & ts(17009)). | base-eslint.js | |
no-throw-literal | ❌ | Superseded by the @typescript-eslint/no-throw-literal rule. | base-eslint.js | |
no-unassigned-vars | ✅ | base-eslint.js | ||
no-undef | ❌ | Disabled since this is already enforced by TypeScript (ts(2304) & ts(2552)). | base-eslint.js | |
no-undef-init | ✅ | base-eslint.js | ||
no-undefined | ❌ | Disabled because in TypeScript, it is common to explicitly check for undefined for the purposes of type narrowing. | base-eslint.js | |
no-underscore-dangle | ❌ | Disabled since it is a common pattern to use underscores to temporarily allow unused variables during development. | base-eslint.js | |
no-unexpected-multiline | ❌ | Disabled because this is handled by Prettier. | base-eslint.js | |
no-unmodified-loop-condition | ✅ | base-eslint.js | ||
no-unneeded-ternary | ✅ | The defaultAssignment option is disabled to make the rule stricter. | base-eslint.js | |
no-unreachable | ❌ | Disabled since this is already enforced by TypeScript (ts(7027)). | base-eslint.js | |
no-unreachable-loop | ✅ | base-eslint.js | ||
no-unsafe-finally | ✅ | base-eslint.js | ||
no-unsafe-negation | ❌ | Disabled since this is already enforced by TypeScript (ts(2365) & ts(2322) & ts(2358)). | base-eslint.js | |
no-unsafe-optional-chaining | ✅ | base-eslint.js | ||
no-unused-expressions | ❌ | Superseded by the @typescript-eslint/no-unused-expressions rule. | base-eslint.js | |
no-unused-labels | ✅ | base-eslint.js | ||
no-unused-private-class-members | ✅ | base-eslint.js | ||
no-unused-vars | ❌ | Superseded by the @typescript-eslint/no-unused-vars rule. | base-eslint.js | |
no-use-before-define | ❌ | Superseded by the @typescript-eslint/no-use-before-define rule. | base-eslint.js | |
no-useless-assignment | ✅ | base-eslint.js | ||
no-useless-backreference | ✅ | base-eslint.js | ||
no-useless-call | ✅ | base-eslint.js | ||
no-useless-catch | ✅ | base-eslint.js | ||
no-useless-computed-key | ✅ | The enforceForClassMembers option is enabled to make the rule stricter. | base-eslint.js | |
no-useless-concat | ✅ | base-eslint.js | ||
no-useless-constructor | ❌ | Superseded by the @typescript-eslint/no-useless-constructor rule. | base-eslint.js | |
no-useless-escape | ✅ | base-eslint.js | ||
no-useless-rename | ✅ | base-eslint.js | ||
no-useless-return | ❌ | Superseded by the complete/no-useless-return rule (since the auto-fix is usually unwanted). | base-eslint.js | |
no-var | ✅ | base-eslint.js | ||
no-void | ✅ | base-eslint.js | ||
no-warning-comments | ❌ | Superseded by the unicorn/expiring-todo-comments rule. | base-eslint.js | |
no-with | ❌ | Disabled since this is already enforced by TypeScript (ts(1101) & ts(2410)). | base-eslint.js | |
object-shorthand | ✅ | The ignoreConstructors option is disabled to make the rule stricter. | base-eslint.js | |
one-var | ✅ | The never option is provided to disallow multi-variable declarations (since they can be confusing). | base-eslint.js | |
operator-assignment | ✅ | base-eslint.js | ||
prefer-arrow-callback | ✅ | base-eslint.js | ||
prefer-const | ❌ | Superseded by the complete/prefer-const rule (since the auto-fix is usually unwanted). | base-eslint.js | |
prefer-destructuring | ❌ | Superseded by the @typescript-eslint/prefer-destructuring rule. | base-eslint.js | |
prefer-exponentiation-operator | ✅ | base-eslint.js | ||
prefer-named-capture-group | ❌ | Disabled because it is common to have a regex with only a single match, in which case a named capture group can be needlessly verbose (and cause extra type narrowing). | base-eslint.js | |
prefer-numeric-literals | ✅ | base-eslint.js | ||
prefer-object-has-own | ✅ | base-eslint.js | ||
prefer-object-spread | ✅ | base-eslint.js | ||
prefer-promise-reject-errors | ❌ | Superseded by the @typescript-eslint/prefer-promise-reject-errors rule. | base-eslint.js | |
prefer-regex-literals | ✅ | The disallowRedundantWrapping option is enabled to make the rule stricter. | base-eslint.js | |
prefer-rest-params | ✅ | base-eslint.js | ||
prefer-spread | ✅ | base-eslint.js | ||
prefer-template | ✅ | base-eslint.js | ||
preserve-caught-error | ✅ | base-eslint.js | ||
radix | ✅ | base-eslint.js | ||
require-atomic-updates | ❌ | Disabled since Airbnb reports that the rule is "very buggy". | base-eslint.js | |
require-await | ❌ | Superseded by the @typescript-eslint/require-await rule. | base-eslint.js | |
require-unicode-regexp | ❌ | Disabled because requiring the u or the v flag for ASCII text is verbose and cumbersome. (Even though these flags would also enable regex strict mode, the marginal benefit is not worth the verbosity.) | base-eslint.js | |
require-yield | ✅ | base-eslint.js | ||
sort-imports | ❌ | Disabled since this is automatically handled by prettier-plugin-organize-imports. | base-eslint.js | |
sort-keys | ❌ | Disabled because object keys are often not meant to be sorted in alphabetical order. | base-eslint.js | |
sort-vars | ❌ | Disabled because variable declarations are often not meant to be sorted in alphabetical order. | base-eslint.js | |
strict | ✅ | The never option is provided to make the rule stricter. | base-eslint.js | |
symbol-description | ✅ | base-eslint.js | ||
unicode-bom | ✅ | base-eslint.js | ||
use-isnan | ✅ | base-eslint.js | ||
valid-typeof | ✅ | base-eslint.js | ||
vars-on-top | ✅ | base-eslint.js | ||
yoda | ✅ | base-eslint.js |
@typescript-eslint Rules
eslint-plugin-import-x Rules
eslint-plugin-jsdoc Rules
| Rule Name | Enabled | Parent Configs | Notes | Source File |
|---|---|---|---|---|
jsdoc/check-access | ❌ | Disabled because it is not needed in TypeScript. | base-jsdoc.js | |
jsdoc/check-alignment | ❌ | Superseded by the complete/limit-jsdoc-comments rule. | base-jsdoc.js | |
jsdoc/check-examples | ❌ | Disabled since it does not work with ESLint 8. | base-jsdoc.js | |
jsdoc/check-indentation | ❌ | Superseded by the complete/limit-jsdoc-comments rule. | base-jsdoc.js | |
jsdoc/check-line-alignment | ❌ | Disabled since this is not a common formatting scheme. It is also not recommended by the plugin authors. | base-jsdoc.js | |
jsdoc/check-param-names | ✅ | base-jsdoc.js | ||
jsdoc/check-property-names | ❌ | Disabled because it is not needed in TypeScript. | base-jsdoc.js | |
jsdoc/check-syntax | ❌ | Disabled because it is not needed in TypeScript. | base-jsdoc.js | |
jsdoc/check-tag-names | ✅ | base-jsdoc.js | ||
jsdoc/check-template-names | ✅ | base-jsdoc.js | ||
jsdoc/check-types | ❌ | Disabled because it is not needed in TypeScript. | base-jsdoc.js | |
jsdoc/check-values | ✅ | base-jsdoc.js | ||
jsdoc/convert-to-jsdoc-comments | ❌ | Disabled since it is idiomatic in the TypeScript ecosystem to use a mixture of both JSDoc and non-JSDoc comments. | base-jsdoc.js | |
jsdoc/empty-tags | ✅ | base-jsdoc.js | ||
jsdoc/escape-inline-tags | ✅ | base-jsdoc.js | ||
jsdoc/implements-on-classes | ✅ | base-jsdoc.js | ||
jsdoc/imports-as-dependencies | ❌ | Disabled since you cannot configure it with a path to the correct "package.json" file. | base-jsdoc.js | |
jsdoc/informative-docs | ✅ | base-jsdoc.js | ||
jsdoc/lines-before-block | ❌ | Disabled since it is currently bugged. | base-jsdoc.js | |
jsdoc/match-description | ❌ | Superseded by the complete/jsdoc-full-sentences rule. | base-jsdoc.js | |
jsdoc/match-name | ❌ | Disabled because it is only needed for projects with specific JSDoc requirements. | base-jsdoc.js | |
jsdoc/multiline-blocks | ❌ | Superseded by the complete/limit-jsdoc-comments rule. | base-jsdoc.js | |
jsdoc/no-bad-blocks | ❌ | Disabled because it provides little value; it only detects JSDoc comments with tags in them. | base-jsdoc.js | |
jsdoc/no-blank-block-descriptions | ❌ | Superseded by the complete/format-jsdoc-comments rule. | base-jsdoc.js | |
jsdoc/no-blank-blocks | ❌ | Superseded by the complete/no-empty-jsdoc rule. | base-jsdoc.js | |
jsdoc/no-defaults | ❌ | Disabled because it provides little value; the @default tag is rare. | base-jsdoc.js | |
jsdoc/no-missing-syntax | ❌ | Disabled because it is too project-specific. | base-jsdoc.js | |
jsdoc/no-multi-asterisks | ❌ | Superseded by the complete/limit-jsdoc-comments rule. | base-jsdoc.js | |
jsdoc/no-restricted-syntax | ❌ | Disabled because it is intended for disabling of specific language features per-project. | base-jsdoc.js | |
jsdoc/no-types | ✅ | The contexts option is set to any to make the rule stricter. | base-jsdoc.js | |
jsdoc/no-undefined-types | ❌ | Disabled because it is not needed in TypeScript. | base-jsdoc.js | |
jsdoc/prefer-import-tag | ❌ | Disabled since it is not idiomatic in the ecosystem to do this, especially in configuration files like "prettier.config.mjs". | base-jsdoc.js | |
jsdoc/reject-any-type | ✅ | base-jsdoc.js | ||
jsdoc/reject-function-type | ✅ | base-jsdoc.js | ||
jsdoc/require-asterisk-prefix | ✅ | base-jsdoc.js | ||
jsdoc/require-description | ❌ | Disabled because it is overboard for every function to have a description. | base-jsdoc.js | |
jsdoc/require-description-complete-sentence | ❌ | Superseded by the complete/jsdoc-complete-sentences rule. | base-jsdoc.js | |
jsdoc/require-example | ❌ | Disabled because it is overboard for every function to require an example. | base-jsdoc.js | |
jsdoc/require-file-overview | ❌ | Disabled because it is overboard for every file to require an overview. | base-jsdoc.js | |
jsdoc/require-hyphen-before-param-description | ✅ | The never option is provided to make the rule match the format of the official TypeScript codebase. | base-jsdoc.js | |
jsdoc/require-jsdoc | ❌ | Disabled since it is overboard for every function to have a JSDoc comment. | base-jsdoc.js | |
jsdoc/require-next-description | ✅ | base-jsdoc.js | ||
jsdoc/require-next-type | ✅ | base-jsdoc.js | ||
jsdoc/require-param | ✅ | Configured to only apply when there are one or more parameters. | base-jsdoc.js | |
jsdoc/require-param-description | ✅ | The contexts option is set to any to make the rule stricter. | base-jsdoc.js | |
jsdoc/require-param-name | ✅ | The contexts option is set to any to make the rule stricter. | base-jsdoc.js | |
jsdoc/require-param-type | ❌ | Disabled because it is not needed in TypeScript. | base-jsdoc.js | |
jsdoc/require-property | ❌ | Disabled because it is not needed in TypeScript. | base-jsdoc.js | |
jsdoc/require-property-description | ✅ | base-jsdoc.js | ||
jsdoc/require-property-name | ✅ | base-jsdoc.js | ||
jsdoc/require-property-type | ❌ | Disabled because it is not needed in TypeScript. | base-jsdoc.js | |
jsdoc/require-rejects | ❌ | Disabled because it is overboard to document every throw statement. | base-jsdoc.js | |
jsdoc/require-returns | ❌ | Disabled because it is overboard for every function to document every return value. | base-jsdoc.js | |
jsdoc/require-returns-check | ❌ | Disabled because it is overboard for every function to document every return value. | base-jsdoc.js | |
jsdoc/require-returns-description | ✅ | The contexts option is set to any to make the rule stricter. | base-jsdoc.js | |
jsdoc/require-returns-type | ❌ | Disabled because it is not needed in TypeScript. | base-jsdoc.js | |
jsdoc/require-tags | ❌ | Disabled since it is expected to be configured with project-specific keywords. | base-jsdoc.js | |
jsdoc/require-template | ❌ | Disabled because it is overboard to document every generic type variable. | base-jsdoc.js | |
jsdoc/require-template-description | ✅ | base-jsdoc.js | ||
jsdoc/require-throws | ❌ | Disabled because it is overboard to document every throw statement. | base-jsdoc.js | |
jsdoc/require-throws-description | ✅ | base-jsdoc.js | ||
jsdoc/require-throws-type | ❌ | Disabled since in most cases, the type of a thrown error will simply be Error, making the annotation superfluous. | base-jsdoc.js | |
jsdoc/require-yields | ❌ | Disabled because it is overboard to document every yield. | base-jsdoc.js | |
jsdoc/require-yields-check | ❌ | Disabled because it is overboard to document every yield. | base-jsdoc.js | |
jsdoc/require-yields-description | ✅ | base-jsdoc.js | ||
jsdoc/require-yields-type | ✅ | base-jsdoc.js | ||
jsdoc/sort-tags | ✅ | base-jsdoc.js | ||
jsdoc/tag-lines | ❌ | Superseded by the complete/format-jsdoc-comments rule. | base-jsdoc.js | |
jsdoc/text-escaping | ❌ | Disabled since it is only useful in certain environments (e.g. when your project converts JSDoc comments to Markdown). | base-jsdoc.js | |
jsdoc/ts-method-signature-style | ✅ | base-jsdoc.js | ||
jsdoc/ts-no-empty-object-type | ✅ | base-jsdoc.js | ||
jsdoc/ts-no-unnecessary-template-expression | ✅ | base-jsdoc.js | ||
jsdoc/ts-prefer-function-type | ✅ | base-jsdoc.js | ||
jsdoc/type-formatting | ✅ | base-jsdoc.js | ||
jsdoc/valid-types | ❌ | Disabled because it is not needed in TypeScript. | base-jsdoc.js |
eslint-plugin-n Rules
| Rule Name | Enabled | Parent Configs | Notes | Source File |
|---|---|---|---|---|
n/callback-return | ❌ | Disabled since stylistic rules from this plugin are not used. | base-n.js | |
n/exports-style | ❌ | Disabled since stylistic rules from this plugin are not used. | base-n.js | |
n/file-extension-in-import | ✅ | This rule is helpful to automatically fix file extensions in import statements throughout an entire codebase. | base-n.js | |
n/global-require | ❌ | Disabled since stylistic rules from this plugin are not used. | base-n.js | |
n/handle-callback-err | ✅ | base-n.js | ||
n/hashbang | ❌ | Disabled since it does not work very well with TypeScript. (It needs project-specific configuration depending on where the output directory is located.) | base-n.js | |
n/no-callback-literal | ✅ | base-n.js | ||
n/no-deprecated-api | ✅ | base-n.js | ||
n/no-exports-assign | ✅ | base-n.js | ||
n/no-extraneous-import | ❌ | Disabled since it is handled by the TypeScript compiler. | base-n.js | |
n/no-extraneous-require | ❌ | Disabled since require statements are not used in TypeScript code. | base-n.js | |
n/no-hide-core-modules | ❌ | Disabled because this rule is deprecated. | base-n.js | |
n/no-missing-import | ❌ | Disabled since it is handled by the TypeScript compiler. | base-n.js | |
n/no-missing-require | ❌ | Disabled since it is handled by the TypeScript compiler. | base-n.js | |
n/no-mixed-requires | ❌ | Disabled since stylistic rules from this plugin are not used. | base-n.js | |
n/no-new-require | ✅ | base-n.js | ||
n/no-path-concat | ✅ | base-n.js | ||
n/no-process-env | ❌ | Disabled since stylistic rules from this plugin are not used. | base-n.js | |
n/no-process-exit | ❌ | Disabled because using process.exit is common to exit command-line applications without verbose output. | base-n.js | |
n/no-restricted-import | ❌ | Disabled since stylistic rules from this plugin are not used. | base-n.js | |
n/no-restricted-require | ❌ | Disabled since stylistic rules from this plugin are not used. | base-n.js | |
n/no-sync | ❌ | Disabled since stylistic rules from this plugin are not used. | base-n.js | |
n/no-top-level-await | ❌ | Disabled since modern ESM projects that are written in TypeScript do not generally have to worry about interop with require. | base-n.js | |
n/no-unpublished-bin | ✅ | base-n.js | ||
n/no-unpublished-import | ❌ | Superseded by the import-x/no-extraneous-dependencies rule. | base-n.js | |
n/no-unpublished-require | ❌ | Disabled since it is assumed that source code will be written in ESM. | base-n.js | |
n/no-unsupported-features/es-builtins | ❌ | Disabled because it is assumed that we are running on modern versions of Node.js. | base-n.js | |
n/no-unsupported-features/es-syntax | ❌ | Disabled because it is assumed that our transpiler or runtime has support for the latest version of ESM. | base-n.js | |
n/no-unsupported-features/node-builtins | ❌ | Disabled since it is handled by the TypeScript compiler. | base-n.js | |
n/prefer-global/buffer | ❌ | Disabled since stylistic rules from this plugin are not used. | base-n.js | |
n/prefer-global/console | ❌ | Disabled since stylistic rules from this plugin are not used. | base-n.js | |
n/prefer-global/process | ❌ | Disabled since stylistic rules from this plugin are not used. | base-n.js | |
n/prefer-global/text-decoder | ❌ | Disabled since stylistic rules from this plugin are not used. | base-n.js | |
n/prefer-global/text-encoder | ❌ | Disabled since stylistic rules from this plugin are not used. | base-n.js | |
n/prefer-global/url | ❌ | Disabled since stylistic rules from this plugin are not used. | base-n.js | |
n/prefer-global/url-search-params | ❌ | Disabled since stylistic rules from this plugin are not used. | base-n.js | |
n/prefer-node-protocol | ❌ | Superseded by the unicorn/prefer-node-protocol rule. | base-n.js | |
n/prefer-promises/dns | ❌ | Disabled since stylistic rules from this plugin are not used. | base-n.js | |
n/prefer-promises/fs | ❌ | Disabled since stylistic rules from this plugin are not used. | base-n.js | |
n/process-exit-as-throw | ✅ | base-n.js | ||
n/shebang | ❌ | Superseded by the n/hashbang rule. | base-n.js |