Skip to content

Commit d52585a

Browse files
authored
run tests on node 22 (#2483)
* run tests on node 22 * add description in rules * more * more * fix tests * fix markdown link * fix * a * aa
1 parent ac4679c commit d52585a

File tree

69 files changed

+330
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+330
-7
lines changed

.changeset/chilly-ants-exist.md

Lines changed: 5 additions & 0 deletions

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ubuntu-latest
2222
strategy:
2323
matrix:
24-
graphql_version: [15, 16]
24+
graphql_version: [16]
2525

2626
steps:
2727
- name: Checkout Master
@@ -39,13 +39,13 @@ jobs:
3939
run: pnpm build
4040

4141
test:
42-
name: Node.js v${{matrix.node_version}} / GraphQL v${{matrix.graphql_version}} / ESLint v8
42+
name: Node.js v${{matrix.node_version}} / GraphQL v${{matrix.graphql_version}} / ESLint v9
4343
timeout-minutes: 60
4444
runs-on: ubuntu-latest
4545
needs: [typecheck]
4646
strategy:
4747
matrix:
48-
node_version: [18, 20.7]
48+
node_version: [18, 20, 22]
4949
graphql_version: [16]
5050

5151
steps:

packages/plugin/__tests__/examples.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function getESLintOutput(cwd: string): ESLint.LintResult[] {
2626
'',
2727
)
2828
.replace(
29-
/\(node:\d{4}\) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js./,
29+
/\(node:\d{4,5}\) \[DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead./,
3030
'',
3131
)
3232
.replace('(Use `node --trace-warnings ...` to show where the warning was created)', '')

packages/plugin/src/meta.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import packageJson from '../package.json' assert { type: 'json' };
1+
import packageJson from '../package.json' with { type: 'json' };
22

3-
export const { name, version } = packageJson;
3+
export const { version } = packageJson;

scripts/generate-docs.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,18 @@ function printMarkdownTable(columns: (Column | string)[], dataSource: string[][]
4848
].join('\n');
4949
}
5050

51+
const MARKDOWN_LINK_RE = /\[(.*?)]\(.*\)/;
52+
5153
async function generateDocs(): Promise<void> {
5254
const prettierConfig = await prettier.resolveConfig('./docs/README.md');
5355

5456
const result = Object.entries(rules).map(async ([ruleName, rule]) => {
55-
const blocks: string[] = [`# \`${ruleName}\``];
57+
const blocks: string[] = [
58+
'---',
59+
`description: ${JSON.stringify(rule.meta.docs!.description!.replace(/\n.*/g, '').replace(MARKDOWN_LINK_RE, '$1'))}`,
60+
'---',
61+
`# \`${ruleName}\``,
62+
];
5663
const { deprecated, docs, schema, fixable, hasSuggestions } = rule.meta;
5764

5865
if (deprecated) {

website/src/pages/rules/alphabetize.md

Lines changed: 6 additions & 0 deletions

website/src/pages/rules/description-style.md

Lines changed: 4 additions & 0 deletions

website/src/pages/rules/executable-definitions.md

Lines changed: 6 additions & 0 deletions

website/src/pages/rules/fields-on-correct-type.md

Lines changed: 6 additions & 0 deletions

website/src/pages/rules/fragments-on-composite-type.md

Lines changed: 7 additions & 0 deletions

0 commit comments

Comments
 (0)