From 11e577db5f64f488ecfe4c7208263bf5f86c4355 Mon Sep 17 00:00:00 2001 From: Gajus Date: Mon, 11 Nov 2024 09:03:39 -0600 Subject: [PATCH] fix: migrate to @stylistic/ts/member-delimiter-style (fixes #86) --- configurations/typescript.js | 43 ++++++++++++++++++------------------ package.json | 1 + 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/configurations/typescript.js b/configurations/typescript.js index 0cec831..1a54cbc 100644 --- a/configurations/typescript.js +++ b/configurations/typescript.js @@ -19,10 +19,32 @@ module.exports.recommended = { }, }, plugins: { + '@stylistic/ts': require('@stylistic/eslint-plugin-ts'), '@typescript-eslint': require('@typescript-eslint/eslint-plugin'), canonical: require('eslint-plugin-canonical'), }, rules: { + '@stylistic/ts/member-delimiter-style': [ + 2, + { + multiline: { + delimiter: 'comma', + requireLast: true, + }, + overrides: { + interface: { + multiline: { + delimiter: 'semi', + requireLast: true, + }, + }, + }, + singleline: { + delimiter: 'comma', + requireLast: true, + }, + }, + ], '@typescript-eslint/adjacent-overload-signatures': 2, '@typescript-eslint/array-type': [ 2, @@ -61,27 +83,6 @@ module.exports.recommended = { '@typescript-eslint/explicit-function-return-type': 0, '@typescript-eslint/explicit-member-accessibility': 0, '@typescript-eslint/explicit-module-boundary-types': 0, - '@typescript-eslint/member-delimiter-style': [ - 2, - { - multiline: { - delimiter: 'comma', - requireLast: true, - }, - overrides: { - interface: { - multiline: { - delimiter: 'semi', - requireLast: true, - }, - }, - }, - singleline: { - delimiter: 'comma', - requireLast: true, - }, - }, - ], '@typescript-eslint/member-ordering': 0, '@typescript-eslint/method-signature-style': [2, 'property'], '@typescript-eslint/naming-convention': [ diff --git a/package.json b/package.json index d75d477..604a9dd 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "dependencies": { "@graphql-eslint/eslint-plugin": "^3.20.1", "@next/eslint-plugin-next": "^14.2.15", + "@stylistic/eslint-plugin-ts": "^2.10.1", "@typescript-eslint/eslint-plugin": "^8.13.0", "@typescript-eslint/parser": "^8.13.0", "eslint-config-prettier": "^9.1.0",