Skip to content

Commit 203343c

Browse files
chore: update ts rule tester to 8.27.0
1 parent d08672a commit 203343c

13 files changed

+13639
-13783
lines changed

package-lock.json

Lines changed: 13613 additions & 13751 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@salesforce/eslint-plugin-lwc-mobile",
3-
"version": "0.0.1",
3+
"version": "0.0.7",
44
"description": "ESLint plugin for LWC mobility",
55
"contributors": [
66
{
@@ -74,9 +74,8 @@
7474
"@types/eslint": "^8.56.10",
7575
"@types/estree": "^1.0.6",
7676
"@types/jest": "^29.5.14",
77-
"@typescript-eslint/eslint-plugin": "^7.8.0",
78-
"@typescript-eslint/parser": "^7.18.0",
79-
"@typescript-eslint/rule-tester": "^7.8.0",
77+
"@typescript-eslint/parser": "^8.27.0",
78+
"@typescript-eslint/rule-tester": "^8.27.0",
8079
"conventional-changelog-conventionalcommits": "^8.0.0",
8180
"eslint": "^8.57.0",
8281
"eslint-plugin-eslint-plugin": "^6.4.0",
@@ -94,7 +93,7 @@
9493
"ts-node": "^10.9.2",
9594
"typescript": "^5.8.2",
9695
"typescript-eslint": "^8.17.0"
97-
},
96+
},
9897
"peerDependencies": {
9998
"eslint": ">=7"
10099
},

test/rules/apex/apex-import.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@
66
*/
77

88
import { RuleTester } from '@typescript-eslint/rule-tester';
9+
import { parseForESLint } from '@typescript-eslint/parser';
910

1011
import { rule, APEX_IMPORT_RULE_ID } from '../../../src/rules/apex/apex-import';
11-
import { createScopedModuleRuleName } from '../../../src/util/rule-helpers';
1212

1313
const ruleTester = new RuleTester({
14-
parser: '@typescript-eslint/parser'
14+
languageOptions: {
15+
parser: { parseForESLint }
16+
}
1517
});
1618

17-
ruleTester.run(createScopedModuleRuleName(APEX_IMPORT_RULE_ID), rule, {
19+
ruleTester.run(APEX_IMPORT_RULE_ID, rule as any, {
1820
valid: [
1921
{
2022
code: `

test/rules/graphql/no-aggregate-query-supported.spec.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ import {
99
rule,
1010
NO_AGGREGATE_QUERY_SUPPORTED_RULE_ID
1111
} from '../../../src/rules/graphql/no-aggregate-query-supported';
12-
import { createScopedModuleRuleName } from '../../../src/util/rule-helpers';
13-
1412
import { ruleTester } from '../../shared';
1513

16-
ruleTester.run(createScopedModuleRuleName(NO_AGGREGATE_QUERY_SUPPORTED_RULE_ID), rule as any, {
14+
ruleTester.run(NO_AGGREGATE_QUERY_SUPPORTED_RULE_ID, rule as any, {
1715
valid: [
1816
{
1917
code: /* GraphQL */ `

test/rules/graphql/no-fiscal-date-filtering-supported.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212

1313
import { ruleTester } from '../../shared';
1414

15-
ruleTester.run('@salesforce/lwc-mobile/no-fiscal-date-filtering-supported', rule as any, {
15+
ruleTester.run(NO_FISCAL_DATE_FILTER_SUPPORTED_RULE_ID, rule as any, {
1616
valid: [
1717
{
1818
code: /* GraphQL */ `

test/rules/graphql/no-more-than-1-parent-record.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ import {
99
rule,
1010
NO_MORE_THAN_1_PARENT_RECORD_RULE_ID
1111
} from '../../../src/rules/graphql/no-more-than-1-parent-record';
12-
import { createScopedModuleRuleName } from '../../../src/util/rule-helpers';
1312

1413
import { ruleTester } from '../../shared';
1514

16-
ruleTester.run(createScopedModuleRuleName(NO_MORE_THAN_1_PARENT_RECORD_RULE_ID), rule as any, {
15+
ruleTester.run(NO_MORE_THAN_1_PARENT_RECORD_RULE_ID, rule as any, {
1716
valid: [
1817
{
1918
code: /* GraphQL */ `

test/rules/graphql/no-more-than-100-fields.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ import {
99
rule,
1010
NO_MORE_THAN_100_FIELDS_RULE_ID
1111
} from '../../../src/rules/graphql/no-more-than-100-fields';
12-
import { createScopedModuleRuleName } from '../../../src/util/rule-helpers';
1312

1413
import { ruleTester } from '../../shared';
1514

16-
ruleTester.run(createScopedModuleRuleName(NO_MORE_THAN_100_FIELDS_RULE_ID), rule as any, {
15+
ruleTester.run(NO_MORE_THAN_100_FIELDS_RULE_ID, rule as any, {
1716
valid: [
1817
{
1918
code: /* GraphQL */ `

test/rules/graphql/no-more-than-3-children-entities.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ import {
99
rule,
1010
NO_MORE_THAN_3_CHILD_ENTITIES_RULE_ID
1111
} from '../../../src/rules/graphql/no-more-than-3-child-entities';
12-
import { createScopedModuleRuleName } from '../../../src/util/rule-helpers';
1312

1413
import { ruleTester } from '../../shared';
1514

16-
ruleTester.run(createScopedModuleRuleName(NO_MORE_THAN_3_CHILD_ENTITIES_RULE_ID), rule as any, {
15+
ruleTester.run(NO_MORE_THAN_3_CHILD_ENTITIES_RULE_ID, rule as any, {
1716
valid: [
1817
{
1918
code: /* GraphQL */ `

test/rules/graphql/no-more-than-3-root-entities.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ import {
99
rule,
1010
NO_MORE_THAN_3_ROOT_ENTITIES_RULE_ID
1111
} from '../../../src/rules/graphql/no-more-than-3-root-entities';
12-
import { createScopedModuleRuleName } from '../../../src/util/rule-helpers';
1312

1413
import { ruleTester } from '../../shared';
1514

16-
ruleTester.run(createScopedModuleRuleName(NO_MORE_THAN_3_ROOT_ENTITIES_RULE_ID), rule as any, {
15+
ruleTester.run(NO_MORE_THAN_3_ROOT_ENTITIES_RULE_ID, rule as any, {
1716
valid: [
1817
{
1918
code: /* GraphQL */ `

test/rules/graphql/no-mutation-supported.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ import {
99
rule,
1010
NO_MUTATION_SUPPORTED_RULE_ID
1111
} from '../../../src/rules/graphql/no-mutation-supported';
12-
import { createScopedModuleRuleName } from '../../../src/util/rule-helpers';
1312

1413
import { ruleTester } from '../../shared';
1514

16-
ruleTester.run(createScopedModuleRuleName(NO_MUTATION_SUPPORTED_RULE_ID), rule as any, {
15+
ruleTester.run(NO_MUTATION_SUPPORTED_RULE_ID, rule as any, {
1716
valid: [
1817
{
1918
code: /* GraphQL */ `

test/rules/graphql/no-semi-anti-join-supported.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ import {
99
rule,
1010
NO_SEMI_ANTI_JOIN_SUPPORTED_RULE_ID
1111
} from '../../../src/rules/graphql/no-semi-anti-join-supported';
12-
import { createScopedModuleRuleName } from '../../../src/util/rule-helpers';
1312

1413
import { ruleTester } from '../../shared';
1514

16-
ruleTester.run(createScopedModuleRuleName(NO_SEMI_ANTI_JOIN_SUPPORTED_RULE_ID), rule as any, {
15+
ruleTester.run(NO_SEMI_ANTI_JOIN_SUPPORTED_RULE_ID, rule as any, {
1716
valid: [
1817
{
1918
code: /* GraphQL */ `

test/rules/graphql/unsupported-scope.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
} from '../../../src/rules/graphql/unsupported-scope';
1313
import { ruleTester } from '../../shared';
1414

15-
ruleTester.run('@salesforce/lwc-mobile/offline-graphql-unsupported-scope', rule as any, {
15+
ruleTester.run('offline-graphql-unsupported-scope', rule as any, {
1616
valid: [
1717
{
1818
code: /* GraphQL */ `

test/shared.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
*/
77

88
import { RuleTester } from '@typescript-eslint/rule-tester';
9+
import { parseForESLint } from '@graphql-eslint/eslint-plugin';
910

10-
const RULE_TESTER_CONFIG = {
11-
parser: '@graphql-eslint/eslint-plugin',
12-
parserOptions: {
13-
graphQLConfig: {}
11+
export const ruleTester = new RuleTester({
12+
languageOptions: {
13+
parser: { parseForESLint },
14+
parserOptions: {
15+
graphQLConfig: {}
16+
}
1417
}
15-
};
16-
17-
export const ruleTester = new RuleTester(RULE_TESTER_CONFIG);
18+
});

0 commit comments

Comments
 (0)