matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"suffixes"?: [...string]
...
}, ...],
])matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"template"?: >=0
"styles"?: >=0
"animations"?: >=0
...
}, ...],
])Enforces a maximum number of lines in inline template, styles and animations. See more at https://angular.dev/style-guide#style-05-04 https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-max-inline-declarations.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"type"?: matchN(1, [string, [..."element" | "attribute"]])
"prefix"?: string | [...]
"style"?: "camelCase" | "kebab-case"
...
}, ...],
])Component selectors should follow given naming rules. See more at https://angular.dev/style-guide#style-02-07, https://angular.dev/style-guide#style-05-02 and https://angular.dev/style-guide#style-05-03. https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-selector.md
Ensures consistent usage of `styles`/`styleUrls`/`styleUrl` within Component metadata https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-component-styles.md
Ensures that classes use contextual decorators in its body https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/contextual-decorator.md
Ensures that lifecycle methods are used in a correct context https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/contextual-lifecycle.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"suffixes"?: [...string]
...
}, ...],
])Classes decorated with @Directive must have suffix "Directive" (or custom) in their name. See more at https://angular.dev/style-guide#style-02-03 https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/directive-class-suffix.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"type"?: matchN(1, [string, [..."element" | "attribute"]])
"prefix"?: string | [...]
"style"?: "camelCase" | "kebab-case"
...
}, ...],
])Directive selectors should follow given naming rules. See more at https://angular.dev/style-guide#style-02-06 and https://angular.dev/style-guide#style-02-08. https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/directive-selector.md
Angular Lifecycle methods should not be async. Angular does not wait for async lifecycle but the code incorrectly suggests it does. https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-async-lifecycle-method.md
The @Attribute decorator is used to obtain a single value for an attribute. This is a much less common use-case than getting a stream of values (using @Input), so often the @Attribute decorator is mistakenly used when @Input was what was intended. This rule disallows usage of @Attribute decorator altogether in order to prevent these mistakes. https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-attribute-decorator.md
Ensures that directives not implement conflicting lifecycle interfaces. https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-conflicting-lifecycle.md
Ensures that metadata arrays do not contain duplicate entries. https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-duplicates-in-metadata-arrays.md
Disallows declaring empty lifecycle methods https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-empty-lifecycle-method.md
Disallows usage of `forwardRef` references for DI https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-forward-ref.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowStatic"?: bool
...
}, ...],
])Disallows usage of the `host` metadata property. NOTE: This used to be recommended by the Angular Team, but now they recommend the exact opposite: https://github.com/angular/angular/issues/54284 https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-host-metadata-property.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"prefixes"?: [...string]
...
}, ...],
])Ensures that input bindings, including aliases, are not named or prefixed by the configured disallowed prefixes https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-input-prefix.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// A list with allowed input names
"allowedNames"?: list.UniqueItems() & [...string]
...
}, ...],
])Ensures that input bindings are not aliased https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-input-rename.md
Disallows usage of the `inputs` metadata property. See more at https://angular.dev/style-guide#style-05-12 https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-inputs-metadata-property.md
Disallows explicit calls to lifecycle methods https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-lifecycle-call.md
Ensures that output bindings, including aliases, are not named as standard DOM events https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-native.md
Ensures that output bindings, including aliases, are not named "on", nor prefixed with it. See more at https://angular.dev/style-guide#style-05-16 https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-on-prefix.md
Ensures that output bindings are not aliased https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-output-rename.md
Disallows usage of the `outputs` metadata property. See more at https://angular.dev/style-guide#style-05-12 https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-outputs-metadata-property.md
Disallows the declaration of impure pipes https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-pipe-impure.md
Disallows usage of the `queries` metadata property. See more at https://angular.dev/style-guide#style-05-12. https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/no-queries-metadata-property.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"prefixes"?: list.UniqueItems() & [...string]
...
}, ...],
])Enforce consistent prefix for pipes. https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/pipe-prefix.md
Ensures component's `changeDetection` is set to `ChangeDetectionStrategy.OnPush` https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-on-push-component-change-detection.md
Ensures component, directive and pipe `standalone` property is set to `true` in the component decorator https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-standalone.md
Ensures component `standalone` property is set to `true` in the component decorator https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-standalone-component.md
Prefer to declare `@Output` as `readonly` since they are not supposed to be reassigned https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/prefer-output-readonly.md
The ./ and ../ prefix is standard syntax for relative URLs; don't depend on Angular's current ability to do without that prefix. See more at https://angular.dev/style-guide#style-05-04 https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/relative-url-prefix.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"requireDescription"?: bool
"requireMeaning"?: bool
...
}, ...],
])Ensures that $localize tagged messages contain helpful metadata to aid with translations. https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/require-localize-metadata.md
Ensures that lifecycle methods are declared in order of execution https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/sort-lifecycle-methods.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// A string with a BCP 47 language tag.
"locale"?: string
...
}, ...],
])Ensures ASC alphabetical order for `NgModule` metadata arrays for easy visual scanning https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/sort-ngmodule-metadata-arrays.md
Component selector must be declared https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-component-selector.md
Disallows using `ViewEncapsulation.None` https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-component-view-encapsulation.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignoreClassNamePattern"?: string
...
}, ...],
])Using the `providedIn` property makes `Injectables` tree-shakable https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-injectable-provided-in.md
Ensures that classes implement lifecycle interfaces corresponding to the declared lifecycle methods. See more at https://angular.dev/style-guide#style-09-01 https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-lifecycle-interface.md
Ensures that `Pipes` implement `PipeTransform` interface https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/use-pipe-transform-interface.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"commonjs"?: bool
"amd"?: bool
"esmodule"?: bool
"ignore"?: list.MinItems(1) & list.UniqueItems() & [...string]
"caseSensitive"?: bool
"caseSensitiveStrict"?: bool
...
}, ...],
])Ensure imports point to a file/module that can be resolved. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-unresolved.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"commonjs"?: bool
...
}, ...],
])Ensure named imports correspond to a named export in the remote file. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/named.md
Ensure a default export is present, given a default import. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/default.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// If `false`, will report computed (and thus, un-lintable) references to namespace members.
"allowComputed"?: bool
...
}, ...],
])Ensure imported namespaces contain dereferenced properties as they are dereferenced. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/namespace.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignore"?: list.UniqueItems() & [...string]
...
}, ...],
])Forbid namespace (a.k.a. "wildcard" `*`) imports. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-namespace.md
Forbid any invalid exports, i.e. re-export of the same name. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/export.md
Forbid the use of mutable exports with `var` or `let`. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-mutable-exports.md
Ensure consistent use of file extension within the import path. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/extensions.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"zones"?: list.MinItems(1) & [...close({
"target"?: matchN(>=1, [string, list.UniqueItems() & list.MinItems(1) & [...string]])
"from"?: matchN(>=1, [string, list.UniqueItems() & list.MinItems(1) & [...string]])
"except"?: list.UniqueItems() & [...string]
"message"?: string
})]
"basePath"?: string
...
}, ...],
])Enforce which files can be imported in a given folder. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-restricted-paths.md
Forbid importing the submodules of other modules. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-internal-modules.md
Prefer named exports to be grouped together in a single export declaration https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/group-exports.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"commonjs"?: bool
"amd"?: bool
"esmodule"?: bool
"ignore"?: list.MinItems(1) & list.UniqueItems() & [...string]
...
}, ...],
])Forbid importing packages through relative paths. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-relative-packages.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"commonjs"?: bool
"amd"?: bool
"esmodule"?: bool
"ignore"?: list.MinItems(1) & list.UniqueItems() & [...string]
...
}, ...],
])Forbid importing modules from parent directories. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-relative-parent-imports.md
Enforce or ban the use of inline type-only markers for named imports. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/consistent-type-specifier-style.md
Forbid a module from importing itself. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-self-import.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"commonjs"?: bool
"amd"?: bool
"esmodule"?: bool
"ignore"?: list.MinItems(1) & list.UniqueItems() & [...string]
"maxDepth"?: matchN(>=1, [int & >=1, "∞"])
// ignore external modules
"ignoreExternal"?: bool
// Allow cyclic dependency if there is at least one dynamic import in the chain
"allowUnsafeDynamicCyclicDependency"?: bool
...
}, ...],
])Forbid a module from importing a module with a dependency path back to itself. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-cycle.md
Forbid named default exports. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-named-default.md
Forbid use of exported name as identifier of default export. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-named-as-default.md
Forbid use of exported name as property of default export. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-named-as-default-member.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// If `false`, will report default export of an array
"allowArray"?: bool
// If `false`, will report default export of an arrow function
"allowArrowFunction"?: bool
// If `false`, will report default export of a function call
"allowCallExpression"?: bool
// If `false`, will report default export of an anonymous class
"allowAnonymousClass"?: bool
// If `false`, will report default export of an anonymous function
"allowAnonymousFunction"?: bool
// If `false`, will report default export of a literal
"allowLiteral"?: bool
// If `false`, will report default export of an object expression
"allowObject"?: bool
// If `false`, will report default export of a class instantiation
"allowNew"?: bool
...
}, ...],
])Forbid anonymous values as default exports. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-anonymous-default-export.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// files/paths to be analyzed (only for unused exports)
"src"?: list.UniqueItems() & [...strings.MinRunes(1)]
// files/paths for which unused exports will not be reported (e.g module entry points)
"ignoreExports"?: list.UniqueItems() & [...strings.MinRunes(1)]
// report modules without any exports
"missingExports"?: bool
// report exports without any usage
"unusedExports"?: bool
...
}, ...],
])Forbid modules without exports, or exports without matching import in another module. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-unused-modules.md
Forbid CommonJS `require` calls and `module.exports` or `exports.*`. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-commonjs.md
Forbid AMD `require` and `define` calls. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-amd.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"considerQueryString"?: bool
"prefer-inline"?: bool
...
}, ...],
])Forbid repeated import of the same module in multiple places. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-duplicates.md
Ensure all imports appear before other statements. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/first.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"max"?: number
"ignoreTypeImports"?: bool
...
}, ...],
])Enforce the maximum number of dependencies a module can have. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/max-dependencies.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"devDependencies"?: matchN(1, [bool, [..._]])
"optionalDependencies"?: matchN(1, [bool, [..._]])
"peerDependencies"?: matchN(1, [bool, [..._]])
"bundledDependencies"?: matchN(1, [bool, [..._]])
"packageDir"?: matchN(1, [string, [..._]])
"includeInternal"?: bool
"includeTypes"?: bool
...
}, ...],
])Forbid the use of extraneous packages. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-extraneous-dependencies.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"commonjs"?: bool
"amd"?: bool
"esmodule"?: bool
"ignore"?: list.MinItems(1) & list.UniqueItems() & [...string]
...
}, ...],
])Forbid import of modules using absolute paths. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-absolute-path.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allow"?: list.UniqueItems() & [...string]
...
}, ...],
])Forbid Node.js builtin modules. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-nodejs-modules.md
Forbid webpack loader syntax in imports. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-webpack-loader-syntax.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"groups"?: [...]
"pathGroupsExcludedImportTypes"?: [...]
"distinctGroup"?: bool
"pathGroups"?: [...close({
"pattern"!: string
"patternOptions"?: {...}
"group"!: "builtin" |
"external" |
"internal" |
"unknown" |
"parent" |
"sibling" |
"index" |
"object" |
"type"
"position"?: "after" | "before"
})]
"newlines-between"?: "ignore" | "always" | "always-and-inside-groups" | "never"
"alphabetize"?: close({
"caseInsensitive"?: bool
"order"?: "ignore" | "asc" | "desc"
"orderImportKind"?: "ignore" | "asc" | "desc"
})
"warnOnUnassignedImports"?: bool
...
}, ...],
])Enforce a convention in module import order. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/order.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"count"?: int & >=1
"exactCount"?: bool
"considerComments"?: bool
...
}, ...],
])Enforce a newline after import statements. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/newline-after-import.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"target"?: "single" | "any"
...
}, ...],
])Prefer a default export if module exports a single name or multiple names. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/prefer-default-export.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"esmodule"?: bool
...
}, ...],
])Forbid `require()` calls with expressions. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-dynamic-require.md
Forbid potentially ambiguous parse goal (`script` vs. `module`). https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/unambiguous.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"devDependencies"?: matchN(1, [bool, [..._]])
"optionalDependencies"?: matchN(1, [bool, [..._]])
"peerDependencies"?: matchN(1, [bool, [..._]])
"allow"?: [...string]
...
}, ...],
])Forbid unassigned imports https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-unassigned-import.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"commonjs"?: bool
"noUselessIndex"?: bool
...
}, ...],
])Forbid unnecessary path segments in import and require statements. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-useless-path-segments.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"importFunctions"?: list.UniqueItems() & [...string]
"webpackChunknameFormat"?: string
...
}, ...],
])Enforce a leading comment with the webpackChunkName for dynamic imports. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/dynamic-import-chunkname.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"exceptions"?: [...]
...
}, ...],
])Forbid import statements with CommonJS module.exports.
Forbid empty named import blocks. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-empty-named-blocks.md
Ensure all exports appear after other statements. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/exports-last.md
Forbid imported names marked with `@deprecated` documentation tag. https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/no-deprecated.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"sortCharacterClasses"?: bool
...
}, ...],
])Improve regexes by making them shorter, consistent, and safer. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/better-regex.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"name"?: string
"ignore"?: list.UniqueItems()
...
}, ...],
])Enforce a specific parameter name in catch clauses. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/catch-error-name.md
Use destructured variables over properties. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-destructuring.md
Prefer consistent types when spreading a ternary in an array literal. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-empty-array-spread.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"checkArrowFunctions"?: bool
...
}, ...],
])Move function definitions to the highest possible scope. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/consistent-function-scoping.md
Enforce correct `Error` subclassing. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/custom-error-definition.md
Enforce no spaces between braces. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/empty-brace-spaces.md
Enforce passing a `message` value when creating a built-in error. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/error-message.md
Require escape sequences to use uppercase values. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/escape-case.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"terms"?: [...string]
"ignore"?: list.UniqueItems()
"ignoreDatesOnPullRequests"?: bool
"allowWarningComments"?: bool
"date"?: time.Format("2006-01-02")
...
}, ...],
])Add expiration conditions to TODO comments. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/expiring-todo-comments.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"non-zero"?: "greater-than" | "not-equal"
...
}, ...],
])Enforce explicitly comparing the `length` or `size` property of a value. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/explicit-length-check.md
Enforce a case style for filenames. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/filename-case.md
Enforce specific import styles per module. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/import-style.md
Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/new-for-builtins.md
Enforce specifying rules to disable in `eslint-disable` comments. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-abusive-eslint-disable.md
Disallow anonymous functions and classes as the default export. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-anonymous-default-export.md
Prevent passing a function reference directly to iterator methods. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-callback-reference.md
Prefer `for…of` over the `forEach` method. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-for-each.md
Disallow using the `this` argument in array methods. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-method-this-argument.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignore"?: list.UniqueItems()
...
}, ...],
])Enforce combining multiple `Array#push()` into one call. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-push-push.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowSimpleOperations"?: bool
...
}, ...],
])Disallow `Array#reduce()` and `Array#reduceRight()`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-array-reduce.md
Disallow member access from await expression. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-await-expression-member.md
Disallow using `await` in `Promise` method parameters. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-await-in-promise-methods.md
Do not use leading/trailing space between `console.log` parameters. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-console-spaces.md
Do not use a `for` loop that can be replaced with a `for-of` loop. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-for-loop.md
Enforce the use of Unicode escapes instead of hexadecimal escapes. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-hex-escape.md
Require `Array.isArray()` instead of `instanceof Array`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-instanceof-array.md
Disallow invalid options in `fetch()` and `new Request()`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-invalid-fetch-options.md
Prevent calling `EventTarget#removeEventListener()` with the result of an expression. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-invalid-remove-event-listener.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"disallowedPrefixes"?: list.UniqueItems() & list.MaxItems(1) & [string, ...]
"checkProperties"?: bool
"onlyCamelCase"?: bool
...
}, ...],
])Disallow identifiers starting with `new` or `class`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-keyword-prefix.md
Disallow `if` statements as the only statement in `if` blocks without `else`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-lonely-if.md
Disallow a magic number as the `depth` argument in `Array#flat(…).` https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-magic-array-flat-depth.md
Disallow negated expression in equality check. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-negation-in-equality-check.md
Disallow nested ternary expressions. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-nested-ternary.md
Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-new-buffer.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"checkStrictEquality"?: bool
...
}, ...],
])Disallow the use of the `null` literal. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-null.md
Disallow the use of objects as default parameters. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-object-as-default-parameter.md
Disallow passing single-element arrays to `Promise` methods. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-single-promise-in-promise-methods.md
Disallow classes that only have static members. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-static-only-class.md
Disallow assigning `this` to a variable. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-this-assignment.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"checkGlobalVariables"?: bool
...
}, ...],
])Disallow comparing `undefined` using `typeof`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-typeof-undefined.md
Disallow awaiting non-promise values. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unnecessary-await.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"targets"?: string | [...] | {...}
...
}, ...],
])Enforce the use of built-in methods instead of unnecessary polyfills. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unnecessary-polyfills.md
Disallow unreadable array destructuring. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unreadable-array-destructuring.md
Disallow unused object properties. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-unused-properties.md
Disallow useless fallback when spreading in object literals. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-fallback-in-spread.md
Disallow useless array length check. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-length-check.md
Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-promise-resolve-reject.md
Disallow useless case in switch statements. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-switch-case.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"checkArguments"?: bool
"checkArrowFunctionBody"?: bool
...
}, ...],
])Disallow useless `undefined`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-useless-undefined.md
Disallow number literals with zero fractions or dangling dots. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/no-zero-fractions.md
Enforce proper case for numeric literals. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/number-literal-case.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"binary"?: close({
"onlyIfContainsSeparator"?: bool
"minimumDigits"?: int & >=0
"groupLength"?: int & >=1
})
"octal"?: close({
"onlyIfContainsSeparator"?: bool
"minimumDigits"?: int & >=0
"groupLength"?: int & >=1
})
"hexadecimal"?: close({
"onlyIfContainsSeparator"?: bool
"minimumDigits"?: int & >=0
"groupLength"?: int & >=1
})
"number"?: close({
"onlyIfContainsSeparator"?: bool
"minimumDigits"?: int & >=0
"groupLength"?: int & >=1
})
"onlyIfContainsSeparator"?: bool
...
}, ...],
])Enforce the style of numeric separators by correctly grouping digits. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/numeric-separators-style.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"excludedPackages"?: list.UniqueItems() & [...string]
...
}, ...],
])Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-add-event-listener.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"checkFromLast"?: bool
...
}, ...],
])Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-find.md
Prefer `.flatMap(…)` over `.map(…).flat()`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-flat-map.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"functions"?: list.UniqueItems()
...
}, ...],
])Prefer `Array#flat()` over legacy techniques to flatten arrays. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-flat.md
Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-index-of.md
Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-array-some.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"getLastElementFunctions"?: list.UniqueItems()
"checkAllIndexAccess"?: bool
...
}, ...],
])Prefer `.at()` method for index access and `String#charAt()`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-at.md
Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-blob-reading-methods.md
Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-code-point.md
Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-date-now.md
Prefer default parameters over reassignment. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-default-parameters.md
Prefer `Node#append()` over `Node#appendChild()`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-append.md
Prefer using `.dataset` on DOM elements over calling attribute methods. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-dataset.md
Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-remove.md
Prefer `.textContent` over `.innerText`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-dom-node-text-content.md
Prefer `EventTarget` over `EventEmitter`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-event-target.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignoreUsedVariables"?: bool
...
}, ...],
])Prefer `export…from` when re-exporting. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-export-from.md
Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-includes.md
Prefer reading a JSON file as a buffer. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-json-parse-buffer.md
Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-keyboard-event-key.md
Prefer using a logical operator over a ternary. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-logical-operator-over-ternary.md
Enforce the use of `Math.trunc` instead of bitwise operators. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-math-trunc.md
Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-modern-dom-apis.md
Prefer modern `Math` APIs over legacy patterns. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-modern-math-apis.md
Prefer JavaScript modules (ESM) over CommonJS. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-module.md
Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-native-coercion-functions.md
Prefer negative index over `.length - index` when possible. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-negative-index.md
Prefer using the `node:` protocol when importing Node.js builtin modules. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-node-protocol.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"checkInfinity"?: bool
"checkNaN"?: bool
...
}, ...],
])Prefer `Number` static properties over global ones. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-number-properties.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"functions"?: list.UniqueItems()
...
}, ...],
])Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-object-from-entries.md
Prefer omitting the `catch` binding parameter. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-optional-catch-binding.md
Prefer borrowing methods from the prototype instead of the instance. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-prototype-methods.md
Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-query-selector.md
Prefer `Reflect.apply()` over `Function#apply()`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-reflect-apply.md
Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-regexp-test.md
Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-set-has.md
Prefer using `Set#size` instead of `Array#length`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-set-size.md
Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split(”)`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-spread.md
Prefer using the `String.raw` tag to avoid escaping `\`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-raw.md
Prefer `String#replaceAll()` over regex searches with the global flag. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-replace-all.md
Prefer `String#slice()` over `String#substr()` and `String#substring()`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-slice.md
Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-starts-ends-with.md
Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-string-trim-start-end.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"functions"?: list.UniqueItems()
...
}, ...],
])Prefer using `structuredClone` to create a deep clone. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-structured-clone.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"minimumCases"?: int & >=2
"emptyDefaultCase"?: "no-default-comment" | "do-nothing-comment" | "no-default-case"
...
}, ...],
])Prefer `switch` over multiple `else-if`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-switch.md
Prefer ternary expressions over simple `if-else` statements. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-ternary.md
Prefer top-level await over top-level promises and async function calls. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-top-level-await.md
Enforce throwing `TypeError` in type checking conditions. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/prefer-type-error.md
Enforce consistent relative URL style. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/relative-url-style.md
Enforce using the separator argument with `Array#join()`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-array-join-separator.md
Enforce using the digits argument with `Number#toFixed()`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-number-to-fixed-digits-argument.md
Enforce using the `targetOrigin` argument with `window.postMessage()`. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/require-post-message-target-origin.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"patterns"?: [string]: matchN(>=1, [
string,
close({
"suggest"!: string
"fix"?: bool
"message"?: string
}),
])
...
}, ...],
])Enforce better string content. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/string-content.md
Enforce consistent brace style for `case` clauses. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/switch-case-braces.md
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"indent"?: matchN(1, [=~"^\\s+$", int & >=1])
"tags"?: list.UniqueItems() & [...string]
"functions"?: list.UniqueItems() & [...string]
"selectors"?: list.UniqueItems() & [...string]
"comments"?: list.UniqueItems() & [...string]
...
}, ...],
])Fix whitespace-insensitive template indentation. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/template-indent.md
Enforce consistent case for text encoding identifiers. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/text-encoding-identifier-case.md
Require `new` when creating an error. https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v54.0.0/docs/rules/throw-new-error.md
Enforce linebreaks after opening and before closing array brackets in `<template>` https://eslint.vuejs.org/rules/array-bracket-newline.html
Enforce consistent spacing inside array brackets in `<template>` https://eslint.vuejs.org/rules/array-bracket-spacing.html
Enforce line breaks after each array element in `<template>` https://eslint.vuejs.org/rules/array-element-newline.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"before"?: bool
"after"?: bool
...
}, ...],
])Enforce consistent spacing before and after the arrow in arrow functions in `<template>` https://eslint.vuejs.org/rules/arrow-spacing.html
enforce attribute naming style on custom components in template https://eslint.vuejs.org/rules/attribute-hyphenation.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"order"?: list.UniqueItems() & [
...matchN(>=1, [
"DEFINITION" |
"LIST_RENDERING" |
"CONDITIONALS" |
"RENDER_MODIFIERS" |
"GLOBAL" |
"UNIQUE" |
"SLOT" |
"TWO_WAY_BINDING" |
"OTHER_DIRECTIVES" |
"OTHER_ATTR" |
"ATTR_STATIC" |
"ATTR_DYNAMIC" |
"ATTR_SHORTHAND_BOOL" |
"EVENTS" |
"CONTENT",
[
..."DEFINITION" |
"LIST_RENDERING" |
"CONDITIONALS" |
"RENDER_MODIFIERS" |
"GLOBAL" |
"UNIQUE" |
"SLOT" |
"TWO_WAY_BINDING" |
"OTHER_DIRECTIVES" |
"OTHER_ATTR" |
"ATTR_STATIC" |
"ATTR_DYNAMIC" |
"ATTR_SHORTHAND_BOOL" |
"EVENTS" |
"CONTENT"
],
])
]
"alphabetical"?: bool
...
}, ...],
])enforce order of attributes https://eslint.vuejs.org/rules/attributes-order.html
disallow use other than available `lang` https://eslint.vuejs.org/rules/block-lang.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"order"?: list.UniqueItems() & [...matchN(>=1, [string, list.UniqueItems() & [...string]])]
...
}, ...],
])enforce order of component top-level elements https://eslint.vuejs.org/rules/block-order.html
Disallow or enforce spaces inside of blocks after opening block and before closing block in `<template>` https://eslint.vuejs.org/rules/block-spacing.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"singleline"?: "always" | "never" | "consistent" | "ignore"
"multiline"?: "always" | "never" | "consistent" | "ignore"
"maxEmptyLines"?: >=0
"blocks"?: close({
{
[=~"^(?:\\S+)$"]: close({
"singleline"?: "always" | "never" | "consistent" | "ignore"
"multiline"?: "always" | "never" | "consistent" | "ignore"
"maxEmptyLines"?: >=0
})
}})
...
}, ...],
])enforce line breaks after opening and before closing block-level tags https://eslint.vuejs.org/rules/block-tag-newline.html
Enforce consistent brace style for blocks in `<template>` https://eslint.vuejs.org/rules/brace-style.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignoreDestructuring"?: bool
"ignoreImports"?: bool
"ignoreGlobals"?: bool
"properties"?: "always" | "never"
"allow"?: list.UniqueItems() & [...] & [...string]
...
}, ...],
])Enforce camelcase naming convention in `<template>` https://eslint.vuejs.org/rules/camelcase.html
Require or disallow trailing commas in `<template>` https://eslint.vuejs.org/rules/comma-dangle.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"before"?: bool
"after"?: bool
...
}, ...],
])Enforce consistent spacing before and after commas in `<template>` https://eslint.vuejs.org/rules/comma-spacing.html
Enforce consistent comma style in `<template>` https://eslint.vuejs.org/rules/comma-style.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"reportUnusedDisableDirectives"?: bool
...
}, ...],
])support comment-directives in `<template>` https://eslint.vuejs.org/rules/comment-directive.html
enforce component API style https://eslint.vuejs.org/rules/component-api-style.html
enforce specific casing for component definition name https://eslint.vuejs.org/rules/component-definition-name-casing.html
enforce specific casing for the component naming style in template https://eslint.vuejs.org/rules/component-name-in-template-casing.html
enforce the casing of component name in `components` options https://eslint.vuejs.org/rules/component-options-name-casing.html
enforce specific casing for custom event name https://eslint.vuejs.org/rules/custom-event-name-casing.html
enforce declaration style of `defineEmits` https://eslint.vuejs.org/rules/define-emits-declaration.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"order"?: list.UniqueItems() & [
..."defineEmits" | "defineProps" | "defineOptions" | "defineSlots" | "defineModel"
]
"defineExposeLast"?: bool
...
}, ...],
])enforce order of `defineEmits` and `defineProps` compiler macros https://eslint.vuejs.org/rules/define-macros-order.html
enforce declaration style of `defineProps` https://eslint.vuejs.org/rules/define-props-declaration.html
Enforce consistent newlines before and after dots in `<template>` https://eslint.vuejs.org/rules/dot-location.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowKeywords"?: bool
"allowPattern"?: string
...
}, ...],
])Enforce dot notation whenever possible in `<template>` https://eslint.vuejs.org/rules/dot-notation.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allow"?: list.MinItems(1) & list.UniqueItems() & [..."plain" | "scoped" | "module"]
...
}, ...],
])enforce or forbid the use of the `scoped` and `module` attributes in SFC top level style tags https://eslint.vuejs.org/rules/enforce-style-attribute.html
Require the use of `===` and `!==` in `<template>` https://eslint.vuejs.org/rules/eqeqeq.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"multiline"?: "below" | "beside" | "ignore"
"singleline"?: "below" | "beside" | "ignore"
...
}, ...],
])enforce the location of first attribute https://eslint.vuejs.org/rules/first-attribute-linebreak.html
Require or disallow spacing between function identifiers and their invocations in `<template>` https://eslint.vuejs.org/rules/func-call-spacing.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"singleline"?: "always" | "never"
"multiline"?: "always" | "never"
"selfClosingTag"?: struct.MinFields(1) & close({
"singleline"?: "always" | "never"
"multiline"?: "always" | "never"
})
...
}, ...],
])require or disallow a line break before tag's closing brackets https://eslint.vuejs.org/rules/html-closing-bracket-newline.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"startTag"?: "always" | "never"
"endTag"?: "always" | "never"
"selfClosingTag"?: "always" | "never"
...
}, ...],
])require or disallow a space before tag's closing brackets https://eslint.vuejs.org/rules/html-closing-bracket-spacing.html
enforce unified line brake in HTML comments https://eslint.vuejs.org/rules/html-comment-content-newline.html
enforce unified spacing in HTML comments https://eslint.vuejs.org/rules/html-comment-content-spacing.html
enforce consistent indentation in HTML comments https://eslint.vuejs.org/rules/html-comment-indent.html
enforce consistent indentation in `<template>` https://eslint.vuejs.org/rules/html-indent.html
enforce quotes style of HTML attributes https://eslint.vuejs.org/rules/html-quotes.html
enforce self-closing style https://eslint.vuejs.org/rules/html-self-closing.html
prevent variables used in JSX to be marked as unused https://eslint.vuejs.org/rules/jsx-uses-vars.html
Enforce consistent spacing between keys and values in object literal properties in `<template>` https://eslint.vuejs.org/rules/key-spacing.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"before"?: bool
"after"?: bool
"overrides"?: close({
"abstract"?: close({
"before"?: bool
"after"?: bool
})
"as"?: close({
"before"?: bool
"after"?: bool
})
"async"?: close({
"before"?: bool
"after"?: bool
})
"await"?: close({
"before"?: bool
"after"?: bool
})
"boolean"?: close({
"before"?: bool
"after"?: bool
})
"break"?: close({
"before"?: bool
"after"?: bool
})
"byte"?: close({
"before"?: bool
"after"?: bool
})
"case"?: close({
"before"?: bool
"after"?: bool
})
"catch"?: close({
"before"?: bool
"after"?: bool
})
"char"?: close({
"before"?: bool
"after"?: bool
})
"class"?: close({
"before"?: bool
"after"?: bool
})
"const"?: close({
"before"?: bool
"after"?: bool
})
"continue"?: close({
"before"?: bool
"after"?: bool
})
"debugger"?: close({
"before"?: bool
"after"?: bool
})
"default"?: close({
"before"?: bool
"after"?: bool
})
"delete"?: close({
"before"?: bool
"after"?: bool
})
"do"?: close({
"before"?: bool
"after"?: bool
})
"double"?: close({
"before"?: bool
"after"?: bool
})
"else"?: close({
"before"?: bool
"after"?: bool
})
"enum"?: close({
"before"?: bool
"after"?: bool
})
"export"?: close({
"before"?: bool
"after"?: bool
})
"extends"?: close({
"before"?: bool
"after"?: bool
})
"false"?: close({
"before"?: bool
"after"?: bool
})
"final"?: close({
"before"?: bool
"after"?: bool
})
"finally"?: close({
"before"?: bool
"after"?: bool
})
"float"?: close({
"before"?: bool
"after"?: bool
})
"for"?: close({
"before"?: bool
"after"?: bool
})
"from"?: close({
"before"?: bool
"after"?: bool
})
"function"?: close({
"before"?: bool
"after"?: bool
})
"get"?: close({
"before"?: bool
"after"?: bool
})
"goto"?: close({
"before"?: bool
"after"?: bool
})
"if"?: close({
"before"?: bool
"after"?: bool
})
"implements"?: close({
"before"?: bool
"after"?: bool
})
"import"?: close({
"before"?: bool
"after"?: bool
})
"in"?: close({
"before"?: bool
"after"?: bool
})
"instanceof"?: close({
"before"?: bool
"after"?: bool
})
"int"?: close({
"before"?: bool
"after"?: bool
})
"interface"?: close({
"before"?: bool
"after"?: bool
})
"let"?: close({
"before"?: bool
"after"?: bool
})
"long"?: close({
"before"?: bool
"after"?: bool
})
"native"?: close({
"before"?: bool
"after"?: bool
})
"new"?: close({
"before"?: bool
"after"?: bool
})
"null"?: close({
"before"?: bool
"after"?: bool
})
"of"?: close({
"before"?: bool
"after"?: bool
})
"package"?: close({
"before"?: bool
"after"?: bool
})
"private"?: close({
"before"?: bool
"after"?: bool
})
"protected"?: close({
"before"?: bool
"after"?: bool
})
"public"?: close({
"before"?: bool
"after"?: bool
})
"return"?: close({
"before"?: bool
"after"?: bool
})
"set"?: close({
"before"?: bool
"after"?: bool
})
"short"?: close({
"before"?: bool
"after"?: bool
})
"static"?: close({
"before"?: bool
"after"?: bool
})
"super"?: close({
"before"?: bool
"after"?: bool
})
"switch"?: close({
"before"?: bool
"after"?: bool
})
"synchronized"?: close({
"before"?: bool
"after"?: bool
})
"this"?: close({
"before"?: bool
"after"?: bool
})
"throw"?: close({
"before"?: bool
"after"?: bool
})
"throws"?: close({
"before"?: bool
"after"?: bool
})
"transient"?: close({
"before"?: bool
"after"?: bool
})
"true"?: close({
"before"?: bool
"after"?: bool
})
"try"?: close({
"before"?: bool
"after"?: bool
})
"typeof"?: close({
"before"?: bool
"after"?: bool
})
"var"?: close({
"before"?: bool
"after"?: bool
})
"void"?: close({
"before"?: bool
"after"?: bool
})
"volatile"?: close({
"before"?: bool
"after"?: bool
})
"while"?: close({
"before"?: bool
"after"?: bool
})
"with"?: close({
"before"?: bool
"after"?: bool
})
"yield"?: close({
"before"?: bool
"after"?: bool
})
})
...
}, ...],
])Enforce consistent spacing before and after keywords in `<template>` https://eslint.vuejs.org/rules/keyword-spacing.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"extensions"?: list.UniqueItems() & [...string]
"shouldMatchCase"?: bool
...
}, ...],
])require component name property to match its file name https://eslint.vuejs.org/rules/match-component-file-name.html
require the registered component name to match the imported component name https://eslint.vuejs.org/rules/match-component-import-name.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"singleline"?: matchN(>=1, [>=1, close({"max"?: >=1})])
"multiline"?: matchN(>=1, [>=1, close({"max"?: >=1})])
...
}, ...],
])enforce the maximum number of attributes per line https://eslint.vuejs.org/rules/max-attributes-per-line.html
enforce a maximum line length in `.vue` files https://eslint.vuejs.org/rules/max-len.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"style"?: int & >=1
"template"?: int & >=1
"script"?: int & >=1
"skipBlankLines"?: bool
...
}, ...],
])enforce maximum number of lines in Vue SFC blocks https://eslint.vuejs.org/rules/max-lines-per-block.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignores"?: list.UniqueItems() & [...string]
...
}, ...],
])require component names to be always multi-word https://eslint.vuejs.org/rules/multi-word-component-names.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignoreWhenEmpty"?: bool
"ignores"?: list.UniqueItems() & [...string]
"allowEmptyLines"?: bool
...
}, ...],
])require a line break before and after the contents of a multiline element https://eslint.vuejs.org/rules/multiline-html-element-content-newline.html
Enforce newlines between operands of ternary expressions in `<template>` https://eslint.vuejs.org/rules/multiline-ternary.html
enforce unified spacing in mustache interpolations https://eslint.vuejs.org/rules/mustache-interpolation-spacing.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"minLineOfMultilineProperty"?: >=2
...
}, ...],
])enforce new lines between multi-line properties in Vue components https://eslint.vuejs.org/rules/new-line-between-multi-line-property.html
enforce Promise or callback style in `nextTick` https://eslint.vuejs.org/rules/next-tick-style.html
disallow using arrow functions to define watcher https://eslint.vuejs.org/rules/no-arrow-functions-in-watch.html
disallow asynchronous actions in computed properties https://eslint.vuejs.org/rules/no-async-in-computed-properties.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowlist"?: list.UniqueItems() & [...string]
"attributes"?: close({
{[=~"^(?:\\S+|/.*/[a-z]*)$"]: list.UniqueItems() & [...string]}})
"directives"?: list.UniqueItems() & [...=~"^v-"]
...
}, ...],
])disallow the use of bare strings in `<template>` https://eslint.vuejs.org/rules/no-bare-strings-in-template.html
disallow boolean defaults https://eslint.vuejs.org/rules/no-boolean-default.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"additionalDirectives"?: list.UniqueItems() & list.MinItems(1) & [...string]
...
}, ...],
])disallow element's child contents which would be overwritten by a directive like `v-html` or `v-text` https://eslint.vuejs.org/rules/no-child-content.html
disallow accessing computed properties in `data`. https://eslint.vuejs.org/rules/no-computed-properties-in-data.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allow"?: list.MinItems(1) & list.UniqueItems() & [...string]
...
}, ...],
])Disallow the use of `console` in `<template>` https://eslint.vuejs.org/rules/no-console.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"checkLoops"?: bool
...
}, ...],
])Disallow constant expressions in conditions in `<template>` https://eslint.vuejs.org/rules/no-constant-condition.html
disallow custom modifiers on v-model used on the component https://eslint.vuejs.org/rules/no-custom-modifiers-on-v-model.html
disallow using deprecated object declaration on data (in Vue.js 3.0.0+) https://eslint.vuejs.org/rules/no-deprecated-data-object-declaration.html
disallow using deprecated `destroyed` and `beforeDestroy` lifecycle hooks (in Vue.js 3.0.0+) https://eslint.vuejs.org/rules/no-deprecated-destroyed-lifecycle.html
disallow using deprecated `$listeners` (in Vue.js 3.0.0+) https://eslint.vuejs.org/rules/no-deprecated-dollar-listeners-api.html
disallow using deprecated `$scopedSlots` (in Vue.js 3.0.0+) https://eslint.vuejs.org/rules/no-deprecated-dollar-scopedslots-api.html
disallow using deprecated events api (in Vue.js 3.0.0+) https://eslint.vuejs.org/rules/no-deprecated-events-api.html
disallow using deprecated filters syntax (in Vue.js 3.0.0+) https://eslint.vuejs.org/rules/no-deprecated-filter.html
disallow using deprecated the `functional` template (in Vue.js 3.0.0+) https://eslint.vuejs.org/rules/no-deprecated-functional-template.html
disallow using deprecated the `is` attribute on HTML elements (in Vue.js 3.0.0+) https://eslint.vuejs.org/rules/no-deprecated-html-element-is.html
disallow using deprecated `inline-template` attribute (in Vue.js 3.0.0+) https://eslint.vuejs.org/rules/no-deprecated-inline-template.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowVue3Compat"?: bool
...
}, ...],
])disallow deprecated `model` definition (in Vue.js 3.0.0+) https://eslint.vuejs.org/rules/no-deprecated-model-definition.html
disallow deprecated `this` access in props default function (in Vue.js 3.0.0+) https://eslint.vuejs.org/rules/no-deprecated-props-default-this.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"components"?: list.UniqueItems() & list.MinItems(1) & [...string]
...
}, ...],
])disallow using deprecated `tag` property on `RouterLink` (in Vue.js 3.0.0+) https://eslint.vuejs.org/rules/no-deprecated-router-link-tag-prop.html
disallow deprecated `scope` attribute (in Vue.js 2.5.0+) https://eslint.vuejs.org/rules/no-deprecated-scope-attribute.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignore"?: list.UniqueItems() & [...string]
...
}, ...],
])disallow deprecated `slot` attribute (in Vue.js 2.6.0+) https://eslint.vuejs.org/rules/no-deprecated-slot-attribute.html
disallow deprecated `slot-scope` attribute (in Vue.js 2.6.0+) https://eslint.vuejs.org/rules/no-deprecated-slot-scope-attribute.html
disallow use of deprecated `.sync` modifier on `v-bind` directive (in Vue.js 3.0.0+) https://eslint.vuejs.org/rules/no-deprecated-v-bind-sync.html
disallow deprecated `v-is` directive (in Vue.js 3.1.0+) https://eslint.vuejs.org/rules/no-deprecated-v-is.html
disallow using deprecated `.native` modifiers (in Vue.js 3.0.0+) https://eslint.vuejs.org/rules/no-deprecated-v-on-native-modifier.html
disallow using deprecated number (keycode) modifiers (in Vue.js 3.0.0+) https://eslint.vuejs.org/rules/no-deprecated-v-on-number-modifiers.html
disallow using deprecated `Vue.config.keyCodes` (in Vue.js 3.0.0+) https://eslint.vuejs.org/rules/no-deprecated-vue-config-keycodes.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"groups"?: [...]
...
}, ...],
])disallow duplication of field names https://eslint.vuejs.org/rules/no-dupe-keys.html
disallow duplicate conditions in `v-if` / `v-else-if` chains https://eslint.vuejs.org/rules/no-dupe-v-else-if.html
enforce `inheritAttrs` to be set to `false` when using `v-bind="$attrs"` https://eslint.vuejs.org/rules/no-duplicate-attr-inheritance.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowCoexistClass"?: bool
"allowCoexistStyle"?: bool
...
}, ...],
])disallow duplication of attributes https://eslint.vuejs.org/rules/no-duplicate-attributes.html
disallow the `<template>` `<script>` `<style>` block to be empty https://eslint.vuejs.org/rules/no-empty-component-block.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowObjectPatternsAsParameters"?: bool
...
}, ...],
])Disallow empty destructuring patterns in `<template>` https://eslint.vuejs.org/rules/no-empty-pattern.html
disallow `export` in `<script setup>` https://eslint.vuejs.org/rules/no-export-in-script-setup.html
disallow asynchronously registered `expose` https://eslint.vuejs.org/rules/no-expose-after-await.html
Disallow unnecessary parentheses in `<template>` https://eslint.vuejs.org/rules/no-extra-parens.html
require valid keys in model option https://eslint.vuejs.org/rules/no-invalid-model-keys.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"skipComments"?: bool
"skipStrings"?: bool
"skipTemplates"?: bool
"skipRegExps"?: bool
"skipHTMLAttributeValues"?: bool
"skipHTMLTextContents"?: bool
...
}, ...],
])disallow irregular whitespace in `.vue` files https://eslint.vuejs.org/rules/no-irregular-whitespace.html
disallow asynchronously registered lifecycle hooks https://eslint.vuejs.org/rules/no-lifecycle-after-await.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignoreAccessible"?: bool
...
}, ...],
])disallow unnecessary `<template>` https://eslint.vuejs.org/rules/no-lone-template.html
Disallow literal numbers that lose precision in `<template>` https://eslint.vuejs.org/rules/no-loss-of-precision.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignoreProperties"?: bool
...
}, ...],
])disallow multiple spaces https://eslint.vuejs.org/rules/no-multi-spaces.html
disallow to pass multiple objects into array to class https://eslint.vuejs.org/rules/no-multiple-objects-in-class.html
disallow to pass multiple arguments to scoped slots https://eslint.vuejs.org/rules/no-multiple-slot-args.html
disallow adding multiple root nodes to the template https://eslint.vuejs.org/rules/no-multiple-template-root.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"shallowOnly"?: bool
...
}, ...],
])disallow mutation of component props https://eslint.vuejs.org/rules/no-mutating-props.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"abrupt-closing-of-empty-comment"?: bool
"absence-of-digits-in-numeric-character-reference"?: bool
"cdata-in-html-content"?: bool
"character-reference-outside-unicode-range"?: bool
"control-character-in-input-stream"?: bool
"control-character-reference"?: bool
"eof-before-tag-name"?: bool
"eof-in-cdata"?: bool
"eof-in-comment"?: bool
"eof-in-tag"?: bool
"incorrectly-closed-comment"?: bool
"incorrectly-opened-comment"?: bool
"invalid-first-character-of-tag-name"?: bool
"missing-attribute-value"?: bool
"missing-end-tag-name"?: bool
"missing-semicolon-after-character-reference"?: bool
"missing-whitespace-between-attributes"?: bool
"nested-comment"?: bool
"noncharacter-character-reference"?: bool
"noncharacter-in-input-stream"?: bool
"null-character-reference"?: bool
"surrogate-character-reference"?: bool
"surrogate-in-input-stream"?: bool
"unexpected-character-in-attribute-name"?: bool
"unexpected-character-in-unquoted-attribute-value"?: bool
"unexpected-equals-sign-before-attribute-name"?: bool
"unexpected-null-character"?: bool
"unexpected-question-mark-instead-of-tag-name"?: bool
"unexpected-solidus-in-tag"?: bool
"unknown-named-character-reference"?: bool
"end-tag-with-attributes"?: bool
"duplicate-attribute"?: bool
"end-tag-with-trailing-solidus"?: bool
"non-void-html-element-start-tag-with-trailing-solidus"?: bool
"x-invalid-end-tag"?: bool
"x-invalid-namespace"?: bool
...
}, ...],
])disallow parsing errors in `<template>` https://eslint.vuejs.org/rules/no-parsing-error.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"presets"?: list.UniqueItems() & [...] & [..."all" | "vue" | "vue-router" | "nuxt"]
"custom"?: list.UniqueItems() & [...] & [...string]
"threshold"?: >=1
...
}, ...],
])disallow a potential typo in your component property https://eslint.vuejs.org/rules/no-potential-component-option-typo.html
disallow use of value wrapped by `ref()` (Composition API) as an operand https://eslint.vuejs.org/rules/no-ref-as-operand.html
disallow usages of ref objects that can lead to loss of reactivity https://eslint.vuejs.org/rules/no-ref-object-destructure.html
disallow usages of ref objects that can lead to loss of reactivity https://eslint.vuejs.org/rules/no-ref-object-reactivity-loss.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"autofix"?: bool
...
}, ...],
])enforce props with default values to be optional https://eslint.vuejs.org/rules/no-required-prop-with-default.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"disallowVueBuiltInComponents"?: bool
"disallowVue3BuiltInComponents"?: bool
...
}, ...],
])disallow the use of reserved names in component definitions https://eslint.vuejs.org/rules/no-reserved-component-names.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"reserved"?: [...]
"groups"?: [...]
...
}, ...],
])disallow overwriting reserved keys https://eslint.vuejs.org/rules/no-reserved-keys.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"vueVersion"?: 2 | 3
...
}, ...],
])disallow reserved names in props https://eslint.vuejs.org/rules/no-reserved-props.html
disallow specific block https://eslint.vuejs.org/rules/no-restricted-block.html
disallow asynchronously called restricted methods https://eslint.vuejs.org/rules/no-restricted-call-after-await.html
disallow specific classes in Vue components https://eslint.vuejs.org/rules/no-restricted-class.html
disallow specific component names https://eslint.vuejs.org/rules/no-restricted-component-names.html
disallow specific component option https://eslint.vuejs.org/rules/no-restricted-component-options.html
disallow specific custom event https://eslint.vuejs.org/rules/no-restricted-custom-event.html
disallow specific HTML elements https://eslint.vuejs.org/rules/no-restricted-html-elements.html
disallow specific props https://eslint.vuejs.org/rules/no-restricted-props.html
disallow specific attribute https://eslint.vuejs.org/rules/no-restricted-static-attribute.html
Disallow specified syntax in `<template>` https://eslint.vuejs.org/rules/no-restricted-syntax.html
disallow specific argument in `v-bind` https://eslint.vuejs.org/rules/no-restricted-v-bind.html
disallow specific argument in `v-on` https://eslint.vuejs.org/rules/no-restricted-v-on.html
disallow `v-if` directives on root element https://eslint.vuejs.org/rules/no-root-v-if.html
disallow usages that lose the reactivity of `props` passed to `setup` https://eslint.vuejs.org/rules/no-setup-props-destructure.html
disallow usages that lose the reactivity of `props` passed to `setup` https://eslint.vuejs.org/rules/no-setup-props-reactivity-loss.html
disallow side effects in computed properties https://eslint.vuejs.org/rules/no-side-effects-in-computed-properties.html
disallow spaces around equal signs in attribute https://eslint.vuejs.org/rules/no-spaces-around-equal-signs-in-attribute.html
Disallow sparse arrays in `<template>` https://eslint.vuejs.org/rules/no-sparse-arrays.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowBinding"?: bool
...
}, ...],
])disallow static inline `style` attributes https://eslint.vuejs.org/rules/no-static-inline-styles.html
disallow `key` attribute on `<template>` https://eslint.vuejs.org/rules/no-template-key.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allow"?: list.UniqueItems() & [...string]
...
}, ...],
])disallow variable declarations from shadowing variables declared in the outer scope https://eslint.vuejs.org/rules/no-template-shadow.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowReferrer"?: bool
"enforceDynamicLinks"?: "always" | "never"
...
}, ...],
])disallow target="_blank" attribute without rel="noopener noreferrer" https://eslint.vuejs.org/rules/no-template-target-blank.html
disallow mustaches in `<textarea>` https://eslint.vuejs.org/rules/no-textarea-mustache.html
disallow `this` usage in a `beforeRouteEnter` method https://eslint.vuejs.org/rules/no-this-in-before-route-enter.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignorePatterns"?: [...]
...
}, ...],
])disallow use of undefined components in `<template>` https://eslint.vuejs.org/rules/no-undef-components.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignores"?: list.UniqueItems() & [...string]
...
}, ...],
])disallow undefined properties https://eslint.vuejs.org/rules/no-undef-properties.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"version"?: string
"ignores"?: list.UniqueItems() & [
..."slot-scope-attribute" |
"dynamic-directive-arguments" |
"v-slot" |
"script-setup" |
"style-css-vars-injection" |
"v-model-argument" |
"v-model-custom-modifiers" |
"v-is" |
"is-attribute-with-vue-prefix" |
"v-memo" |
"v-bind-prop-modifier-shorthand" |
"v-bind-attr-modifier" |
"define-options" |
"define-slots" |
"define-model" |
"v-bind-same-name-shorthand"
]
...
}, ...],
])disallow unsupported Vue.js syntax on the specified version https://eslint.vuejs.org/rules/no-unsupported-features.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignoreWhenBindingPresent"?: bool
...
}, ...],
])disallow registering components that are not used inside templates https://eslint.vuejs.org/rules/no-unused-components.html
disallow unused emit declarations https://eslint.vuejs.org/rules/no-unused-emit-declarations.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"groups"?: list.UniqueItems() & [..."props" | "data" | "asyncData" | "computed" | "methods" | "setup"]
"deepData"?: bool
"ignorePublicMembers"?: bool
"unreferencedOptions"?: list.UniqueItems() & [..."unknownMemberAsUnreferenced" | "returnAsUnreferenced"]
...
}, ...],
])disallow unused properties https://eslint.vuejs.org/rules/no-unused-properties.html
disallow unused refs https://eslint.vuejs.org/rules/no-unused-refs.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignorePattern"?: string
...
}, ...],
])disallow unused variable definitions of v-for directives or scope attributes https://eslint.vuejs.org/rules/no-unused-vars.html
disallow use computed property like method https://eslint.vuejs.org/rules/no-use-computed-property-like-method.html
disallow using `v-else-if`/`v-else` on the same element as `v-for` https://eslint.vuejs.org/rules/no-use-v-else-with-v-for.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowUsingIterationVar"?: bool
...
}, ...],
])disallow using `v-if` on the same element as `v-for` https://eslint.vuejs.org/rules/no-use-v-if-with-v-for.html
Disallow unnecessary concatenation of literals or template literals in `<template>` https://eslint.vuejs.org/rules/no-useless-concat.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignoreIncludesComment"?: bool
"ignoreStringEscape"?: bool
...
}, ...],
])disallow unnecessary mustache interpolations https://eslint.vuejs.org/rules/no-useless-mustaches.html
disallow useless attribute on `<template>` https://eslint.vuejs.org/rules/no-useless-template-attributes.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignoreIncludesComment"?: bool
"ignoreStringEscape"?: bool
...
}, ...],
])disallow unnecessary `v-bind` directives https://eslint.vuejs.org/rules/no-useless-v-bind.html
disallow key of `<template v-for>` placed on child elements https://eslint.vuejs.org/rules/no-v-for-template-key-on-child.html
disallow `key` attribute on `<template v-for>` https://eslint.vuejs.org/rules/no-v-for-template-key.html
disallow use of v-html to prevent XSS attack https://eslint.vuejs.org/rules/no-v-html.html
disallow adding an argument to `v-model` used in custom component https://eslint.vuejs.org/rules/no-v-model-argument.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allow"?: list.UniqueItems() & [...string]
...
}, ...],
])disallow v-text / v-html on component https://eslint.vuejs.org/rules/no-v-text-v-html-on-component.html
disallow use of v-text https://eslint.vuejs.org/rules/no-v-text.html
disallow asynchronously registered `watch` https://eslint.vuejs.org/rules/no-watch-after-await.html
Enforce consistent line breaks after opening and before closing braces in `<template>` https://eslint.vuejs.org/rules/object-curly-newline.html
Enforce consistent spacing inside braces in `<template>` https://eslint.vuejs.org/rules/object-curly-spacing.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowAllPropertiesOnSameLine"?: bool
"allowMultiplePropertiesPerLine"?: bool
...
}, ...],
])Enforce placing object properties on separate lines in `<template>` https://eslint.vuejs.org/rules/object-property-newline.html
Require or disallow method and property shorthand syntax for object literals in `<template>` https://eslint.vuejs.org/rules/object-shorthand.html
enforce that each component should be in its own file https://eslint.vuejs.org/rules/one-component-per-file.html
Enforce consistent linebreak style for operators in `<template>` https://eslint.vuejs.org/rules/operator-linebreak.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"order"?: [...]
...
}, ...],
])enforce order of properties in components https://eslint.vuejs.org/rules/order-in-components.html
require or disallow padding lines between blocks https://eslint.vuejs.org/rules/padding-line-between-blocks.html
require or disallow padding lines in component definition https://eslint.vuejs.org/rules/padding-lines-in-component-definition.html
enforce use of `defineOptions` instead of default export. https://eslint.vuejs.org/rules/prefer-define-options.html
enforce import from 'vue' instead of import from '@vue/*' https://eslint.vuejs.org/rules/prefer-import-from-vue.html
enforce `Boolean` comes first in component prop types https://eslint.vuejs.org/rules/prefer-prop-type-boolean-first.html
require static class names in template to be in a separate `class` attribute https://eslint.vuejs.org/rules/prefer-separate-static-class.html
Require template literals instead of string concatenation in `<template>` https://eslint.vuejs.org/rules/prefer-template.html
require shorthand form attribute when `v-bind` value is `true` https://eslint.vuejs.org/rules/prefer-true-attribute-shorthand.html
enforce specific casing for the Prop name in Vue components https://eslint.vuejs.org/rules/prop-name-casing.html
Require quotes around object literal property names in `<template>` https://eslint.vuejs.org/rules/quote-props.html
require `v-bind:is` of `<component>` elements https://eslint.vuejs.org/rules/require-component-is.html
require default value for props https://eslint.vuejs.org/rules/require-default-prop.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"disallowFunctionalComponentFunction"?: bool
...
}, ...],
])require the component to be directly exported https://eslint.vuejs.org/rules/require-direct-export.html
require type definitions in emits https://eslint.vuejs.org/rules/require-emit-validator.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowProps"?: bool
...
}, ...],
])require `emits` option with name triggered by `$emit()` https://eslint.vuejs.org/rules/require-explicit-emits.html
require slots to be explicitly defined https://eslint.vuejs.org/rules/require-explicit-slots.html
require declare public properties using `expose` https://eslint.vuejs.org/rules/require-expose.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"defineProps"?: string
"defineEmits"?: string
"defineSlots"?: string
"useSlots"?: string
"useAttrs"?: string
...
}, ...],
])require a certain macro variable name https://eslint.vuejs.org/rules/require-macro-variable-name.html
require a name property in Vue components https://eslint.vuejs.org/rules/require-name-property.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"type"?: "JSDoc" | "line" | "block" | "any"
...
}, ...],
])require props to have a comment https://eslint.vuejs.org/rules/require-prop-comment.html
require prop type to be a constructor https://eslint.vuejs.org/rules/require-prop-type-constructor.html
require type definitions in props https://eslint.vuejs.org/rules/require-prop-types.html
enforce render function to always return value https://eslint.vuejs.org/rules/require-render-return.html
enforce properties of `$slots` to be used as a function https://eslint.vuejs.org/rules/require-slots-as-functions.html
require control the display of the content inside `<transition>` https://eslint.vuejs.org/rules/require-toggle-inside-transition.html
enforce adding type declarations to object props https://eslint.vuejs.org/rules/require-typed-object-prop.html
require `ref` and `shallowRef` functions to be strongly typed https://eslint.vuejs.org/rules/require-typed-ref.html
require `v-bind:key` with `v-for` directives https://eslint.vuejs.org/rules/require-v-for-key.html
enforce props default values to be valid https://eslint.vuejs.org/rules/require-valid-default-prop.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"treatUndefinedAsUnspecified"?: bool
...
}, ...],
])enforce that a return statement is present in computed property https://eslint.vuejs.org/rules/return-in-computed-property.html
enforce that a return statement is present in emits validator https://eslint.vuejs.org/rules/return-in-emits-validator.html
enforce consistent indentation in `<script>` https://eslint.vuejs.org/rules/script-indent.html
prevent `<script setup>` variables used in `<template>` to be marked as unused https://eslint.vuejs.org/rules/script-setup-uses-vars.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignoreWhenNoAttributes"?: bool
"ignoreWhenEmpty"?: bool
"ignores"?: list.UniqueItems() & [...string]
"externalIgnores"?: list.UniqueItems() & [...string]
...
}, ...],
])require a line break before and after the contents of a singleline element https://eslint.vuejs.org/rules/singleline-html-element-content-newline.html
enforce sort-keys in a manner that is compatible with order-in-components https://eslint.vuejs.org/rules/sort-keys.html
Enforce consistent spacing inside parentheses in `<template>` https://eslint.vuejs.org/rules/space-in-parens.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"int32Hint"?: bool
...
}, ...],
])Require spacing around infix operators in `<template>` https://eslint.vuejs.org/rules/space-infix-ops.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"words"?: bool
"nonwords"?: bool
"overrides"?: [string]: bool
...
}, ...],
])Enforce consistent spacing before or after unary operators in `<template>` https://eslint.vuejs.org/rules/space-unary-ops.html
enforce static class names order https://eslint.vuejs.org/rules/static-class-names-order.html
Require or disallow spacing around embedded expressions of template strings in `<template>` https://eslint.vuejs.org/rules/template-curly-spacing.html
disallow usage of `this` in template https://eslint.vuejs.org/rules/this-in-template.html
enforce usage of `exact` modifier on `v-on` https://eslint.vuejs.org/rules/use-v-on-exact.html
enforce `v-bind` directive style https://eslint.vuejs.org/rules/v-bind-style.html
enforce `v-for` directive's delimiter style https://eslint.vuejs.org/rules/v-for-delimiter-style.html
require key attribute for conditionally rendered repeated components https://eslint.vuejs.org/rules/v-if-else-key.html
enforce v-on event naming style on custom components in template https://eslint.vuejs.org/rules/v-on-event-hyphenation.html
enforce or forbid parentheses after method calls without arguments in `v-on` directives https://eslint.vuejs.org/rules/v-on-function-call.html
enforce writing style for handlers in `v-on` directives https://eslint.vuejs.org/rules/v-on-handler-style.html
enforce `v-on` directive style https://eslint.vuejs.org/rules/v-on-style.html
enforce `v-slot` directive style https://eslint.vuejs.org/rules/v-slot-style.html
require valid attribute names https://eslint.vuejs.org/rules/valid-attribute-name.html
enforce valid `defineEmits` compiler macro https://eslint.vuejs.org/rules/valid-define-emits.html
enforce valid `defineOptions` compiler macro https://eslint.vuejs.org/rules/valid-define-options.html
enforce valid `defineProps` compiler macro https://eslint.vuejs.org/rules/valid-define-props.html
require valid keys in model option https://eslint.vuejs.org/rules/valid-model-definition.html
enforce valid `nextTick` function calls https://eslint.vuejs.org/rules/valid-next-tick.html
enforce valid template root https://eslint.vuejs.org/rules/valid-template-root.html
enforce valid `.sync` modifier on `v-bind` directives https://eslint.vuejs.org/rules/valid-v-bind-sync.html
enforce valid `v-bind` directives https://eslint.vuejs.org/rules/valid-v-bind.html
enforce valid `v-cloak` directives https://eslint.vuejs.org/rules/valid-v-cloak.html
enforce valid `v-else-if` directives https://eslint.vuejs.org/rules/valid-v-else-if.html
enforce valid `v-else` directives https://eslint.vuejs.org/rules/valid-v-else.html
enforce valid `v-for` directives https://eslint.vuejs.org/rules/valid-v-for.html
enforce valid `v-html` directives https://eslint.vuejs.org/rules/valid-v-html.html
enforce valid `v-if` directives https://eslint.vuejs.org/rules/valid-v-if.html
enforce valid `v-is` directives https://eslint.vuejs.org/rules/valid-v-is.html
enforce valid `v-memo` directives https://eslint.vuejs.org/rules/valid-v-memo.html
enforce valid `v-model` directives https://eslint.vuejs.org/rules/valid-v-model.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"modifiers"?: [...]
...
}, ...],
])enforce valid `v-on` directives https://eslint.vuejs.org/rules/valid-v-on.html
enforce valid `v-once` directives https://eslint.vuejs.org/rules/valid-v-once.html
enforce valid `v-pre` directives https://eslint.vuejs.org/rules/valid-v-pre.html
enforce valid `v-show` directives https://eslint.vuejs.org/rules/valid-v-show.html
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowModifiers"?: bool
...
}, ...],
])enforce valid `v-slot` directives https://eslint.vuejs.org/rules/valid-v-slot.html
enforce valid `v-text` directives https://eslint.vuejs.org/rules/valid-v-text.html
Require that function overload signatures be consecutive https://typescript-eslint.io/rules/adjacent-overload-signatures
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// The array type expected for mutable cases.
"default"?: _
// The array type expected for readonly cases. If omitted, the value for `default` will be used.
"readonly"?: _
...
}, ...],
])Require consistently using either `T[]` or `Array<T>` for arrays https://typescript-eslint.io/rules/array-type
Disallow awaiting a value that is not a Thenable https://typescript-eslint.io/rules/await-thenable
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ts-expect-error"?: _
"ts-ignore"?: _
"ts-nocheck"?: _
"ts-check"?: _
"minimumDescriptionLength"?: number
...
}, ...],
])Disallow `@ts-<directive>` comments or require descriptions after directives https://typescript-eslint.io/rules/ban-ts-comment
Disallow `// tslint:<rule-flag>` comments https://typescript-eslint.io/rules/ban-tslint-comment
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"types"?: [string]: _
"extendDefaults"?: bool
...
}, ...],
])Disallow certain types https://typescript-eslint.io/rules/ban-types
Disallow or enforce spaces inside of blocks after opening block and before closing block https://typescript-eslint.io/rules/block-spacing
Enforce consistent brace style for blocks https://typescript-eslint.io/rules/brace-style
Enforce that literals on classes are exposed in a consistent style https://typescript-eslint.io/rules/class-literal-property-style
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Allows specified method names to be ignored with this rule
"exceptMethods"?: [...string]
// Enforces that functions used as instance field initializers utilize `this`
"enforceForClassFields"?: bool
// Ignore members marked with the `override` modifier
"ignoreOverrideMethods"?: bool
// Ignore classes that specifically implement some interface
"ignoreClassesThatImplementAnInterface"?: matchN(1, [bool, "public-fields"])
...
}, ...],
])Enforce that class methods utilize `this` https://typescript-eslint.io/rules/class-methods-use-this
Require or disallow trailing commas https://typescript-eslint.io/rules/comma-dangle
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"before"?: bool
"after"?: bool
...
}, ...],
])Enforce consistent spacing before and after commas https://typescript-eslint.io/rules/comma-spacing
Enforce specifying generic type arguments on type annotation or constructor name of a constructor call https://typescript-eslint.io/rules/consistent-generic-constructors
matchN(1, [ #ruleNumber, #ruleString, list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), "record" | "index-signature", ...], ])
Require or disallow the `Record` type https://typescript-eslint.io/rules/consistent-indexed-object-style
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"treatUndefinedAsUnspecified"?: bool
...
}, ...],
])Require `return` statements to either always or never specify values https://typescript-eslint.io/rules/consistent-return
Enforce consistent usage of type assertions https://typescript-eslint.io/rules/consistent-type-assertions
matchN(1, [ #ruleNumber, #ruleString, list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), "interface" | "type", ...], ])
Enforce type definitions to consistently use either `interface` or `type` https://typescript-eslint.io/rules/consistent-type-definitions
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"fixMixedExportsWithInlineTypeSpecifier"?: bool
...
}, ...],
])Enforce consistent usage of type exports https://typescript-eslint.io/rules/consistent-type-exports
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"disallowTypeAnnotations"?: bool
"fixStyle"?: "separate-type-imports" | "inline-type-imports"
"prefer"?: "type-imports" | "no-type-imports"
...
}, ...],
])Enforce consistent usage of type imports https://typescript-eslint.io/rules/consistent-type-imports
Enforce default parameters to be last https://typescript-eslint.io/rules/default-param-last
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowKeywords"?: bool
"allowPattern"?: string
"allowPrivateClassPropertyAccess"?: bool
"allowProtectedClassPropertyAccess"?: bool
"allowIndexSignaturePropertyAccess"?: bool
...
}, ...],
])Enforce dot notation whenever possible https://typescript-eslint.io/rules/dot-notation
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether to allow arrow functions that start with the `void` keyword.
"allowConciseArrowFunctionExpressionsStartingWithVoid"?: bool
// Whether to ignore function expressions (functions which are not part of a declaration).
"allowExpressions"?: bool
// Whether to ignore functions immediately returning another function expression.
"allowHigherOrderFunctions"?: bool
// Whether to ignore type annotations on the variable of function expressions.
"allowTypedFunctionExpressions"?: bool
// Whether to ignore arrow functions immediately returning a `as const` value.
"allowDirectConstAssertionInArrowFunctions"?: bool
// Whether to ignore functions that don't have generic type parameters.
"allowFunctionsWithoutTypeParameters"?: bool
// An array of function/method names that will not have their arguments or return values checked.
"allowedNames"?: [...string]
// Whether to ignore immediately invoked function expressions (IIFEs).
"allowIIFEs"?: bool
...
}, ...],
])Require explicit return types on functions and class methods https://typescript-eslint.io/rules/explicit-function-return-type
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"accessibility"?: _
"overrides"?: close({
"accessors"?: _
"constructors"?: _
"methods"?: _
"properties"?: _
"parameterProperties"?: _
})
"ignoredMethodNames"?: [...string]
...
}, ...],
])Require explicit accessibility modifiers on class properties and methods https://typescript-eslint.io/rules/explicit-member-accessibility
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether to ignore arguments that are explicitly typed as `any`.
"allowArgumentsExplicitlyTypedAsAny"?: bool
// Whether to ignore return type annotations on body-less arrow functions that
// return an `as const` type assertion.
// You must still type the parameters of the function.
"allowDirectConstAssertionInArrowFunctions"?: bool
// An array of function/method names that will not have their arguments or return values checked.
"allowedNames"?: [...string]
// Whether to ignore return type annotations on functions immediately returning
// another function expression.
// You must still type the parameters of the function.
"allowHigherOrderFunctions"?: bool
// Whether to ignore type annotations on the variable of a function expression.
"allowTypedFunctionExpressions"?: bool
...
}, ...],
])Require explicit return and argument types on exported functions' and classes' public class methods https://typescript-eslint.io/rules/explicit-module-boundary-types
Require or disallow spacing between function identifiers and their invocations https://typescript-eslint.io/rules/func-call-spacing
Enforce consistent indentation https://typescript-eslint.io/rules/indent
Require or disallow initialization in variable declarations https://typescript-eslint.io/rules/init-declarations
Enforce consistent spacing between property names and type annotations in types and interfaces https://typescript-eslint.io/rules/key-spacing
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"before"?: bool
"after"?: bool
"overrides"?: close({
"abstract"?: close({
"before"?: bool
"after"?: bool
})
"as"?: close({
"before"?: bool
"after"?: bool
})
"async"?: close({
"before"?: bool
"after"?: bool
})
"await"?: close({
"before"?: bool
"after"?: bool
})
"boolean"?: close({
"before"?: bool
"after"?: bool
})
"break"?: close({
"before"?: bool
"after"?: bool
})
"byte"?: close({
"before"?: bool
"after"?: bool
})
"case"?: close({
"before"?: bool
"after"?: bool
})
"catch"?: close({
"before"?: bool
"after"?: bool
})
"char"?: close({
"before"?: bool
"after"?: bool
})
"class"?: close({
"before"?: bool
"after"?: bool
})
"const"?: close({
"before"?: bool
"after"?: bool
})
"continue"?: close({
"before"?: bool
"after"?: bool
})
"debugger"?: close({
"before"?: bool
"after"?: bool
})
"default"?: close({
"before"?: bool
"after"?: bool
})
"delete"?: close({
"before"?: bool
"after"?: bool
})
"do"?: close({
"before"?: bool
"after"?: bool
})
"double"?: close({
"before"?: bool
"after"?: bool
})
"else"?: close({
"before"?: bool
"after"?: bool
})
"enum"?: close({
"before"?: bool
"after"?: bool
})
"export"?: close({
"before"?: bool
"after"?: bool
})
"extends"?: close({
"before"?: bool
"after"?: bool
})
"false"?: close({
"before"?: bool
"after"?: bool
})
"final"?: close({
"before"?: bool
"after"?: bool
})
"finally"?: close({
"before"?: bool
"after"?: bool
})
"float"?: close({
"before"?: bool
"after"?: bool
})
"for"?: close({
"before"?: bool
"after"?: bool
})
"from"?: close({
"before"?: bool
"after"?: bool
})
"function"?: close({
"before"?: bool
"after"?: bool
})
"get"?: close({
"before"?: bool
"after"?: bool
})
"goto"?: close({
"before"?: bool
"after"?: bool
})
"if"?: close({
"before"?: bool
"after"?: bool
})
"implements"?: close({
"before"?: bool
"after"?: bool
})
"import"?: close({
"before"?: bool
"after"?: bool
})
"in"?: close({
"before"?: bool
"after"?: bool
})
"instanceof"?: close({
"before"?: bool
"after"?: bool
})
"int"?: close({
"before"?: bool
"after"?: bool
})
"interface"?: close({
"before"?: bool
"after"?: bool
})
"let"?: close({
"before"?: bool
"after"?: bool
})
"long"?: close({
"before"?: bool
"after"?: bool
})
"native"?: close({
"before"?: bool
"after"?: bool
})
"new"?: close({
"before"?: bool
"after"?: bool
})
"null"?: close({
"before"?: bool
"after"?: bool
})
"of"?: close({
"before"?: bool
"after"?: bool
})
"package"?: close({
"before"?: bool
"after"?: bool
})
"private"?: close({
"before"?: bool
"after"?: bool
})
"protected"?: close({
"before"?: bool
"after"?: bool
})
"public"?: close({
"before"?: bool
"after"?: bool
})
"return"?: close({
"before"?: bool
"after"?: bool
})
"set"?: close({
"before"?: bool
"after"?: bool
})
"short"?: close({
"before"?: bool
"after"?: bool
})
"static"?: close({
"before"?: bool
"after"?: bool
})
"super"?: close({
"before"?: bool
"after"?: bool
})
"switch"?: close({
"before"?: bool
"after"?: bool
})
"synchronized"?: close({
"before"?: bool
"after"?: bool
})
"this"?: close({
"before"?: bool
"after"?: bool
})
"throw"?: close({
"before"?: bool
"after"?: bool
})
"throws"?: close({
"before"?: bool
"after"?: bool
})
"transient"?: close({
"before"?: bool
"after"?: bool
})
"true"?: close({
"before"?: bool
"after"?: bool
})
"try"?: close({
"before"?: bool
"after"?: bool
})
"typeof"?: close({
"before"?: bool
"after"?: bool
})
"var"?: close({
"before"?: bool
"after"?: bool
})
"void"?: close({
"before"?: bool
"after"?: bool
})
"volatile"?: close({
"before"?: bool
"after"?: bool
})
"while"?: close({
"before"?: bool
"after"?: bool
})
"with"?: close({
"before"?: bool
"after"?: bool
})
"yield"?: close({
"before"?: bool
"after"?: bool
})
"type"?: close({
"before"?: bool
"after"?: bool
})
})
...
}, ...],
])Enforce consistent spacing before and after keywords https://typescript-eslint.io/rules/keyword-spacing
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"beforeBlockComment"?: bool
"afterBlockComment"?: bool
"beforeLineComment"?: bool
"afterLineComment"?: bool
"allowBlockStart"?: bool
"allowBlockEnd"?: bool
"allowClassStart"?: bool
"allowClassEnd"?: bool
"allowObjectStart"?: bool
"allowObjectEnd"?: bool
"allowArrayStart"?: bool
"allowArrayEnd"?: bool
"allowInterfaceStart"?: bool
"allowInterfaceEnd"?: bool
"allowTypeStart"?: bool
"allowTypeEnd"?: bool
"allowEnumStart"?: bool
"allowEnumEnd"?: bool
"allowModuleStart"?: bool
"allowModuleEnd"?: bool
"ignorePattern"?: string
"applyDefaultIgnorePatterns"?: bool
...
}, ...],
])Require empty lines around comments https://typescript-eslint.io/rules/lines-around-comment
Require or disallow an empty line between class members https://typescript-eslint.io/rules/lines-between-class-members
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"maximum"?: int & >=0
"max"?: int & >=0
"countVoidThis"?: bool
...
}, ...],
])Enforce a maximum number of parameters in function definitions https://typescript-eslint.io/rules/max-params
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"multiline"?: close({
"delimiter"?: _
"requireLast"?: bool
})
"singleline"?: close({
"delimiter"?: _
"requireLast"?: bool
})
"overrides"?: close({
"interface"?: _
"typeLiteral"?: _
})
"multilineDetection"?: "brackets" | "last-member"
...
}, ...],
])Require a specific member delimiter style for interfaces and type literals https://typescript-eslint.io/rules/member-delimiter-style
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"default"?: _
"classes"?: _
"classExpressions"?: _
"interfaces"?: _
"typeLiterals"?: _
...
}, ...],
])Require a consistent member declaration order https://typescript-eslint.io/rules/member-ordering
Enforce using a particular method signature syntax https://typescript-eslint.io/rules/method-signature-style
Enforce naming conventions for everything across a codebase https://typescript-eslint.io/rules/naming-convention
Disallow generic `Array` constructors https://typescript-eslint.io/rules/no-array-constructor
Disallow using the `delete` operator on array values https://typescript-eslint.io/rules/no-array-delete
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignoredTypeNames"?: [...string]
...
}, ...],
])Require `.toString()` to only be called on objects which provide useful information when stringified https://typescript-eslint.io/rules/no-base-to-string
Disallow non-null assertion in locations that may be confusing https://typescript-eslint.io/rules/no-confusing-non-null-assertion
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignoreArrowShorthand"?: bool
"ignoreVoidOperator"?: bool
...
}, ...],
])Require expressions of type void to appear in statement position https://typescript-eslint.io/rules/no-confusing-void-expression
Disallow duplicate class members https://typescript-eslint.io/rules/no-dupe-class-members
Disallow duplicate enum member values https://typescript-eslint.io/rules/no-duplicate-enum-values
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignoreIntersections"?: bool
"ignoreUnions"?: bool
...
}, ...],
])Disallow duplicate constituents of union or intersection types https://typescript-eslint.io/rules/no-duplicate-type-constituents
Disallow using the `delete` operator on computed key expressions https://typescript-eslint.io/rules/no-dynamic-delete
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allow"?: list.UniqueItems() & [
..."functions" |
"arrowFunctions" |
"generatorFunctions" |
"methods" |
"generatorMethods" |
"getters" |
"setters" |
"constructors" |
"private-constructors" |
"protected-constructors" |
"asyncFunctions" |
"asyncMethods" |
"decoratedFunctions" |
"overrideMethods"
]
...
}, ...],
])Disallow empty functions https://typescript-eslint.io/rules/no-empty-function
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowSingleExtends"?: bool
...
}, ...],
])Disallow the declaration of empty interfaces https://typescript-eslint.io/rules/no-empty-interface
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether to enable auto-fixing in which the `any` type is converted to the `unknown` type.
"fixToUnknown"?: bool
// Whether to ignore rest parameter arrays.
"ignoreRestArgs"?: bool
...
}, ...],
])Disallow the `any` type https://typescript-eslint.io/rules/no-explicit-any
Disallow extra non-null assertions https://typescript-eslint.io/rules/no-extra-non-null-assertion
Disallow unnecessary parentheses https://typescript-eslint.io/rules/no-extra-parens
Disallow unnecessary semicolons https://typescript-eslint.io/rules/no-extra-semi
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether to allow extraneous classes that contain only a constructor.
"allowConstructorOnly"?: bool
// Whether to allow extraneous classes that have no body (i.e. are empty).
"allowEmpty"?: bool
// Whether to allow extraneous classes that only contain static members.
"allowStaticOnly"?: bool
// Whether to allow extraneous classes that include a decorator.
"allowWithDecorator"?: bool
...
}, ...],
])Disallow classes used as namespaces https://typescript-eslint.io/rules/no-extraneous-class
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether to ignore `void` expressions.
"ignoreVoid"?: bool
// Whether to ignore async IIFEs (Immediately Invoked Function Expressions).
"ignoreIIFE"?: bool
"allowForKnownSafePromises"?: [...matchN(1, [
string,
close({
"from"!: "file"
"name"!: matchN(1, [string, list.MinItems(1) & list.UniqueItems() & [...string]])
"path"?: string
}), close({
"from"!: "lib"
"name"!: matchN(1, [string, list.MinItems(1) & list.UniqueItems() & [...string]])
}), close({
"from"!: "package"
"name"!: matchN(1, [string, list.MinItems(1) & list.UniqueItems() & [...string]])
"package"!: string
}),
])]
...
}, ...],
])Require Promise-like statements to be handled appropriately https://typescript-eslint.io/rules/no-floating-promises
Disallow iterating over an array with a for-in loop https://typescript-eslint.io/rules/no-for-in-array
Disallow the use of `eval()`-like methods https://typescript-eslint.io/rules/no-implied-eval
Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers https://typescript-eslint.io/rules/no-import-type-side-effects
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"ignoreParameters"?: bool
"ignoreProperties"?: bool
...
}, ...],
])Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean https://typescript-eslint.io/rules/no-inferrable-types
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"capIsConstructor"?: bool
...
}, ...],
])Disallow `this` keywords outside of classes or class-like objects https://typescript-eslint.io/rules/no-invalid-this
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowInGenericTypeArguments"?: matchN(1, [bool, list.MinItems(1) & [...string]])
"allowAsThisParameter"?: bool
...
}, ...],
])Disallow `void` type outside of generic or return types https://typescript-eslint.io/rules/no-invalid-void-type
Disallow function declarations that contain unsafe references inside loop statements https://typescript-eslint.io/rules/no-loop-func
Disallow literal numbers that lose precision https://typescript-eslint.io/rules/no-loss-of-precision
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"detectObjects"?: bool
"enforceConst"?: bool
"ignore"?: list.UniqueItems() & [...matchN(>=1, [number, =~"^[+-]?(?:0|[1-9][0-9]*)n$"])]
"ignoreArrayIndexes"?: bool
"ignoreDefaultValues"?: bool
"ignoreClassFieldInitialValues"?: bool
"ignoreNumericLiteralTypes"?: bool
"ignoreEnums"?: bool
"ignoreReadonlyClassProperties"?: bool
"ignoreTypeIndexes"?: bool
...
}, ...],
])Disallow magic numbers https://typescript-eslint.io/rules/no-magic-numbers
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"checkNever"?: bool
...
}, ...],
])Disallow the `void` operator except when used to discard a value https://typescript-eslint.io/rules/no-meaningless-void-operator
Enforce valid definition of `new` and `constructor` https://typescript-eslint.io/rules/no-misused-new
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"checksConditionals"?: bool
"checksVoidReturn"?: matchN(1, [
bool,
close({
"arguments"?: bool
"attributes"?: bool
"properties"?: bool
"returns"?: bool
"variables"?: bool
}),
])
"checksSpreads"?: bool
...
}, ...],
])Disallow Promises in places not designed to handle them https://typescript-eslint.io/rules/no-misused-promises
Disallow enums from having both number and string members https://typescript-eslint.io/rules/no-mixed-enums
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether to allow `declare` with custom TypeScript namespaces.
"allowDeclarations"?: bool
// Whether to allow `declare` with custom TypeScript namespaces inside definition files.
"allowDefinitionFiles"?: bool
...
}, ...],
])Disallow TypeScript namespaces https://typescript-eslint.io/rules/no-namespace
Disallow non-null assertions in the left operand of a nullish coalescing operator https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing
Disallow non-null assertions after an optional chain expression https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain
Disallow non-null assertions using the `!` postfix operator https://typescript-eslint.io/rules/no-non-null-assertion
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"builtinGlobals"?: bool
"ignoreDeclarationMerge"?: bool
...
}, ...],
])Disallow variable redeclaration https://typescript-eslint.io/rules/no-redeclare
Disallow members of unions and intersections that do nothing or override type information https://typescript-eslint.io/rules/no-redundant-type-constituents
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Patterns of import paths to allow requiring from.
"allow"?: [...string]
...
}, ...],
])Disallow invocation of `require()` https://typescript-eslint.io/rules/no-require-imports
Disallow specified modules when loaded by `import` https://typescript-eslint.io/rules/no-restricted-imports
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"builtinGlobals"?: bool
"hoist"?: "all" | "functions" | "never"
"allow"?: [...string]
"ignoreOnInitialization"?: bool
"ignoreTypeValueShadow"?: bool
"ignoreFunctionTypeParameterNameValueShadow"?: bool
...
}, ...],
])Disallow variable declarations from shadowing variables declared in the outer scope https://typescript-eslint.io/rules/no-shadow
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether to ignore destructurings, such as `const { props, state } = this`.
"allowDestructuring"?: bool
// Names to ignore, such as ["self"] for `const self = this;`.
"allowedNames"?: [...string]
...
}, ...],
])Disallow aliasing `this` https://typescript-eslint.io/rules/no-this-alias
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowThrowingAny"?: bool
"allowThrowingUnknown"?: bool
...
}, ...],
])Disallow throwing literals as exceptions https://typescript-eslint.io/rules/no-throw-literal
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether to allow direct one-to-one type aliases.
"allowAliases"?: _
// Whether to allow type aliases for callbacks.
"allowCallbacks"?: _
// Whether to allow type aliases for conditional types.
"allowConditionalTypes"?: _
// Whether to allow type aliases with constructors.
"allowConstructors"?: _
// Whether to allow type aliases with object literal types.
"allowLiterals"?: _
// Whether to allow type aliases with mapped types.
"allowMappedTypes"?: _
// Whether to allow type aliases with tuple types.
"allowTupleTypes"?: _
// Whether to allow type aliases with generic types.
"allowGenerics"?: _
...
}, ...],
])Disallow type aliases https://typescript-eslint.io/rules/no-type-alias
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether to allow comparisons between nullable boolean variables and `true`.
"allowComparingNullableBooleansToTrue"?: bool
// Whether to allow comparisons between nullable boolean variables and `false`.
"allowComparingNullableBooleansToFalse"?: bool
...
}, ...],
])Disallow unnecessary equality comparisons against boolean literals https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether to ignore constant loop conditions, such as `while (true)`.
"allowConstantLoopConditions"?: bool
// Whether to not error when running with a tsconfig that has strictNullChecks turned.
"allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing"?: bool
...
}, ...],
])Disallow conditionals where the type is always truthy or always falsy https://typescript-eslint.io/rules/no-unnecessary-condition
Disallow unnecessary namespace qualifiers https://typescript-eslint.io/rules/no-unnecessary-qualifier
Disallow unnecessary template expressions https://typescript-eslint.io/rules/no-unnecessary-template-expression
Disallow type arguments that are equal to the default https://typescript-eslint.io/rules/no-unnecessary-type-arguments
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// A list of type names to ignore.
"typesToIgnore"?: [...string]
...
}, ...],
])Disallow type assertions that do not change the type of an expression https://typescript-eslint.io/rules/no-unnecessary-type-assertion
Disallow unnecessary constraints on generic types https://typescript-eslint.io/rules/no-unnecessary-type-constraint
Disallow calling a function with a value with type `any` https://typescript-eslint.io/rules/no-unsafe-argument
Disallow assigning a value with type `any` to variables and properties https://typescript-eslint.io/rules/no-unsafe-assignment
Disallow calling a value with type `any` https://typescript-eslint.io/rules/no-unsafe-call
Disallow unsafe declaration merging https://typescript-eslint.io/rules/no-unsafe-declaration-merging
Disallow comparing an enum value with a non-enum value https://typescript-eslint.io/rules/no-unsafe-enum-comparison
Disallow member access on a value with type `any` https://typescript-eslint.io/rules/no-unsafe-member-access
Disallow returning a value with type `any` from a function https://typescript-eslint.io/rules/no-unsafe-return
Require unary negation to take a number https://typescript-eslint.io/rules/no-unsafe-unary-minus
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowShortCircuit"?: bool
"allowTernary"?: bool
"allowTaggedTemplates"?: bool
"enforceForJSX"?: bool
...
}, ...],
])Disallow unused expressions https://typescript-eslint.io/rules/no-unused-expressions
Disallow unused variables https://typescript-eslint.io/rules/no-unused-vars
Disallow the use of variables before they are defined https://typescript-eslint.io/rules/no-use-before-define
Disallow unnecessary constructors https://typescript-eslint.io/rules/no-useless-constructor
Disallow empty exports that don't change anything in a module file https://typescript-eslint.io/rules/no-useless-empty-export
Disallow unnecessary template expressions https://typescript-eslint.io/rules/no-useless-template-literals
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Patterns of import paths to allow requiring from.
"allow"?: [...string]
...
}, ...],
])Disallow `require` statements except in import statements https://typescript-eslint.io/rules/no-var-requires
Enforce non-null assertions over explicit type casts https://typescript-eslint.io/rules/non-nullable-type-assertion-style
Enforce consistent spacing inside braces https://typescript-eslint.io/rules/object-curly-spacing
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowThrowingAny"?: bool
"allowThrowingUnknown"?: bool
...
}, ...],
])Disallow throwing non-`Error` values as exceptions https://typescript-eslint.io/rules/only-throw-error
Require or disallow padding lines between statements https://typescript-eslint.io/rules/padding-line-between-statements
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allow"?: [..._]
"prefer"?: "class-property" | "parameter-property"
...
}, ...],
])Require or disallow parameter properties in class constructors https://typescript-eslint.io/rules/parameter-properties
Enforce the use of `as const` over literal type https://typescript-eslint.io/rules/prefer-as-const
Require destructuring from arrays and/or objects https://typescript-eslint.io/rules/prefer-destructuring
Require each enum member value to be explicitly initialized https://typescript-eslint.io/rules/prefer-enum-initializers
Enforce the use of Array.prototype.find() over Array.prototype.filter() followed by [0] when looking for a single result https://typescript-eslint.io/rules/prefer-find
Enforce the use of `for-of` loop over the standard `for` loop where possible https://typescript-eslint.io/rules/prefer-for-of
Enforce using function types instead of interfaces with call signatures https://typescript-eslint.io/rules/prefer-function-type
Enforce `includes` method over `indexOf` method https://typescript-eslint.io/rules/prefer-includes
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowBitwiseExpressions"?: bool
...
}, ...],
])Require all enum members to be literal values https://typescript-eslint.io/rules/prefer-literal-enum-member
Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules https://typescript-eslint.io/rules/prefer-namespace-keyword
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing"?: bool
"ignoreConditionalTests"?: bool
"ignoreMixedLogicalExpressions"?: bool
"ignorePrimitives"?: matchN(1, [
{
"bigint"?: bool
"boolean"?: bool
"number"?: bool
"string"?: bool
...
},
true,
])
"ignoreTernaryTests"?: bool
...
}, ...],
])Enforce using the nullish coalescing operator instead of logical assignments or chaining https://typescript-eslint.io/rules/prefer-nullish-coalescing
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Check operands that are typed as `any` when inspecting "loose boolean" operands.
"checkAny"?: bool
// Check operands that are typed as `unknown` when inspecting "loose boolean" operands.
"checkUnknown"?: bool
// Check operands that are typed as `string` when inspecting "loose boolean" operands.
"checkString"?: bool
// Check operands that are typed as `number` when inspecting "loose boolean" operands.
"checkNumber"?: bool
// Check operands that are typed as `boolean` when inspecting "loose boolean" operands.
"checkBoolean"?: bool
// Check operands that are typed as `bigint` when inspecting "loose boolean" operands.
"checkBigInt"?: bool
// Skip operands that are not typed with `null` and/or `undefined` when
// inspecting "loose boolean" operands.
"requireNullish"?: bool
// Allow autofixers that will change the return type of the expression. This
// option is considered unsafe as it may break the build.
"allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing"?: bool
...
}, ...],
])Enforce using concise optional chain expressions instead of chained logical ands, negated logical ors, or empty objects https://typescript-eslint.io/rules/prefer-optional-chain
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowEmptyReject"?: bool
...
}, ...],
])Require using Error objects as Promise rejection reasons https://typescript-eslint.io/rules/prefer-promise-reject-errors
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"onlyInlineLambdas"?: bool
...
}, ...],
])Require private members to be marked as `readonly` if they're never modified outside of the constructor https://typescript-eslint.io/rules/prefer-readonly
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allow"?: [...matchN(1, [
string,
close({
"from"!: "file"
"name"!: matchN(1, [string, list.MinItems(1) & list.UniqueItems() & [...string]])
"path"?: string
}), close({
"from"!: "lib"
"name"!: matchN(1, [string, list.MinItems(1) & list.UniqueItems() & [...string]])
}), close({
"from"!: "package"
"name"!: matchN(1, [string, list.MinItems(1) & list.UniqueItems() & [...string]])
"package"!: string
}),
])]
"checkParameterProperties"?: bool
"ignoreInferredTypes"?: bool
"treatMethodsAsReadonly"?: bool
...
}, ...],
])Require function parameters to be typed as `readonly` to prevent accidental mutation of inputs https://typescript-eslint.io/rules/prefer-readonly-parameter-types
Enforce using type parameter when calling `Array#reduce` instead of casting https://typescript-eslint.io/rules/prefer-reduce-type-parameter
Enforce `RegExp#exec` over `String#match` if no global flag is provided https://typescript-eslint.io/rules/prefer-regexp-exec
Enforce that `this` is used when only `this` type is returned https://typescript-eslint.io/rules/prefer-return-this-type
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether to allow equality checks against the first or last element of a string.
"allowSingleElementEquality"?: "always" | "never"
...
}, ...],
])Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings https://typescript-eslint.io/rules/prefer-string-starts-ends-with
Enforce using `@ts-expect-error` over `@ts-ignore` https://typescript-eslint.io/rules/prefer-ts-expect-error
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether to consider `any` and `unknown` to be Promises.
"allowAny"?: bool
// Any extra names of classes or interfaces to be considered Promises.
"allowedPromiseNames"?: [...string]
"checkArrowFunctions"?: bool
"checkFunctionDeclarations"?: bool
"checkFunctionExpressions"?: bool
"checkMethodDeclarations"?: bool
...
}, ...],
])Require any function or method that returns a Promise to be marked async https://typescript-eslint.io/rules/promise-function-async
matchN(1, [
#ruleNumber,
#ruleString,
matchN(1, [[
matchN(1, [#ruleNumber, #ruleString]),
"double" | "single" | "backtick",
], [matchN(1, [#ruleNumber, #ruleString]), "double" | "single" | "backtick", {
// allows strings to use single-quotes or double-quotes so long as the string
// contains a quote that would have to be escaped otherwise
"avoidEscape"?: bool
// allows strings to use backticks
"allowTemplateLiterals"?: bool
// Deprecated: The object property avoid-escape is deprecated; please use the
// object property avoidEscape instead.
"avoid-escape"?: bool
...
}]]),
])DEPRECATED. Enforce the consistent use of either backticks, double, or single quotes https://typescript-eslint.io/rules/quotes
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether to ignore arrays in which all elements are strings.
"ignoreStringArrays"?: bool
...
}, ...],
])Require `Array#sort` and `Array#toSorted` calls to always provide a `compareFunction` https://typescript-eslint.io/rules/require-array-sort-compare
Disallow async functions which do not return promises and have no `await` expression https://typescript-eslint.io/rules/require-await
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether to allow `any` typed values.
"allowAny"?: bool
// Whether to allow `boolean` typed values.
"allowBoolean"?: bool
// Whether to allow potentially `null` or `undefined` typed values.
"allowNullish"?: bool
// Whether to allow `bigint`/`number` typed values and `string` typed values to be added together.
"allowNumberAndString"?: bool
// Whether to allow `regexp` typed values.
"allowRegExp"?: bool
// Whether to skip compound assignments such as `+=`.
"skipCompoundAssignments"?: bool
...
}, ...],
])Require both operands of addition to be the same type and be `bigint`, `number`, or `string` https://typescript-eslint.io/rules/restrict-plus-operands
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether to allow `any` typed values in template expressions.
"allowAny"?: bool
// Whether to allow `array` typed values in template expressions.
"allowArray"?: bool
// Whether to allow `boolean` typed values in template expressions.
"allowBoolean"?: bool
// Whether to allow `nullish` typed values in template expressions.
"allowNullish"?: bool
// Whether to allow `number` typed values in template expressions.
"allowNumber"?: bool
// Whether to allow `regexp` typed values in template expressions.
"allowRegExp"?: bool
// Whether to allow `never` typed values in template expressions.
"allowNever"?: bool
...
}, ...],
])Enforce template literal expressions to be of `string` type https://typescript-eslint.io/rules/restrict-template-expressions
matchN(1, [ #ruleNumber, #ruleString, list.MaxItems(2) & [ matchN(1, [#ruleNumber, #ruleString]), matchN(1, [ "never", "error-handling-correctness-only", "in-try-catch", "always", ]), ..., ], ])
Enforce consistent awaiting of returned promises https://typescript-eslint.io/rules/return-await
Require or disallow semicolons instead of ASI https://typescript-eslint.io/rules/semi
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether to check intersection types.
"checkIntersections"?: bool
// Whether to check union types.
"checkUnions"?: bool
// Whether to sort using case sensitive sorting.
"caseSensitive"?: bool
// Ordering of the groups.
"groupOrder"?: [
..."conditional" |
"function" |
"import" |
"intersection" |
"keyword" |
"nullish" |
"literal" |
"named" |
"object" |
"operator" |
"tuple" |
"union"
]
...
}, ...],
])Enforce constituents of a type union/intersection to be sorted alphabetically https://typescript-eslint.io/rules/sort-type-constituents
Enforce consistent spacing before blocks https://typescript-eslint.io/rules/space-before-blocks
Enforce consistent spacing before function parenthesis https://typescript-eslint.io/rules/space-before-function-paren
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"int32Hint"?: bool
...
}, ...],
])Require spacing around infix operators https://typescript-eslint.io/rules/space-infix-ops
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"allowString"?: bool
"allowNumber"?: bool
"allowNullableObject"?: bool
"allowNullableBoolean"?: bool
"allowNullableString"?: bool
"allowNullableNumber"?: bool
"allowNullableEnum"?: bool
"allowAny"?: bool
"allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing"?: bool
...
}, ...],
])Disallow certain types in boolean expressions https://typescript-eslint.io/rules/strict-boolean-expressions
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// If 'true', allow 'default' cases on switch statements with exhaustive cases.
"allowDefaultCaseForExhaustiveSwitch"?: bool
// If 'true', require a 'default' clause for switches on non-union types.
"requireDefaultForNonUnion"?: bool
...
}, ...],
])Require switch-case statements to be exhaustive https://typescript-eslint.io/rules/switch-exhaustiveness-check
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"lib"?: "always" | "never"
"path"?: "always" | "never"
"types"?: "always" | "never" | "prefer-import"
...
}, ...],
])Disallow certain triple slash directives in favor of ES6-style import declarations https://typescript-eslint.io/rules/triple-slash-reference
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"before"?: bool
"after"?: bool
"overrides"?: close({
"colon"?: _
"arrow"?: _
"variable"?: _
"parameter"?: _
"property"?: _
"returnType"?: _
})
...
}, ...],
])Require consistent spacing around type annotations https://typescript-eslint.io/rules/type-annotation-spacing
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
"arrayDestructuring"?: bool
"arrowParameter"?: bool
"memberVariableDeclaration"?: bool
"objectDestructuring"?: bool
"parameter"?: bool
"propertyDeclaration"?: bool
"variableDeclaration"?: bool
"variableDeclarationIgnoreFunction"?: bool
...
}, ...],
])Require type annotations in certain places https://typescript-eslint.io/rules/typedef
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether to skip checking whether `static` methods are correctly bound.
"ignoreStatic"?: bool
...
}, ...],
])Enforce unbound methods are called with their expected scope https://typescript-eslint.io/rules/unbound-method
matchN(1, [
#ruleNumber,
#ruleString,
list.MaxItems(2) & [matchN(1, [#ruleNumber, #ruleString]), {
// Whether two parameters with different names at the same index should be
// considered different even if their types are the same.
"ignoreDifferentlyNamedParameters"?: bool
...
}, ...],
])Disallow two overloads that could be unified into one with a union or an optional/rest parameter https://typescript-eslint.io/rules/unified-signatures
Enforce typing arguments in `.catch()` callbacks as `unknown` https://typescript-eslint.io/rules/use-unknown-in-catch-callback-variable
list.UniqueItems() & [ ...matchN(>=1, [ "eslint-plugin-jest" | "eslint-plugin-n" | "eslint-plugin-jsx-a11y" | "eslint-plugin-react" | "eslint-plugin-unused-imports" | "eslint-plugin-react-hooks" | "eslint-plugin-import" | "eslint-plugin-security" | "eslint-plugin-unicorn" | "eslint-plugin-regexp" | "eslint-plugin-ft-flow" | "eslint-plugin-prettier" | "eslint-plugin-cypress" | "eslint-plugin-eslint-plugin" | "eslint-plugin-mocha" | "eslint-plugin-qunit" | "eslint-plugin-jasmine" | "eslint-plugin-ember" | "eslint-plugin-you-dont-need-lodash-underscore" | "@tanstack/eslint-plugin-query" | "eslint-plugin-react-perf" | "eslint-plugin-no-only-tests" | "eslint-plugin-jsdoc" | "eslint-plugin-yml" | "eslint-plugin-vue" | "eslint-plugin-jest-dom" | "eslint-plugin-simple-import-sort" | "eslint-plugin-ava" | "eslint-plugin-es-x" | "eslint-plugin-testing-library" | "eslint-plugin-i18next" | "eslint-plugin-markdown" | "eslint-plugin-local-rules" | "eslint-plugin-html" | "eslint-plugin-sonarjs" | "eslint-plugin-lodash" | "@next/eslint-plugin-next" | "eslint-plugin-perfectionist" | "eslint-plugin-canonical" | "eslint-plugin-jest-formatting" | "eslint-plugin-babel" | "eslint-plugin-tailwindcss" | "eslint-plugin-flowtype" | "eslint-plugin-lit-a11y" | "@rushstack/eslint-plugin-security" | "eslint-plugin-sort-exports" | "eslint-plugin-json" | "eslint-plugin-react-native" | "eslint-plugin-deprecation" | "eslint-plugin-vuejs-accessibility" | "eslint-plugin-chai-friendly" | "eslint-plugin-check-file" | "eslint-plugin-promise" | "eslint-plugin-sort-class-members" | "eslint-plugin-astro" | "eslint-plugin-playwright" | "eslint-plugin-typescript-sort-keys" | "eslint-plugin-react-refresh" | "eslint-plugin-jsonc" | "eslint-plugin-ban" | "eslint-plugin-tsdoc" | "eslint-plugin-vitest" | "eslint-plugin-nuxt" | "eslint-plugin-i" | "eslint-plugin-css-modules" | "eslint-plugin-no-secrets", string, ]) ]
matchN(>=1, [ "eslint-plugin-jest" | "eslint-plugin-n" | "eslint-plugin-jsx-a11y" | "eslint-plugin-react" | "eslint-plugin-unused-imports" | "eslint-plugin-react-hooks" | "eslint-plugin-import" | "eslint-plugin-security" | "eslint-plugin-unicorn" | "eslint-plugin-regexp" | "eslint-plugin-ft-flow" | "eslint-plugin-prettier" | "eslint-plugin-cypress" | "eslint-plugin-eslint-plugin" | "eslint-plugin-mocha" | "eslint-plugin-qunit" | "eslint-plugin-jasmine" | "eslint-plugin-ember" | "eslint-plugin-you-dont-need-lodash-underscore" | "@tanstack/eslint-plugin-query" | "eslint-plugin-react-perf" | "eslint-plugin-no-only-tests" | "eslint-plugin-jsdoc" | "eslint-plugin-yml" | "eslint-plugin-vue" | "eslint-plugin-jest-dom" | "eslint-plugin-simple-import-sort" | "eslint-plugin-ava" | "eslint-plugin-es-x" | "eslint-plugin-testing-library" | "eslint-plugin-i18next" | "eslint-plugin-markdown" | "eslint-plugin-local-rules" | "eslint-plugin-html" | "eslint-plugin-sonarjs" | "eslint-plugin-lodash" | "@next/eslint-plugin-next" | "eslint-plugin-perfectionist" | "eslint-plugin-canonical" | "eslint-plugin-jest-formatting" | "eslint-plugin-babel" | "eslint-plugin-tailwindcss" | "eslint-plugin-flowtype" | "eslint-plugin-lit-a11y" | "@rushstack/eslint-plugin-security" | "eslint-plugin-sort-exports" | "eslint-plugin-json" | "eslint-plugin-react-native" | "eslint-plugin-deprecation" | "eslint-plugin-vuejs-accessibility" | "eslint-plugin-chai-friendly" | "eslint-plugin-check-file" | "eslint-plugin-promise" | "eslint-plugin-sort-class-members" | "eslint-plugin-astro" | "eslint-plugin-playwright" | "eslint-plugin-typescript-sort-keys" | "eslint-plugin-react-refresh" | "eslint-plugin-jsonc" | "eslint-plugin-ban" | "eslint-plugin-tsdoc" | "eslint-plugin-vitest" | "eslint-plugin-nuxt" | "eslint-plugin-i" | "eslint-plugin-css-modules" | "eslint-plugin-no-secrets", string, ])
ESLint rule
0 - turns the rule off 1 - turn the rule on as a warning (doesn't affect exit code) 2 - turn the rule on as an error (exit code is 1 when triggered)
ESLint rule
"off" - turns the rule off "warn" - turn the rule on as a warning (doesn't affect exit code) "error" - turn the rule on as an error (exit code is 1 when triggered)
JSON schema for ESLint configuration files
By default, ESLint supports only ECMAScript 5 syntax. You can override that setting to enable support for ECMAScript 6 as well as JSX by using configuration settings.
Set each global variable name equal to true to allow the variable to be overwritten or false to disallow overwriting.
Prevent comments from changing config or rules
Report unused eslint-disable comments
The JavaScript language options to be supported
ESLint supports the use of third-party plugins. Before using the plugin, you have to install it using npm.
By default, ESLint will look for configuration files in all parent folders up to the root directory. This can be useful if you want all of your projects to follow a certain convention, but can sometimes lead to unexpected results. To limit ESLint to a specific project, set this to `true` in a configuration in the root of your project.
ESLint supports adding shared settings into configuration file. You can add settings object to ESLint configuration file and it will be supplied to every rule that will be executed. This may be useful if you are adding custom rules and want them to have access to the same information and be easily configurable.
Allows to override configuration for files and folders, specified by glob patterns
Classes decorated with @Component must have suffix "Component" (or custom) in their name. See more at https://angular.dev/style-guide#style-02-03 https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin/docs/rules/component-class-suffix.md