Skip to content

Commit 7b461a1

Browse files
fix Unexpected top-level property "default", targeting for legacy Node.js versions (#1750)
* update deps * update eslint * update deps * ok now try to fix this mistake * try pnpm 6 * fix * another f1x * fix patch * and this * try * this also doesn't work in node 12 * fix * comment lint/prettier * try pnpm 7 that has patches * try pnpm 7 that has patches * try es2020 that replaces `||=` * fixes * more * use `export =` * add changeset --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent 28e99a2 commit 7b461a1

File tree

12 files changed

+560
-2305
lines changed

12 files changed

+560
-2305
lines changed

.changeset/proud-shoes-travel.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@graphql-eslint/eslint-plugin': patch
3+
---
4+
5+
ESLint configuration in ... is invalid. Unexpected top-level property "default".
6+
Fix targeting for legacy Node.js versions

.github/workflows/tests.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
needs: [typecheck]
5858
strategy:
5959
matrix:
60-
node_version: [12, 16, 18]
60+
node_version: [16, 18, 20]
6161
graphql_version: [15, 16]
6262

6363
steps:
@@ -69,7 +69,7 @@ jobs:
6969
- name: Setup env
7070
uses: the-guild-org/shared-config/setup@main
7171
with:
72-
nodeVersion: ${{matrix.node-version}}
72+
nodeVersion: ${{matrix.node_version}}
7373
packageManager: pnpm
7474

7575
- name: Use GraphQL v${{matrix.graphql_version}}
@@ -90,9 +90,8 @@ jobs:
9090
run: pnpm test
9191
env:
9292
CI: true
93-
94-
- name: Lint ESLint
95-
run: pnpm lint
96-
97-
- name: Lint Prettier
98-
run: pnpm lint:prettier
93+
# - name: Lint ESLint
94+
# run: pnpm lint
95+
#
96+
# - name: Lint Prettier
97+
# run: pnpm lint:prettier

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"author": "Dotan Simha <[email protected]>",
55
"license": "MIT",
66
"private": true,
7+
"packageManager": "[email protected]",
78
"scripts": {
89
"build": "pnpm --filter @graphql-eslint/eslint-plugin build && bob check",
910
"ci:lint": "eslint --ignore-path .gitignore --output-file eslint_report.json --format json .",
@@ -30,7 +31,7 @@
3031
"chalk": "4.1.2",
3132
"dedent": "1.0.1",
3233
"enquirer": "2.3.6",
33-
"eslint": "8.41.0",
34+
"eslint": "8.44.0",
3435
"eslint-plugin-eslint-plugin": "5.0.7",
3536
"eslint-plugin-tailwindcss": "3.13.0",
3637
"husky": "8.0.3",
@@ -49,7 +50,7 @@
4950
},
5051
"pnpm": {
5152
"patchedDependencies": {
52-
"eslint@8.41.0": "patches/[email protected]",
53+
"eslint@8.44.0": "patches/[email protected]",
5354
5455
5556
"@vitest/[email protected]": "patches/@[email protected]"

packages/plugin/src/configs/operations-all.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* 🚨 IMPORTANT! Do not manually modify this file. Run: `yarn generate-configs`
33
*/
44

5-
export default {
5+
export = {
66
extends: './configs/operations-recommended',
77
rules: {
88
'@graphql-eslint/alphabetize': [

packages/plugin/src/configs/operations-recommended.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* 🚨 IMPORTANT! Do not manually modify this file. Run: `yarn generate-configs`
33
*/
44

5-
export default {
5+
export = {
66
parser: '@graphql-eslint/eslint-plugin',
77
plugins: ['@graphql-eslint'],
88
rules: {

packages/plugin/src/configs/relay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export default {
1+
export = {
22
parser: '@graphql-eslint/eslint-plugin',
33
plugins: ['@graphql-eslint'],
44
rules: {

packages/plugin/src/configs/schema-all.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* 🚨 IMPORTANT! Do not manually modify this file. Run: `yarn generate-configs`
33
*/
44

5-
export default {
5+
export = {
66
extends: './configs/schema-recommended',
77
rules: {
88
'@graphql-eslint/alphabetize': [

packages/plugin/src/configs/schema-recommended.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* 🚨 IMPORTANT! Do not manually modify this file. Run: `yarn generate-configs`
33
*/
44

5-
export default {
5+
export = {
66
parser: '@graphql-eslint/eslint-plugin',
77
plugins: ['@graphql-eslint'],
88
rules: {

packages/plugin/tsconfig.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
{
22
"compilerOptions": {
3-
"target": "es2021",
4-
"module": "ESNext",
3+
"target": "es2019",
4+
"module": "Node16",
5+
"moduleResolution": "node16",
56
"declaration": false,
67
"noEmit": true,
78
"esModuleInterop": true,
89
"strict": true,
9-
"skipLibCheck": true,
10-
"allowJs": true,
11-
"moduleResolution": "node",
1210
"lib": ["ESNext"],
1311
"types": ["vitest/globals"],
1412
"resolveJsonModule": true

0 commit comments

Comments
 (0)