Skip to content

Commit 334d08c

Browse files
authored
Merge pull request #844 from dotnet/renovate/major-eslint-monorepo
Update dependency eslint to v9
2 parents 8be9606 + 7fd00cf commit 334d08c

File tree

9 files changed

+207
-185
lines changed

9 files changed

+207
-185
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ jobs:
5858
run: dotnet publish -c Release -r ${{ matrix.rid }}-x64 -warnaserror
5959
working-directory: test/NativeAOTCompatibility
6060

61-
- name: ⚙️ Use Node.js 16.x
61+
- name: ⚙️ Use Node.js 20.x
6262
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
6363
with:
64-
node-version: 16.x
64+
node-version: 20.x
6565
- name: ⚙️ yarn
6666
run: |
6767
npm install -g yarn@1.x

src/nerdbank-streams/.eslintrc.json

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
const typescriptEslint = require('@typescript-eslint/eslint-plugin')
2+
const prettier = require('eslint-plugin-prettier')
3+
const tsParser = require('@typescript-eslint/parser')
4+
const prettierConfig = require('eslint-config-prettier')
5+
6+
module.exports = [
7+
{
8+
files: ['**/*.ts'],
9+
languageOptions: {
10+
parser: tsParser,
11+
parserOptions: {
12+
ecmaVersion: 6,
13+
sourceType: 'module',
14+
},
15+
},
16+
plugins: {
17+
'@typescript-eslint': typescriptEslint,
18+
prettier: prettier,
19+
},
20+
rules: {
21+
'@typescript-eslint/semi': 'off',
22+
curly: 'warn',
23+
'object-curly-spacing': 'off',
24+
eqeqeq: 'warn',
25+
'no-throw-literal': 'error',
26+
'no-unexpected-multiline': 'error',
27+
semi: 'off',
28+
'prettier/prettier': [
29+
'error',
30+
{
31+
printWidth: 160,
32+
semi: false,
33+
singleQuote: true,
34+
trailingComma: 'es5',
35+
useTabs: true,
36+
endOfLine: 'auto',
37+
arrowParens: 'avoid',
38+
},
39+
],
40+
...prettierConfig.rules,
41+
},
42+
},
43+
{
44+
ignores: ['out/**', 'dist/**', '**/*.d.ts'],
45+
},
46+
]

src/nerdbank-streams/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"@types/promise": "7.1.30",
3939
"@typescript-eslint/eslint-plugin": "5.62.0",
4040
"@typescript-eslint/parser": "5.62.0",
41-
"eslint": "8.57.1",
41+
"eslint": "9.39.2",
4242
"eslint-config-prettier": "10.1.8",
4343
"eslint-plugin-import": "2.32.0",
4444
"eslint-plugin-jsx-a11y": "6.10.2",

src/nerdbank-streams/src/FullDuplexStream.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Duplex, PassThrough } from 'stream'
22

33
export class FullDuplexStream {
4-
// eslint-disable-next-line @typescript-eslint/naming-convention
54
public static CreatePair(): { first: Duplex; second: Duplex } {
65
const pass1 = new PassThrough()
76
const pass2 = new PassThrough()
@@ -11,7 +10,6 @@ export class FullDuplexStream {
1110
}
1211
}
1312

14-
// eslint-disable-next-line @typescript-eslint/naming-convention
1513
public static Splice(readable: NodeJS.ReadableStream, writable: NodeJS.WritableStream): Duplex {
1614
const duplex = new Duplex({
1715
write(chunk, encoding, callback) {

src/nerdbank-streams/src/MultiplexingStream.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export abstract class MultiplexingStream implements IDisposableObservable {
6363
* @param cancellationToken A token whose cancellation aborts the handshake with the remote end.
6464
* @returns The multiplexing stream, once the handshake is complete.
6565
*/
66-
// eslint-disable-next-line @typescript-eslint/naming-convention
66+
6767
public static async CreateAsync(
6868
stream: NodeJS.ReadWriteStream,
6969
options?: MultiplexingStreamOptions,
@@ -108,7 +108,7 @@ export abstract class MultiplexingStream implements IDisposableObservable {
108108
* @param options Options to customize the behavior of the stream.
109109
* @returns The multiplexing stream.
110110
*/
111-
// eslint-disable-next-line @typescript-eslint/naming-convention
111+
112112
public static Create(stream: NodeJS.ReadWriteStream, options?: MultiplexingStreamOptions): MultiplexingStream {
113113
options ??= { protocolMajorVersion: 3 }
114114
options.protocolMajorVersion ??= 3
@@ -130,7 +130,7 @@ export abstract class MultiplexingStream implements IDisposableObservable {
130130
/**
131131
* The encoding used for characters in control frames.
132132
*/
133-
// eslint-disable-next-line @typescript-eslint/naming-convention
133+
134134
static readonly ControlFrameEncoding = 'utf-8'
135135

136136
protected readonly _completionSource = new Deferred<void>()

src/nerdbank-streams/src/QualifiedChannelId.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@ export interface QualifiedChannelId {
1313
*/
1414
export enum ChannelSource {
1515
/** The channel was offered by this MultiplexingStream instance to the other party. */
16-
// eslint-disable-next-line @typescript-eslint/naming-convention
16+
1717
Local = 1,
1818

1919
/** The channel was offered to this MultiplexingStream instance by the other party. */
20-
// eslint-disable-next-line @typescript-eslint/naming-convention
20+
2121
Remote = -1,
2222

2323
/**
2424
* The channel was seeded during construction via the Options.SeededChannels collection.
2525
* This channel is to be accepted by both parties.
2626
*/
27-
// eslint-disable-next-line @typescript-eslint/naming-convention
27+
2828
Seeded = 0,
2929
}
3030

src/nerdbank-streams/src/tests/MultiplexingStream.Interop.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { MultiplexingStream } from '../MultiplexingStream'
1212
let procExited: Deferred<any>
1313
const spawnOptions: SpawnOptions = {
1414
env: {
15-
// eslint-disable-next-line @typescript-eslint/naming-convention
1615
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: '1', // prevent warnings in stdout that corrupt our interop stream.
1716
},
1817
}

0 commit comments

Comments
 (0)