Skip to content

Commit dd65994

Browse files
renovate[bot]renovate-botJoshuaKGoldberg
authored
Update typescript-eslint monorepo to v4.4.0 (#735)
* Update typescript-eslint monorepo to v4.4.0 * Converted some interfaces to records Co-authored-by: Renovate Bot <bot@renovateapp.com> Co-authored-by: Josh Goldberg <me@joshuakgoldberg.com>
1 parent 0dbff8f commit dd65994

File tree

8 files changed

+42
-44
lines changed

8 files changed

+42
-44
lines changed

package-lock.json

Lines changed: 34 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
"@types/jest": "26.0.14",
3131
"@types/minimatch": "3.0.3",
3232
"@types/node": "12.12.21",
33-
"@typescript-eslint/eslint-plugin": "4.3.0",
34-
"@typescript-eslint/parser": "4.3.0",
33+
"@typescript-eslint/eslint-plugin": "4.4.0",
34+
"@typescript-eslint/parser": "4.4.0",
3535
"babel-jest": "26.5.2",
3636
"eslint": "7.11.0",
3737
"husky": "4.3.0",

src/converters/lintConfigs/formatConvertedRules.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const formatConvertedRules = (
77
conversionResults: RuleConversionResults,
88
tslintConfiguration: TSLintConfiguration,
99
) => {
10-
const output: { [i: string]: string | any[] } = {};
10+
const output: Record<string, string | any[]> = {};
1111
const sortedRuleEntries = Array.from(
1212
conversionResults.converted,
1313
).sort(([ruleNameA], [ruleNameB]) => ruleNameA.localeCompare(ruleNameB));

src/converters/lintConfigs/rules/ruleConverters/file-name-casing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { RuleConverter } from "../ruleConverter";
33
const IGNORE_CASE_NOTICE = "ESLint (Unicorn plugin) does not support the 'ignore' case.";
44
const CASING_BY_FILETYPE_CHANGE =
55
"ESLint (Unicorn Plugin) does not support file name casing by file type, so all previously configured casings are now allowed.";
6-
const CASES_MAP: { [s: string]: string } = {
6+
const CASES_MAP: Record<string, string> = {
77
"camel-case": "camelCase",
88
"pascal-case": "pascalCase",
99
"kebab-case": "kebabCase",

src/converters/lintConfigs/rules/ruleConverters/trailing-comma.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function collectKeys(
6969
key: TSLintObjectKey,
7070
singleline: TSLintObject | undefined,
7171
multiline: TSLintObject | undefined,
72-
): { [key: string]: ESLintStringValue } {
72+
): Record<string, ESLintStringValue> {
7373
const hasSingleline = Boolean(singleline);
7474
const hasSinglelineAndFieldExist = Boolean(singleline?.[key]);
7575
const hasSinglelineAlways = Boolean(singleline && singleline[key] === "always");

src/converters/lintConfigs/writeEditorConfigConversionResults.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const writeEditorConfigConversionResults = async (
2323
};
2424

2525
export const formatConvertedSettings = (conversionResults: EditorSettingConversionResults) => {
26-
const output: { [i: string]: string | any[] } = {};
26+
const output: Record<string, string | any> = {};
2727
const sortedEntries = Array.from(conversionResults.converted).sort(([nameA], [nameB]) =>
2828
nameA.localeCompare(nameB),
2929
);

src/input/editorConfiguration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export type EditorConfiguration = { [key: string]: any };
1+
export type EditorConfiguration = Record<string, any>;

src/input/findESLintConfiguration.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ export type ESLintConfiguration = {
1515
rules?: ESLintConfigurationRules;
1616
};
1717

18-
export type ESLintConfigurationRules = {
19-
[i: string]: ESLintConfigurationRuleValue;
20-
};
18+
export type ESLintConfigurationRules = Record<string, ESLintConfigurationRuleValue>;
2119

2220
export type ESLintConfigurationRuleValue =
2321
| RawESLintRuleSeverity

0 commit comments

Comments
 (0)