File tree Expand file tree Collapse file tree 5 files changed +11
-11
lines changed
scope-manager/src/variable Expand file tree Collapse file tree 5 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,11 @@ import TabItem from '@theme/TabItem';
9
9
>
10
10
> See ** https://typescript-eslint.io/rules/ban-ts-comment ** for documentation.
11
11
12
- TypeScript provides several directive comments that can be used to alter how it processes files.
12
+ TypeScript provides several comment directives that can be used to alter how it processes files.
13
13
Using these to suppress TypeScript compiler errors reduces the effectiveness of TypeScript overall.
14
14
Instead, it's generally better to correct the types of code, to make directives unnecessary.
15
15
16
- The directive comments supported by TypeScript are:
16
+ The comment directives supported by TypeScript are:
17
17
18
18
``` ts
19
19
// @ts-expect-error
@@ -22,7 +22,7 @@ The directive comments supported by TypeScript are:
22
22
// @ts-check
23
23
```
24
24
25
- This rule lets you set which directive comments you want to allow in your codebase.
25
+ This rule lets you set which comment directives you want to allow in your codebase.
26
26
27
27
## Options
28
28
Original file line number Diff line number Diff line change @@ -11,9 +11,9 @@ export * from '@typescript-eslint/utils/ast-utils';
11
11
// https://github.com/eslint/eslint/blob/145aec1ab9052fbca96a44d04927c595951b1536/lib/rules/utils/ast-utils.js#L1751-L1779
12
12
// Could be export { getNameLocationInGlobalDirectiveComment } from 'eslint/lib/rules/utils/ast-utils'
13
13
/**
14
- * Get the `loc` object of a given name in a `/*globals` directive comment.
14
+ * Get the `loc` object of a given name in a `/*globals` comment directive .
15
15
* @param sourceCode The source code to convert index to loc.
16
- * @param comment The `/*globals` directive comment which include the name.
16
+ * @param comment The `/*globals` comment directive which include the name.
17
17
* @param name The name to find.
18
18
* @returns The `loc` object.
19
19
*/
Original file line number Diff line number Diff line change @@ -17,21 +17,21 @@ export class ESLintScopeVariable extends VariableBase {
17
17
18
18
/**
19
19
* Written to by ESLint.
20
- * This property is undefined if there are no globals directive comments .
21
- * The array of globals directive comments which defined this global variable in the source code file.
20
+ * This property is undefined if there are no globals comment directives .
21
+ * The array of globals comment directives which defined this global variable in the source code file.
22
22
*/
23
23
public eslintExplicitGlobal ?: boolean ;
24
24
25
25
/**
26
26
* Written to by ESLint.
27
- * The configured value in config files. This can be different from `variable.writeable` if there are globals directive comments .
27
+ * The configured value in config files. This can be different from `variable.writeable` if there are globals comment directives .
28
28
*/
29
29
public eslintImplicitGlobalSetting ?: 'readonly' | 'writable' ;
30
30
31
31
/**
32
32
* Written to by ESLint.
33
33
* If this key exists, it is a global variable added by ESLint.
34
- * If `true`, this global variable was defined by a globals directive comment in the source code file.
34
+ * If `true`, this global variable was defined by a globals comment directive in the source code file.
35
35
*/
36
36
public eslintExplicitGlobalComments ?: TSESTree . Comment [ ] ;
37
37
}
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ export namespace ClassicConfig {
79
79
*/
80
80
globals ?: GlobalsConfig ;
81
81
/**
82
- * The flag that disables directive comments .
82
+ * The flag that disables comment directives .
83
83
*/
84
84
noInlineConfig ?: boolean ;
85
85
/**
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ export declare class ESLintBase<
104
104
}
105
105
export interface ESLintOptions < Config extends Linter . ConfigType > {
106
106
/**
107
- * If false is present, ESLint suppresses directive comments in source code.
107
+ * If false is present, ESLint suppresses comment directives in source code.
108
108
* If this option is false, it overrides the noInlineConfig setting in your configurations.
109
109
* @default true
110
110
*/
You can’t perform that action at this time.
0 commit comments