Skip to content

Commit d62f679

Browse files
committed
feat: refine rules for eslint@9.36.0
1 parent 3501c13 commit d62f679

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

packages/eslint-config/src/config/base/best-practices.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ const config: TSESLint.FlatConfig.ConfigArray = [
4242

4343
// Require grouped accessor pairs in object literals and classes
4444
// https://eslint.org/docs/rules/grouped-accessor-pairs
45-
'grouped-accessor-pairs': 'error',
45+
'grouped-accessor-pairs': [
46+
'error',
47+
'anyOrder',
48+
{ enforceForTSTypes: true },
49+
],
4650

4751
// make sure for-in loops have an if statement
4852
// https://eslint.org/docs/rules/guard-for-in

specs/eslint-configs/__snapshots__/presets.test.mts.snap

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,9 @@ exports[`Resolved config matches snapshot > javascript.js 1`] = `
151151
"grouped-accessor-pairs": [
152152
2,
153153
"anyOrder",
154+
{
155+
"enforceForTSTypes": true,
156+
},
154157
],
155158
"guard-for-in": [
156159
2,
@@ -471,6 +474,9 @@ exports[`Resolved config matches snapshot > javascript.js 1`] = `
471474
],
472475
"no-misleading-character-class": [
473476
2,
477+
{
478+
"allowEscape": false,
479+
},
474480
],
475481
"no-multi-assign": [
476482
2,
@@ -1067,7 +1073,7 @@ exports[`Resolved config matches snapshot > javascript.js 2`] = `
10671073
"- Editor mode: false - 3
10681074
+ Editor mode: true + 0
10691075
1070-
@@ -999,13 +999,10 @@
1076+
@@ -1005,13 +1005,10 @@
10711077
2,
10721078
],
10731079
"unicorn/text-encoding-identifier-case": Array [
@@ -1448,6 +1454,9 @@ exports[`Resolved config matches snapshot > typescript.ts 1`] = `
14481454
"grouped-accessor-pairs": [
14491455
2,
14501456
"anyOrder",
1457+
{
1458+
"enforceForTSTypes": true,
1459+
},
14511460
],
14521461
"guard-for-in": [
14531462
2,
@@ -1771,6 +1780,9 @@ exports[`Resolved config matches snapshot > typescript.ts 1`] = `
17711780
],
17721781
"no-misleading-character-class": [
17731782
2,
1783+
{
1784+
"allowEscape": false,
1785+
},
17741786
],
17751787
"no-multi-assign": [
17761788
2,
@@ -2382,7 +2394,7 @@ exports[`Resolved config matches snapshot > typescript.ts 2`] = `
23822394
"- Editor mode: false - 3
23832395
+ Editor mode: true + 0
23842396
2385-
@@ -1222,13 +1222,10 @@
2397+
@@ -1228,13 +1228,10 @@
23862398
2,
23872399
],
23882400
"unicorn/text-encoding-identifier-case": Array [
@@ -4150,6 +4162,9 @@ exports[`Resolved config matches snapshot > typescript-react.tsx 1`] = `
41504162
"grouped-accessor-pairs": [
41514163
2,
41524164
"anyOrder",
4165+
{
4166+
"enforceForTSTypes": true,
4167+
},
41534168
],
41544169
"guard-for-in": [
41554170
2,
@@ -4702,6 +4717,9 @@ exports[`Resolved config matches snapshot > typescript-react.tsx 1`] = `
47024717
],
47034718
"no-misleading-character-class": [
47044719
2,
4720+
{
4721+
"allowEscape": false,
4722+
},
47054723
],
47064724
"no-multi-assign": [
47074725
2,
@@ -5335,7 +5353,7 @@ exports[`Resolved config matches snapshot > typescript-react.tsx 2`] = `
53355353
"- Editor mode: false - 3
53365354
+ Editor mode: true + 0
53375355
5338-
@@ -2844,13 +2844,10 @@
5356+
@@ -2850,13 +2850,10 @@
53395357
2,
53405358
],
53415359
"unicorn/text-encoding-identifier-case": Array [

0 commit comments

Comments
 (0)