Skip to content

Commit 652b1ef

Browse files
authored
fix(frontend): accept using @deprecated tag in JSDoc (#389)
1 parent 4d1c140 commit 652b1ef

File tree

8 files changed

+10
-62
lines changed

8 files changed

+10
-62
lines changed

packages/eslint-config/rules/typescript.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ module.exports = {
2222
// https://typescript-eslint.io/rules/dot-notation/
2323
'@typescript-eslint/dot-notation': baseBestPracticesRules['dot-notation'],
2424

25+
// Use of `@deprecated` tag should be acceptable during code migration.
26+
// https://typescript-eslint.io/rules/no-deprecated/
27+
'@typescript-eslint/no-deprecated': ['warn'],
28+
2529
// Disallow unused expressions.
2630
// https://typescript-eslint.io/rules/no-unused-expressions/
2731
// Replace 'no-unused-expressions' rule with '@typescript-eslint' version

packages/eslint-config/tests/snapshot-test/eslintrc/next/__snapshots__/snapshot.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ exports[`should match ESLint configuration snapshot: next 1`] = `
158158
2,
159159
],
160160
"@typescript-eslint/no-deprecated": [
161-
2,
161+
1,
162162
],
163163
"@typescript-eslint/no-duplicate-enum-values": [
164164
2,

packages/eslint-config/tests/snapshot-test/eslintrc/react/__snapshots__/snapshot.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ exports[`should match ESLint configuration snapshot: react 1`] = `
9595
2,
9696
],
9797
"@typescript-eslint/no-deprecated": [
98-
2,
98+
1,
9999
],
100100
"@typescript-eslint/no-duplicate-enum-values": [
101101
2,

packages/eslint-config/tests/snapshot-test/eslintrc/storybook/__snapshots__/snapshot.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ exports[`should match ESLint configuration snapshot: storybook 1`] = `
9595
2,
9696
],
9797
"@typescript-eslint/no-deprecated": [
98-
2,
98+
1,
9999
],
100100
"@typescript-eslint/no-duplicate-enum-values": [
101101
2,

packages/eslint-config/tests/snapshot-test/flat/next/__snapshots__/snapshot.test.js.snap

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Flat Configurat
241241
2,
242242
],
243243
"@typescript-eslint/no-deprecated": [
244-
2,
244+
1,
245245
],
246246
"@typescript-eslint/no-duplicate-enum-values": [
247247
2,
@@ -560,7 +560,6 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Flat Configurat
560560
{
561561
"enforceForClassFields": true,
562562
"exceptMethods": [],
563-
"ignoreOverrideMethods": false,
564563
},
565564
],
566565
"complexity": [
@@ -629,7 +628,6 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Flat Configurat
629628
"expression",
630629
{
631630
"allowArrowFunctions": false,
632-
"allowTypeAnnotation": false,
633631
"overrides": {},
634632
},
635633
],
@@ -2150,16 +2148,11 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Flat Configurat
21502148
"allow": [],
21512149
"builtinGlobals": false,
21522150
"hoist": "functions",
2153-
"ignoreFunctionTypeParameterNameValueShadow": true,
21542151
"ignoreOnInitialization": false,
2155-
"ignoreTypeValueShadow": true,
21562152
},
21572153
],
21582154
"no-shadow-restricted-names": [
21592155
2,
2160-
{
2161-
"reportGlobalThis": false,
2162-
},
21632156
],
21642157
"no-sparse-arrays": [
21652158
2,
@@ -2245,7 +2238,6 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Flat Configurat
22452238
"allowTaggedTemplates": true,
22462239
"allowTernary": true,
22472240
"enforceForJSX": false,
2248-
"ignoreDirectives": false,
22492241
},
22502242
],
22512243
"no-unused-labels": [
@@ -2267,10 +2259,7 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Flat Configurat
22672259
{
22682260
"allowNamedExports": false,
22692261
"classes": true,
2270-
"enums": true,
22712262
"functions": true,
2272-
"ignoreTypeReferences": true,
2273-
"typedefs": true,
22742263
"variables": true,
22752264
},
22762265
],
@@ -2297,9 +2286,6 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Flat Configurat
22972286
],
22982287
"no-useless-escape": [
22992288
2,
2300-
{
2301-
"allowRegexCharacters": [],
2302-
},
23032289
],
23042290
"no-useless-rename": [
23052291
2,

packages/eslint-config/tests/snapshot-test/flat/node/__snapshots__/snapshot.test.js.snap

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = `
556556
{
557557
"enforceForClassFields": true,
558558
"exceptMethods": [],
559-
"ignoreOverrideMethods": false,
560559
},
561560
],
562561
"complexity": [
@@ -625,7 +624,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = `
625624
"expression",
626625
{
627626
"allowArrowFunctions": false,
628-
"allowTypeAnnotation": false,
629627
"overrides": {},
630628
},
631629
],
@@ -1693,16 +1691,11 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = `
16931691
"allow": [],
16941692
"builtinGlobals": false,
16951693
"hoist": "functions",
1696-
"ignoreFunctionTypeParameterNameValueShadow": true,
16971694
"ignoreOnInitialization": false,
1698-
"ignoreTypeValueShadow": true,
16991695
},
17001696
],
17011697
"no-shadow-restricted-names": [
17021698
2,
1703-
{
1704-
"reportGlobalThis": false,
1705-
},
17061699
],
17071700
"no-sparse-arrays": [
17081701
2,
@@ -1788,7 +1781,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = `
17881781
"allowTaggedTemplates": true,
17891782
"allowTernary": true,
17901783
"enforceForJSX": false,
1791-
"ignoreDirectives": false,
17921784
},
17931785
],
17941786
"no-unused-labels": [
@@ -1810,10 +1802,7 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = `
18101802
{
18111803
"allowNamedExports": false,
18121804
"classes": true,
1813-
"enums": true,
18141805
"functions": true,
1815-
"ignoreTypeReferences": true,
1816-
"typedefs": true,
18171806
"variables": true,
18181807
},
18191808
],
@@ -1840,9 +1829,6 @@ exports[`should match ESLint Flat Configuration snapshot: node 1`] = `
18401829
],
18411830
"no-useless-escape": [
18421831
2,
1843-
{
1844-
"allowRegexCharacters": [],
1845-
},
18461832
],
18471833
"no-useless-rename": [
18481834
2,

packages/eslint-config/tests/snapshot-test/flat/react/__snapshots__/snapshot.test.js.snap

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Configuration s
178178
2,
179179
],
180180
"@typescript-eslint/no-deprecated": [
181-
2,
181+
1,
182182
],
183183
"@typescript-eslint/no-duplicate-enum-values": [
184184
2,
@@ -497,7 +497,6 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Configuration s
497497
{
498498
"enforceForClassFields": true,
499499
"exceptMethods": [],
500-
"ignoreOverrideMethods": false,
501500
},
502501
],
503502
"complexity": [
@@ -566,7 +565,6 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Configuration s
566565
"expression",
567566
{
568567
"allowArrowFunctions": false,
569-
"allowTypeAnnotation": false,
570568
"overrides": {},
571569
},
572570
],
@@ -2087,16 +2085,11 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Configuration s
20872085
"allow": [],
20882086
"builtinGlobals": false,
20892087
"hoist": "functions",
2090-
"ignoreFunctionTypeParameterNameValueShadow": true,
20912088
"ignoreOnInitialization": false,
2092-
"ignoreTypeValueShadow": true,
20932089
},
20942090
],
20952091
"no-shadow-restricted-names": [
20962092
2,
2097-
{
2098-
"reportGlobalThis": false,
2099-
},
21002093
],
21012094
"no-sparse-arrays": [
21022095
2,
@@ -2182,7 +2175,6 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Configuration s
21822175
"allowTaggedTemplates": true,
21832176
"allowTernary": true,
21842177
"enforceForJSX": false,
2185-
"ignoreDirectives": false,
21862178
},
21872179
],
21882180
"no-unused-labels": [
@@ -2204,10 +2196,7 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Configuration s
22042196
{
22052197
"allowNamedExports": false,
22062198
"classes": true,
2207-
"enums": true,
22082199
"functions": true,
2209-
"ignoreTypeReferences": true,
2210-
"typedefs": true,
22112200
"variables": true,
22122201
},
22132202
],
@@ -2234,9 +2223,6 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Configuration s
22342223
],
22352224
"no-useless-escape": [
22362225
2,
2237-
{
2238-
"allowRegexCharacters": [],
2239-
},
22402226
],
22412227
"no-useless-rename": [
22422228
2,

packages/eslint-config/tests/snapshot-test/flat/storybook/__snapshots__/snapshot.test.js.snap

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Flat Configurat
178178
2,
179179
],
180180
"@typescript-eslint/no-deprecated": [
181-
2,
181+
1,
182182
],
183183
"@typescript-eslint/no-duplicate-enum-values": [
184184
2,
@@ -497,7 +497,6 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Flat Configurat
497497
{
498498
"enforceForClassFields": true,
499499
"exceptMethods": [],
500-
"ignoreOverrideMethods": false,
501500
},
502501
],
503502
"complexity": [
@@ -566,7 +565,6 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Flat Configurat
566565
"expression",
567566
{
568567
"allowArrowFunctions": false,
569-
"allowTypeAnnotation": false,
570568
"overrides": {},
571569
},
572570
],
@@ -1844,16 +1842,11 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Flat Configurat
18441842
"allow": [],
18451843
"builtinGlobals": false,
18461844
"hoist": "functions",
1847-
"ignoreFunctionTypeParameterNameValueShadow": true,
18481845
"ignoreOnInitialization": false,
1849-
"ignoreTypeValueShadow": true,
18501846
},
18511847
],
18521848
"no-shadow-restricted-names": [
18531849
2,
1854-
{
1855-
"reportGlobalThis": false,
1856-
},
18571850
],
18581851
"no-sparse-arrays": [
18591852
2,
@@ -1939,7 +1932,6 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Flat Configurat
19391932
"allowTaggedTemplates": true,
19401933
"allowTernary": true,
19411934
"enforceForJSX": false,
1942-
"ignoreDirectives": false,
19431935
},
19441936
],
19451937
"no-unused-labels": [
@@ -1961,10 +1953,7 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Flat Configurat
19611953
{
19621954
"allowNamedExports": false,
19631955
"classes": true,
1964-
"enums": true,
19651956
"functions": true,
1966-
"ignoreTypeReferences": true,
1967-
"typedefs": true,
19681957
"variables": true,
19691958
},
19701959
],
@@ -1991,9 +1980,6 @@ exports[`ESLint Configuration Snapshot Tests should match ESLint Flat Configurat
19911980
],
19921981
"no-useless-escape": [
19931982
2,
1994-
{
1995-
"allowRegexCharacters": [],
1996-
},
19971983
],
19981984
"no-useless-rename": [
19991985
2,

0 commit comments

Comments
 (0)