Skip to content

Commit 00c8d35

Browse files
eslintrc: enable few rules with minimal code changes (#3774)
1 parent e9a81f2 commit 00c8d35

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

.eslintrc.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ rules:
227227
no-template-curly-in-string: error
228228
no-this-before-super: error
229229
no-undef: error
230-
no-unexpected-multiline: off
230+
no-unexpected-multiline: error
231231
no-unmodified-loop-condition: error
232232
no-unreachable: error
233233
no-unreachable-loop: error
@@ -253,7 +253,7 @@ rules:
253253
class-methods-use-this: off
254254
complexity: off
255255
consistent-return: off
256-
consistent-this: off
256+
consistent-this: error
257257
curly: error
258258
default-case: off
259259
default-case-last: error
@@ -369,7 +369,7 @@ rules:
369369
prefer-const: error
370370
prefer-destructuring: off
371371
prefer-exponentiation-operator: error
372-
prefer-named-capture-group: off # ES2018
372+
prefer-named-capture-group: off # needs a better support in TS, see https://github.com/microsoft/TypeScript/issues/32098
373373
prefer-numeric-literals: error
374374
prefer-object-has-own: off # TODO requires Node.js v16.9.0
375375
prefer-object-spread: error
@@ -378,7 +378,7 @@ rules:
378378
prefer-rest-params: off # TODO
379379
prefer-spread: error
380380
prefer-template: off
381-
quote-props: off # Superseded by prettier
381+
quote-props: [error, as-needed]
382382
radix: error
383383
require-await: error
384384
require-unicode-regexp: off

integrationTests/node/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const graphqlPackageJSON = JSON.parse(
77

88
const nodeVersions = graphqlPackageJSON.engines.node
99
.split(' || ')
10-
.map((version) => version.replace(/^(\^|>=)/, ''))
10+
.map((version) => version.replace('^', '').replace('>=', ''))
1111
.sort((a, b) => b.localeCompare(a));
1212

1313
for (const version of nodeVersions) {

resources/benchmark.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,11 @@ function collectSamples(modulePath: string) {
132132
// See http://www.itl.nist.gov/div898/handbook/eda/section3/eda3672.htm.
133133
// prettier-ignore
134134
const tTable: { [v: number]: number } = {
135-
'1': 12.706, '2': 4.303, '3': 3.182, '4': 2.776, '5': 2.571, '6': 2.447,
136-
'7': 2.365, '8': 2.306, '9': 2.262, '10': 2.228, '11': 2.201, '12': 2.179,
137-
'13': 2.16, '14': 2.145, '15': 2.131, '16': 2.12, '17': 2.11, '18': 2.101,
138-
'19': 2.093, '20': 2.086, '21': 2.08, '22': 2.074, '23': 2.069, '24': 2.064,
139-
'25': 2.06, '26': 2.056, '27': 2.052, '28': 2.048, '29': 2.045, '30': 2.042,
135+
1: 12.706, 2: 4.303, 3: 3.182, 4: 2.776, 5: 2.571, 6: 2.447,
136+
7: 2.365, 8: 2.306, 9: 2.262, 10: 2.228, 11: 2.201, 12: 2.179,
137+
13: 2.16, 14: 2.145, 15: 2.131, 16: 2.12, 17: 2.11, 18: 2.101,
138+
19: 2.093, 20: 2.086, 21: 2.08, 22: 2.074, 23: 2.069, 24: 2.064,
139+
25: 2.06, 26: 2.056, 27: 2.052, 28: 2.048, 29: 2.045, 30: 2.042,
140140
};
141141
const tTableInfinity = 1.96;
142142

0 commit comments

Comments
 (0)