From 452a0b4897d0b32bf172f8bddb21d3062e01cd58 Mon Sep 17 00:00:00 2001 From: Grace Park Date: Mon, 27 Jan 2025 16:16:36 +0000 Subject: [PATCH 1/6] update escompat plugin --- lib/configs/flat/browser.js | 8 ++++---- lib/configs/flat/typescript.js | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/configs/flat/browser.js b/lib/configs/flat/browser.js index 67ba85fe..f605a042 100644 --- a/lib/configs/flat/browser.js +++ b/lib/configs/flat/browser.js @@ -1,19 +1,19 @@ const globals = require('globals') const github = require('../../plugin') const importPlugin = require('eslint-plugin-import') -const escompatPlugin = require('eslint-plugin-escompat') +const escompat = require('eslint-plugin-escompat') const {fixupPluginRules} = require('@eslint/compat') module.exports = { - ...escompatPlugin.configs['flat/recommended'], + ...escompat.configs['flat/recommended'], languageOptions: { globals: { ...globals.browser, }, }, - plugins: {importPlugin, escompatPlugin, github: fixupPluginRules(github)}, + plugins: {importPlugin, escompat, github: fixupPluginRules(github)}, rules: { - 'escompatPlugin/no-dynamic-imports': 'off', + 'escompat/no-dynamic-imports': 'off', 'github/async-currenttarget': 'error', 'github/async-preventdefault': 'error', 'github/get-attribute': 'error', diff --git a/lib/configs/flat/typescript.js b/lib/configs/flat/typescript.js index 50cc6c05..d60c3c32 100644 --- a/lib/configs/flat/typescript.js +++ b/lib/configs/flat/typescript.js @@ -1,14 +1,14 @@ const eslint = require('@eslint/js') const tseslint = require('typescript-eslint') -const escompatPlugin = require('eslint-plugin-escompat') +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, { +module.exports = tseslint.config(eslint.configs.recommended, ...tseslint.configs.recommended, ...escompat.configs['flat/typescript-2020'], { languageOptions: { parser: tseslint.parser, }, - plugins: {'@typescript-eslint': tseslint.plugin, escompatPlugin, github: fixupPluginRules(github)}, + plugins: {'@typescript-eslint': tseslint.plugin, escompat, github: fixupPluginRules(github)}, rules: { camelcase: 'off', 'no-unused-vars': 'off', From a397ae8db38419d59976f3a6316d517e9179aec3 Mon Sep 17 00:00:00 2001 From: Grace Park Date: Mon, 27 Jan 2025 16:22:30 +0000 Subject: [PATCH 2/6] 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', - }, -}) +) From a937d83117bed93fcbbafb95fc88b238af4ed377 Mon Sep 17 00:00:00 2001 From: Grace Park Date: Mon, 27 Jan 2025 08:35:23 -0800 Subject: [PATCH 3/6] Update TypeScript ESLint configuration --- lib/configs/flat/typescript.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/configs/flat/typescript.js b/lib/configs/flat/typescript.js index f01bee4b..9218f73e 100644 --- a/lib/configs/flat/typescript.js +++ b/lib/configs/flat/typescript.js @@ -5,7 +5,6 @@ const github = require('../../plugin') const {fixupPluginRules} = require('@eslint/compat') module.exports = tseslint.config( - eslint.configs.recommended, ...tseslint.configs.recommended, ...escompat.configs['flat/typescript-2020'], { From 764eab3c6ff8d1c543a6adc59fd16472737dc977 Mon Sep 17 00:00:00 2001 From: Grace Park Date: Mon, 27 Jan 2025 16:37:51 +0000 Subject: [PATCH 4/6] run prettier --- lib/configs/flat/typescript.js | 47 +++++++++++++++------------------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/lib/configs/flat/typescript.js b/lib/configs/flat/typescript.js index 9218f73e..29c48e2d 100644 --- a/lib/configs/flat/typescript.js +++ b/lib/configs/flat/typescript.js @@ -1,32 +1,27 @@ -const eslint = require('@eslint/js') const tseslint = require('typescript-eslint') const escompat = require('eslint-plugin-escompat') const github = require('../../plugin') const {fixupPluginRules} = require('@eslint/compat') -module.exports = tseslint.config( - ...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', - }, +module.exports = tseslint.config(...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', + }, +}) From f14cf2aba80f8e105724cf3b1353c0e56e8db5d8 Mon Sep 17 00:00:00 2001 From: Grace Park Date: Mon, 27 Jan 2025 18:48:40 +0000 Subject: [PATCH 5/6] update jsx-a11y name --- lib/configs/flat/react.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/configs/flat/react.js b/lib/configs/flat/react.js index 497505fc..9243bce8 100644 --- a/lib/configs/flat/react.js +++ b/lib/configs/flat/react.js @@ -14,21 +14,21 @@ module.exports = { }, plugins: {github: fixupPluginRules(github), jsxA11yPlugin}, rules: { - 'jsxA11yPlugin/role-supports-aria-props': 'off', // Override with github/a11y-role-supports-aria-props until https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/910 is resolved + 'jsx-a11y/role-supports-aria-props': 'off', // Override with github/a11y-role-supports-aria-props until https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/910 is resolved 'github/a11y-aria-label-is-well-formatted': 'error', 'github/a11y-no-visually-hidden-interactive-element': 'error', 'github/a11y-no-title-attribute': 'error', 'github/a11y-svg-has-accessible-name': 'error', 'github/a11y-role-supports-aria-props': 'error', - 'jsxA11yPlugin/no-aria-hidden-on-focusable': 'error', - 'jsxA11yPlugin/no-autofocus': 'off', - 'jsxA11yPlugin/anchor-ambiguous-text': [ + 'jsx-a11y/no-aria-hidden-on-focusable': 'error', + 'jsx-a11y/no-autofocus': 'off', + 'jsx-a11y/anchor-ambiguous-text': [ 'error', { words: ['this', 'more', 'read here', 'read more'], }, ], - 'jsxA11yPlugin/no-interactive-element-to-noninteractive-role': [ + 'jsx-a11y/no-interactive-element-to-noninteractive-role': [ 'error', { tr: ['none', 'presentation'], @@ -36,7 +36,7 @@ module.exports = { canvas: ['img'], }, ], - 'jsxA11yPlugin/no-redundant-roles': [ + 'jsx-a11y/no-redundant-roles': [ 'error', { nav: ['navigation'], // default in eslint-plugin-jsx-a11y From bc44e01e05641681ec304ab2a859bd7813c32de9 Mon Sep 17 00:00:00 2001 From: Grace Park Date: Mon, 27 Jan 2025 20:39:15 +0000 Subject: [PATCH 6/6] update import --- eslint.config.js | 6 ++--- lib/configs/flat/browser.js | 4 +-- lib/configs/flat/react.js | 2 +- lib/configs/flat/recommended.js | 44 ++++++++++++++++----------------- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index e5dae376..94e32e6d 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -21,12 +21,12 @@ module.exports = [ }, plugins: { eslintPlugin, - importPlugin, + import: importPlugin, 'i18n-text': fixupPluginRules(i18nTextPlugin), }, rules: { - 'importPlugin/extensions': 'off', - 'importPlugin/no-commonjs': 'off', + 'import/extensions': 'off', + 'import/no-commonjs': 'off', 'github/filenames-match-regex': 'off', 'i18n-text/no-en': 'off', 'eslint-plugin/prefer-placeholders': 'off', diff --git a/lib/configs/flat/browser.js b/lib/configs/flat/browser.js index f605a042..18311b62 100644 --- a/lib/configs/flat/browser.js +++ b/lib/configs/flat/browser.js @@ -11,7 +11,7 @@ module.exports = { ...globals.browser, }, }, - plugins: {importPlugin, escompat, github: fixupPluginRules(github)}, + plugins: {import: importPlugin, escompat, github: fixupPluginRules(github)}, rules: { 'escompat/no-dynamic-imports': 'off', 'github/async-currenttarget': 'error', @@ -25,7 +25,7 @@ module.exports = { 'github/no-useless-passive': 'error', 'github/require-passive-events': 'error', 'github/prefer-observers': 'error', - 'importPlugin/no-nodejs-modules': 'error', + 'import/no-nodejs-modules': 'error', 'no-restricted-syntax': [ 'error', { diff --git a/lib/configs/flat/react.js b/lib/configs/flat/react.js index 9243bce8..193e3c2d 100644 --- a/lib/configs/flat/react.js +++ b/lib/configs/flat/react.js @@ -12,7 +12,7 @@ module.exports = { }, }, }, - plugins: {github: fixupPluginRules(github), jsxA11yPlugin}, + plugins: {github: fixupPluginRules(github), 'jsx-a11y': jsxA11yPlugin}, rules: { 'jsx-a11y/role-supports-aria-props': 'off', // Override with github/a11y-role-supports-aria-props until https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/issues/910 is resolved 'github/a11y-aria-label-is-well-formatted': 'error', diff --git a/lib/configs/flat/recommended.js b/lib/configs/flat/recommended.js index 2f089a19..e3c72988 100644 --- a/lib/configs/flat/recommended.js +++ b/lib/configs/flat/recommended.js @@ -18,7 +18,7 @@ module.exports = { plugins: { prettierPlugin, eslintComments, - importPlugin, + import: importPlugin, 'i18n-text': fixupPluginRules(i18nTextPlugin), noOnlyTestsPlugin, github: fixupPluginRules(github), @@ -39,15 +39,15 @@ module.exports = { 'github/no-then': 'error', 'github/no-dynamic-script-tag': 'error', 'i18n-text/no-en': ['error'], - 'importPlugin/default': 'error', - 'importPlugin/export': 'error', - 'importPlugin/extensions': 'error', - 'importPlugin/first': 'error', - 'importPlugin/named': 'error', - 'importPlugin/namespace': 'error', - 'importPlugin/no-absolute-path': 'error', - 'importPlugin/no-amd': 'error', - 'importPlugin/no-anonymous-default-export': [ + 'import/default': 'error', + 'import/export': 'error', + 'import/extensions': 'error', + 'import/first': 'error', + 'import/named': 'error', + 'import/namespace': 'error', + 'import/no-absolute-path': 'error', + 'import/no-amd': 'error', + 'import/no-anonymous-default-export': [ 'error', { allowAnonymousClass: false, @@ -58,17 +58,17 @@ module.exports = { allowObject: true, }, ], - 'importPlugin/no-commonjs': 'error', - 'importPlugin/no-deprecated': 'error', - 'importPlugin/no-duplicates': 'error', - 'importPlugin/no-dynamic-require': 'error', - 'importPlugin/no-extraneous-dependencies': [0, {devDependencies: false}], - 'importPlugin/no-mutable-exports': 'error', - 'importPlugin/no-named-as-default': 'error', - 'importPlugin/no-named-as-default-member': 'error', - 'importPlugin/no-namespace': 'error', - 'importPlugin/no-unresolved': 'error', - 'importPlugin/no-webpack-loader-syntax': 'error', + 'import/no-commonjs': 'error', + 'import/no-deprecated': 'error', + 'import/no-duplicates': 'error', + 'import/no-dynamic-require': 'error', + 'import/no-extraneous-dependencies': [0, {devDependencies: false}], + 'import/no-mutable-exports': 'error', + 'import/no-named-as-default': 'error', + 'import/no-named-as-default-member': 'error', + 'import/no-namespace': 'error', + 'import/no-unresolved': 'error', + 'import/no-webpack-loader-syntax': 'error', 'no-case-declarations': 'error', 'no-class-assign': 'error', 'no-compare-neg-zero': 'error', @@ -139,7 +139,7 @@ module.exports = { eqeqeq: ['error', 'smart'], }, settings: { - 'importPlugin/resolver': { + 'import/resolver': { node: { extensions: ['.js', '.ts'], }, pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy