Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Unexpected top-level property "default", targeting for legacy Node.js versions #1750

Merged
merged 21 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/proud-shoes-travel.md
@@ -0,0 +1,6 @@
---
'@graphql-eslint/eslint-plugin': patch
---

ESLint configuration in ... is invalid. Unexpected top-level property "default".
Fix targeting for legacy Node.js versions
15 changes: 7 additions & 8 deletions .github/workflows/tests.yml
Expand Up @@ -57,7 +57,7 @@ jobs:
needs: [typecheck]
strategy:
matrix:
node_version: [12, 16, 18]
node_version: [16, 18, 20]
graphql_version: [15, 16]

steps:
Expand All @@ -69,7 +69,7 @@ jobs:
- name: Setup env
uses: the-guild-org/shared-config/setup@main
with:
nodeVersion: ${{matrix.node-version}}
nodeVersion: ${{matrix.node_version}}
packageManager: pnpm

- name: Use GraphQL v${{matrix.graphql_version}}
Expand All @@ -90,9 +90,8 @@ jobs:
run: pnpm test
env:
CI: true

- name: Lint ESLint
run: pnpm lint

- name: Lint Prettier
run: pnpm lint:prettier
# - name: Lint ESLint
# run: pnpm lint
#
# - name: Lint Prettier
# run: pnpm lint:prettier
5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -4,6 +4,7 @@
"author": "Dotan Simha <dotansimha@gmail.com>",
"license": "MIT",
"private": true,
"packageManager": "pnpm@7.33.3",
"scripts": {
"build": "pnpm --filter @graphql-eslint/eslint-plugin build && bob check",
"ci:lint": "eslint --ignore-path .gitignore --output-file eslint_report.json --format json .",
Expand All @@ -30,7 +31,7 @@
"chalk": "4.1.2",
"dedent": "1.0.1",
"enquirer": "2.3.6",
"eslint": "8.41.0",
"eslint": "8.44.0",
"eslint-plugin-eslint-plugin": "5.0.7",
"eslint-plugin-tailwindcss": "3.13.0",
"husky": "8.0.3",
Expand All @@ -49,7 +50,7 @@
},
"pnpm": {
"patchedDependencies": {
"eslint@8.41.0": "patches/eslint@8.31.0.patch",
"eslint@8.44.0": "patches/eslint@8.31.0.patch",
"eslint-plugin-eslint-plugin@5.0.7": "patches/eslint-plugin-eslint-plugin@5.0.6.patch",
"json-schema-to-markdown@1.1.1": "patches/json-schema-to-markdown@1.1.1.patch",
"@vitest/runner@0.30.1": "patches/@vitest__runner@0.28.4.patch"
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/src/configs/operations-all.ts
Expand Up @@ -2,7 +2,7 @@
* 🚨 IMPORTANT! Do not manually modify this file. Run: `yarn generate-configs`
*/

export default {
export = {
extends: './configs/operations-recommended',
rules: {
'@graphql-eslint/alphabetize': [
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/src/configs/operations-recommended.ts
Expand Up @@ -2,7 +2,7 @@
* 🚨 IMPORTANT! Do not manually modify this file. Run: `yarn generate-configs`
*/

export default {
export = {
parser: '@graphql-eslint/eslint-plugin',
plugins: ['@graphql-eslint'],
rules: {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/src/configs/relay.ts
@@ -1,4 +1,4 @@
export default {
export = {
parser: '@graphql-eslint/eslint-plugin',
plugins: ['@graphql-eslint'],
rules: {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/src/configs/schema-all.ts
Expand Up @@ -2,7 +2,7 @@
* 🚨 IMPORTANT! Do not manually modify this file. Run: `yarn generate-configs`
*/

export default {
export = {
extends: './configs/schema-recommended',
rules: {
'@graphql-eslint/alphabetize': [
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/src/configs/schema-recommended.ts
Expand Up @@ -2,7 +2,7 @@
* 🚨 IMPORTANT! Do not manually modify this file. Run: `yarn generate-configs`
*/

export default {
export = {
parser: '@graphql-eslint/eslint-plugin',
plugins: ['@graphql-eslint'],
rules: {
Expand Down
8 changes: 3 additions & 5 deletions packages/plugin/tsconfig.json
@@ -1,14 +1,12 @@
{
"compilerOptions": {
"target": "es2021",
"module": "ESNext",
"target": "es2019",
"module": "Node16",
"moduleResolution": "node16",
"declaration": false,
"noEmit": true,
"esModuleInterop": true,
"strict": true,
"skipLibCheck": true,
"allowJs": true,
"moduleResolution": "node",
"lib": ["ESNext"],
"types": ["vitest/globals"],
"resolveJsonModule": true
Expand Down