From a397ae8db38419d59976f3a6316d517e9179aec3 Mon Sep 17 00:00:00 2001 From: Grace Park Date: Mon, 27 Jan 2025 16:22:30 +0000 Subject: [PATCH] prettier updates --- lib/configs/flat/typescript.js | 47 +++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/lib/configs/flat/typescript.js b/lib/configs/flat/typescript.js index d60c3c32..f01bee4b 100644 --- a/lib/configs/flat/typescript.js +++ b/lib/configs/flat/typescript.js @@ -4,25 +4,30 @@ const escompat = require('eslint-plugin-escompat') const github = require('../../plugin') const {fixupPluginRules} = require('@eslint/compat') -module.exports = tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended, ...escompat.configs['flat/typescript-2020'], { - languageOptions: { - parser: tseslint.parser, +module.exports = tseslint.config( + eslint.configs.recommended, + ...tseslint.configs.recommended, + ...escompat.configs['flat/typescript-2020'], + { + languageOptions: { + parser: tseslint.parser, + }, + plugins: {'@typescript-eslint': tseslint.plugin, escompat, github: fixupPluginRules(github)}, + rules: { + camelcase: 'off', + 'no-unused-vars': 'off', + 'no-shadow': 'off', + 'no-invalid-this': 'off', + '@typescript-eslint/no-invalid-this': ['error'], + '@typescript-eslint/no-shadow': ['error'], + '@typescript-eslint/interface-name-prefix': 'off', + '@typescript-eslint/array-type': ['error', {default: 'array-simple'}], + '@typescript-eslint/no-use-before-define': 'off', + '@typescript-eslint/explicit-member-accessibility': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', + '@typescript-eslint/no-unused-vars': 'error', + '@typescript-eslint/explicit-module-boundary-types': 'off', + }, }, - plugins: {'@typescript-eslint': tseslint.plugin, escompat, github: fixupPluginRules(github)}, - rules: { - camelcase: 'off', - 'no-unused-vars': 'off', - 'no-shadow': 'off', - 'no-invalid-this': 'off', - '@typescript-eslint/no-invalid-this': ['error'], - '@typescript-eslint/no-shadow': ['error'], - '@typescript-eslint/interface-name-prefix': 'off', - '@typescript-eslint/array-type': ['error', {default: 'array-simple'}], - '@typescript-eslint/no-use-before-define': 'off', - '@typescript-eslint/explicit-member-accessibility': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/no-unused-vars': 'error', - '@typescript-eslint/explicit-module-boundary-types': 'off', - }, -}) +)