@@ -53,18 +53,85 @@ const plugin: TSESLint.FlatConfig.Plugin = pluginBase as Omit<
53
53
> ;
54
54
55
55
const configs = {
56
+ /**
57
+ * Enables each the rules provided as a part of typescript-eslint. Note that many rules are not applicable in all codebases, or are meant to be configured.
58
+ * @see {@link https://typescript-eslint.io/users/configs#all }
59
+ */
56
60
all : allConfig ( plugin , parser ) ,
61
+
62
+ /**
63
+ * A minimal ruleset that sets only the required parser and plugin options needed to run typescript-eslint.
64
+ * We don't recommend using this directly; instead, extend from an earlier recommended rule.
65
+ * @see {@link https://typescript-eslint.io/users/configs#base }
66
+ */
57
67
base : baseConfig ( plugin , parser ) ,
68
+
69
+ /**
70
+ * A utility ruleset that will disable type-aware linting and all type-aware rules available in our project.
71
+ * @see {@link https://typescript-eslint.io/users/configs#disable-type-checked }
72
+ */
58
73
disableTypeChecked : disableTypeCheckedConfig ( plugin , parser ) ,
74
+
75
+ /**
76
+ * This is a compatibility ruleset that:
77
+ * - disables rules from eslint:recommended which are already handled by TypeScript.
78
+ * - enables rules that make sense due to TS's typechecking / transpilation.
79
+ * @see {@link https://typescript-eslint.io/users/configs/#eslint-recommended }
80
+ */
59
81
eslintRecommended : eslintRecommendedConfig ( plugin , parser ) ,
82
+
83
+ /**
84
+ * Recommended rules for code correctness that you can drop in without additional configuration.
85
+ * @see {@link https://typescript-eslint.io/users/configs#recommended }
86
+ */
60
87
recommended : recommendedConfig ( plugin , parser ) ,
88
+
89
+ /**
90
+ * Contains all of `recommended` along with additional recommended rules that require type information.
91
+ * @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked }
92
+ */
61
93
recommendedTypeChecked : recommendedTypeCheckedConfig ( plugin , parser ) ,
94
+
95
+ /**
96
+ * A version of `recommended` that only contains type-checked rules and disables of any corresponding core ESLint rules.
97
+ * @see {@link https://typescript-eslint.io/users/configs#recommended-type-checked-only }
98
+ */
62
99
recommendedTypeCheckedOnly : recommendedTypeCheckedOnlyConfig ( plugin , parser ) ,
100
+
101
+ /**
102
+ * Contains all of `recommended`, as well as additional strict rules that can also catch bugs.
103
+ * @see {@link https://typescript-eslint.io/users/configs#strict }
104
+ */
63
105
strict : strictConfig ( plugin , parser ) ,
106
+
107
+ /**
108
+ * Contains all of `recommended`, `recommended-type-checked`, and `strict`, along with additional strict rules that require type information.
109
+ * @see {@link https://typescript-eslint.io/users/configs#strict-type-checked }
110
+ */
64
111
strictTypeChecked : strictTypeCheckedConfig ( plugin , parser ) ,
112
+
113
+ /**
114
+ * A version of `strict` that only contains type-checked rules and disables of any corresponding core ESLint rules.
115
+ * @see {@link https://typescript-eslint.io/users/configs#strict-type-checked-only }
116
+ */
65
117
strictTypeCheckedOnly : strictTypeCheckedOnlyConfig ( plugin , parser ) ,
118
+
119
+ /**
120
+ * Rules considered to be best practice for modern TypeScript codebases, but that do not impact program logic.
121
+ * @see {@link https://typescript-eslint.io/users/configs#stylistic }
122
+ */
66
123
stylistic : stylisticConfig ( plugin , parser ) ,
124
+
125
+ /**
126
+ * Contains all of `stylistic`, along with additional stylistic rules that require type information.
127
+ * @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked }
128
+ */
67
129
stylisticTypeChecked : stylisticTypeCheckedConfig ( plugin , parser ) ,
130
+
131
+ /**
132
+ * A version of `stylistic` that only contains type-checked rules and disables of any corresponding core ESLint rules.
133
+ * @see {@link https://typescript-eslint.io/users/configs#stylistic-type-checked-only }
134
+ */
68
135
stylisticTypeCheckedOnly : stylisticTypeCheckedOnlyConfig ( plugin , parser ) ,
69
136
} ;
70
137
0 commit comments