Skip to content

Commit 0b6b2cb

Browse files
committed
Update dev deps
1 parent c006219 commit 0b6b2cb

File tree

8 files changed

+1061
-812
lines changed

8 files changed

+1061
-812
lines changed

package.json

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,40 +47,37 @@
4747
"natural-compare-lite": "^1.4.0"
4848
},
4949
"devDependencies": {
50-
"@babel/cli": "~7.8.4",
51-
"@babel/core": "~7.9.6",
52-
"@babel/preset-env": "~7.9.6",
53-
"@babel/preset-typescript": "~7.9.0",
50+
"@babel/cli": "~7.14.8",
51+
"@babel/core": "~7.15.0",
52+
"@babel/preset-env": "~7.15.0",
53+
"@babel/preset-typescript": "~7.15.0",
5454
"@infctr/eslint-docs": "~0.4.0",
5555
"@rollup/plugin-commonjs": "~12.0.0",
5656
"@rollup/plugin-json": "~4.0.3",
5757
"@rollup/plugin-node-resolve": "~8.0.0",
5858
"@rollup/plugin-typescript": "~4.1.2",
5959
"@types/babel__core": "~7.1.7",
6060
"@types/babel__preset-env": "~7.9.0",
61-
"@types/eslint": "~6.8.1",
62-
"@types/eslint-plugin-prettier": "~3.1.0",
63-
"@types/http-server": "~0.10.0",
61+
"@types/eslint": "~7.28.0",
6462
"@types/jest": "~25.2.3",
6563
"@types/natural-compare-lite": "~1.4.0",
66-
"@types/prettier": "~2.0.0",
67-
"@types/rimraf": "~3.0.0",
68-
"@types/tmp": "~0.2.0",
64+
"@types/rimraf": "~3.0.1",
65+
"@types/tmp": "~0.2.1",
6966
"@typescript-eslint/eslint-plugin": "~3.5.0",
7067
"@typescript-eslint/parser": "~3.5.0",
7168
"babel-jest": "~26.6.3",
7269
"babel-plugin-module-resolver": "~4.1.0",
73-
"eslint": "~7.23.0",
74-
"eslint-config-prettier": "~8.1.0",
75-
"eslint-plugin-eslint-plugin": "~2.3.0",
76-
"eslint-plugin-import": "~2.22.1",
77-
"eslint-plugin-jest": "~24.3.2",
78-
"eslint-plugin-prettier": "~3.3.1",
79-
"http-server": "~0.12.3",
70+
"eslint": "~7.32.0",
71+
"eslint-config-prettier": "~8.3.0",
72+
"eslint-plugin-eslint-plugin": "~3.5.3",
73+
"eslint-plugin-import": "~2.24.0",
74+
"eslint-plugin-jest": "~24.4.0",
75+
"eslint-plugin-prettier": "~3.4.0",
76+
"http-server": "~13.0.0",
8077
"husky": "~4.2.5",
8178
"jest": "~26.6.3",
8279
"lint-staged": "~10.5.4",
83-
"prettier": "~2.2.1",
80+
"prettier": "~2.3.2",
8481
"rimraf": "~3.0.2",
8582
"rollup": "~2.10.5",
8683
"tmp": "~0.2.1",

src/config/recommended.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export default {
22
plugins: ['typescript-sort-keys'],
33
rules: {
4-
'typescript-sort-keys/interface': 'error',
5-
'typescript-sort-keys/string-enum': 'error',
4+
'typescript-sort-keys/interface': 'error' as const,
5+
'typescript-sort-keys/string-enum': 'error' as const,
66
},
77
}

src/utils/compare.ts

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,26 @@ const ascendingInsensitiveNatural = (a: string, b: string) => {
5151
/**
5252
* Functions which check that the given 2 names are in specific order.
5353
*/
54-
export const compareFn = (
55-
isAscending: boolean,
56-
isInsensitive: boolean,
57-
isNatural: boolean,
58-
) => (...args: [string?, string?]) => {
59-
if (args.filter(Boolean).length !== 2) {
60-
return 0
61-
}
54+
export const compareFn =
55+
(isAscending: boolean, isInsensitive: boolean, isNatural: boolean) =>
56+
(...args: [string?, string?]) => {
57+
if (args.filter(Boolean).length !== 2) {
58+
return 0
59+
}
6260

63-
const input = (isAscending ? args : args.reverse()) as [string, string]
61+
const input = (isAscending ? args : args.reverse()) as [string, string]
6462

65-
if (isInsensitive && isNatural) {
66-
return ascendingInsensitiveNatural(...input)
67-
}
63+
if (isInsensitive && isNatural) {
64+
return ascendingInsensitiveNatural(...input)
65+
}
6866

69-
if (!isInsensitive && isNatural) {
70-
return ascendingNatural(...input)
71-
}
67+
if (!isInsensitive && isNatural) {
68+
return ascendingNatural(...input)
69+
}
7270

73-
if (isInsensitive && !isNatural) {
74-
return ascendingInsensitive(...input)
75-
}
71+
if (isInsensitive && !isNatural) {
72+
return ascendingInsensitive(...input)
73+
}
7674

77-
return ascending(...input)
78-
}
75+
return ascending(...input)
76+
}

src/utils/plugin.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,10 @@ function createNodeSwapper(context: UtilRuleContext<string, RuleOptions>) {
139139

140140
export function createReporter<MessageIds extends string>(
141141
context: UtilRuleContext<MessageIds, RuleOptions>,
142-
createReportObject: (
143-
node: TSESTree.Node,
144-
) => { readonly loc: TSESTree.SourceLocation; readonly messageId: MessageIds },
142+
createReportObject: (node: TSESTree.Node) => {
143+
readonly loc: TSESTree.SourceLocation
144+
readonly messageId: MessageIds
145+
},
145146
) {
146147
// Parse options.
147148
const order = context.options[0] || SortingOrder.Ascending

tests/autofix.spec.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import plugin from '../src'
77
import recommended from 'config/recommended'
88
import { typescript } from './helpers/configs'
99

10-
declare module 'eslint' {
11-
export class ESLint {
12-
constructor(config?: any)
10+
// declare module 'eslint' {
11+
// export class ESLint {
12+
// constructor(config?: any)
1313

14-
lintFiles(path: string | string[]): Promise<any>
15-
static outputFixes(config: any): Promise<void>
16-
}
17-
}
14+
// lintFiles(path: string | string[]): Promise<any>
15+
// static outputFixes(config: any): Promise<void>
16+
// }
17+
// }
1818

1919
describe('autofix', () => {
2020
beforeEach(() => {
@@ -52,6 +52,8 @@ describe('autofix', () => {
5252
fs.writeFileSync(testFilePath, input)
5353

5454
const eslint = new ESLint({
55+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
56+
// @ts-ignore
5557
overrideConfig: {
5658
...config,
5759
parser: typescript.parser,

tests/rules/interface.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1795,7 +1795,7 @@ const invalid: readonly InvalidTestCase<Options>[] = [
17951795
describe('TypeScript', () => {
17961796
const ruleTester = new RuleTester(typescript)
17971797

1798-
ruleTester.run(name, (rule as unknown) as Rule.RuleModule, {
1798+
ruleTester.run(name, rule as unknown as Rule.RuleModule, {
17991799
valid: processValidTestCase(valid),
18001800
invalid: processInvalidTestCase(invalid),
18011801
})

tests/rules/string-enum.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ const invalid: readonly InvalidTestCase<Options>[] = [
852852
describe('TypeScript', () => {
853853
const ruleTester = new RuleTester(typescript)
854854

855-
ruleTester.run(name, (rule as unknown) as Rule.RuleModule, {
855+
ruleTester.run(name, rule as unknown as Rule.RuleModule, {
856856
valid: processValidTestCase(valid),
857857
invalid: processInvalidTestCase(invalid),
858858
})

0 commit comments

Comments
 (0)