From 3438ec9df66bab22e11524f575427e456fe16fb0 Mon Sep 17 00:00:00 2001 From: "haifeng.li" Date: Mon, 13 May 2024 16:17:13 -0700 Subject: [PATCH] plugin initialization works --- .eslintrc | 19 ------------------- src/configs/base.ts | 20 +++++++++++++++++++- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.eslintrc b/.eslintrc index 6c5276e..d46ebec 100644 --- a/.eslintrc +++ b/.eslintrc @@ -2,25 +2,6 @@ "root": true, "extends": ["eslint:recommended", "plugin:@salesforce/lwc-mobile/recommended"], - "plugins": ["@salesforce/lwc-mobile", "@graphql-eslint"], - "overrides": [ - { - "files": ["graphqlBatchTest.js"], - "processor": "@graphql-eslint/graphql" - }, - { - "files": ["*.graphql"], - "parser": "@graphql-eslint/eslint-plugin", - - "parserOptions": { - "skipGraphQLConfig": true - }, - "rules": { - "@salesforce/lwc-mobile/enforce-foo-bar": "warn", - "@salesforce/lwc-mobile/no-more-than-2-fields": "warn" - } - } - ], "env": { "jest": true, "node": true diff --git a/src/configs/base.ts b/src/configs/base.ts index 3453c49..516e801 100644 --- a/src/configs/base.ts +++ b/src/configs/base.ts @@ -7,5 +7,23 @@ import type { ClassicConfig } from '@typescript-eslint/utils/ts-eslint'; export = { - plugins: ['@salesforce/lwc-mobile'] + plugins: ['@salesforce/lwc-mobile', '@graphql-eslint'], + overrides: [ + { + files: ['graphqlBatchTest.js'], + processor: '@graphql-eslint/graphql' + }, + { + files: ['*.graphql'], + parser: '@graphql-eslint/eslint-plugin', + + parserOptions: { + skipGraphQLConfig: true + }, + rules: { + '@salesforce/lwc-mobile/enforce-foo-bar': 'warn', + '@salesforce/lwc-mobile/no-more-than-2-fields': 'warn' + } + } + ] } satisfies ClassicConfig.Config;