Skip to content

Commit 635ebec

Browse files
committedJun 16, 2023
fix(eslint-config): fixed the behavior of warn_on_unsupported_typescript_version
Signed-off-by: prisis <d.bannert@anolilab.de>
1 parent e9bda58 commit 635ebec

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
 

‎packages/eslint-config/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ Example using package.json:
208208

209209
Type: `boolean`
210210

211-
Default: `false`
211+
Default: `undefined`
212212

213213
### Let [Prettier](https://prettier.io/) handle style-related rules
214214

‎packages/eslint-config/src/config/plugins/typescript.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ const config: Linter.Config = {
5858
ecmaFeatures: {
5959
jsx: true,
6060
},
61-
warnOnUnsupportedTypeScriptVersion: anolilabEslintConfig?.["warn_on_unsupported_typescript_version"] ?? env["DISABLE_ESLINT_WARN_UNSUPPORTED_TYPESCRIPT_VERSION"] !== "true",
61+
warnOnUnsupportedTypeScriptVersion:
62+
typeof anolilabEslintConfig?.["warn_on_unsupported_typescript_version"] !== "undefined"
63+
? anolilabEslintConfig?.["warn_on_unsupported_typescript_version"]
64+
: env["DISABLE_ESLINT_WARN_UNSUPPORTED_TYPESCRIPT_VERSION"] !== "true",
6265
},
6366
settings: {
6467
// Apply special parsing for TypeScript files
@@ -119,7 +122,6 @@ const config: Linter.Config = {
119122
// The TypeScript version also adds 3 new options, all of which should be set to the same value as the base config
120123
"comma-dangle": "off",
121124
"@typescript-eslint/comma-dangle": [
122-
123125
commaDangle[0],
124126
{
125127
...commaDangle[1],
@@ -260,7 +262,6 @@ const config: Linter.Config = {
260262
// Append 'ts' and 'tsx' to 'import/extensions' rule
261263
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/extensions.md
262264
"import/extensions": [
263-
264265
importExtensions[0],
265266
importExtensions[1],
266267
{
@@ -273,7 +274,6 @@ const config: Linter.Config = {
273274
// Append 'ts' and 'tsx' extensions to 'import/no-extraneous-dependencies' rule
274275
// https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md
275276
"import/no-extraneous-dependencies": [
276-
277277
importNoExtraneousDependencies[0],
278278
{
279279
...importNoExtraneousDependencies[1],

0 commit comments

Comments
 (0)
Please sign in to comment.