Skip to content

Commit a17f8ce

Browse files
authored
Merge pull request #566 from hildjj/update-eslint
Update all dependencies, including `@peggyjs/eslint-config`.
2 parents 74791f2 + 2359ca8 commit a17f8ce

13 files changed

+1089
-753
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ Released: 2023-02-21
245245
the list of JavaScript reserved words. This will break existing grammars
246246
that use any of the new words in their rule or label names. from @hildjj
247247

248-
Important information for plug-in authors: PR [#291] added 4 new opcodes to the bytecode:
248+
Important information for plug-in authors: PR #291 added 4 new opcodes to the bytecode:
249249
- `IF_LT`
250250
- `IF_GE`
251251
- `IF_LT_DYNAMIC`

docs/.eleventy.js

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ module.exports = function (eleventyConfig) {
88
eleventyConfig.addPassthroughCopy("development/favicon.ico");
99
eleventyConfig.addPassthroughCopy("CNAME");
1010

11+
eleventyConfig.ignores.add("README.md");
12+
1113
eleventyConfig.setServerOptions({
1214
// Opt-out of the live reload snippet
1315
enabled: true,

docs/_includes/base-layout.html

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
name="description"
99
content="Peggy is a parser generator for JavaScript based on the parsing expression grammar formalism."
1010
/>
11+
<meta name="generator" content="{{ eleventy.generator }}">
1112
<title>{% if title %}{{ title }} &raquo; {% endif %}Peggy &ndash; Parser Generator for JavaScript</title>
1213
<link rel="stylesheet" href="{{ "/css/common.css" | url }}" />
1314
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />

docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"author": "",
1313
"license": "ISC",
1414
"devDependencies": {
15-
"@11ty/eleventy": "^2.0.1"
15+
"@11ty/eleventy": "^3.0.0"
1616
},
1717
"browserslist": [
1818
"defaults, maintained node versions, not op_mini all"

eslint.config.js

-63
This file was deleted.

eslint.config.mjs

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import commonjs from "@peggyjs/eslint-config/commonjs.js";
2+
import compat from "eslint-plugin-compat";
3+
import mocha from "@peggyjs/eslint-config/mocha.js";
4+
import { modern } from "@peggyjs/eslint-config/modern.js";
5+
import ts from "@peggyjs/eslint-config/ts.js";
6+
7+
export default [
8+
{
9+
ignores: [
10+
"benchmark/**",
11+
"build/**",
12+
"examples/*.js", // Testing examples
13+
"test/cli/fixtures/bad.js", // Intentionally-invalid
14+
"test/cli/fixtures/imports_peggy.js", // Generated
15+
"test/cli/fixtures/lib.js", // Generated
16+
"test/cli/fixtures/useFrags/fs.js", // Generated
17+
"test/cli/fixtures/useFrags/identifier.js", // Generated
18+
"lib/parser.js", // Generated
19+
"bin/generated_template.d.ts", // Generated
20+
],
21+
},
22+
...commonjs,
23+
...mocha,
24+
...ts,
25+
{
26+
...modern,
27+
// All of these can use modern JS and node constructs
28+
files: ["bin/*.js", "tools/**", "web-test/**", "src/*.mjs"],
29+
},
30+
{
31+
// Check these files for broad browser compatibility.
32+
files: [
33+
"**/*.min.js",
34+
"lib/parser.js",
35+
],
36+
plugins: {
37+
compat,
38+
},
39+
rules: {
40+
"compat/compat": "error",
41+
},
42+
},
43+
];

lib/peg.d.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -1283,6 +1283,11 @@ export interface Dependencies {
12831283
}
12841284

12851285
export interface BuildOptionsBase {
1286+
/**
1287+
* Plugins and Peggy compiler rules can take any config items they want.
1288+
*/
1289+
[pluginConfig: string]: any;
1290+
12861291
/** Rules the parser will be allowed to start parsing from (default: the first rule in the grammar) */
12871292
allowedStartRules?: string[];
12881293

@@ -1313,10 +1318,6 @@ export interface BuildOptionsBase {
13131318
* Override parser's reserved words. Defaults to RESERVED_WORDS.
13141319
*/
13151320
reservedWords?: string[];
1316-
/**
1317-
* Plugins and Peggy compiler rules can take any config items they want.
1318-
*/
1319-
[pluginConfig: string]: any;
13201321
}
13211322

13221323
export interface ParserBuildOptions extends BuildOptionsBase {

lib/tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"extends": "../tsconfig-base.json",
33
"include": ["**/*.ts", "**/*.js"],
44
"compilerOptions": {
5-
"types": [],
5+
"types": []
66
}
77
}

package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,22 @@
5656
"version": "npm run set_version && npm run parser && npm run parser && npm run test && npm run examples && git add lib/version.js lib/parser.js docs/index.html test/cli/fixtures/imports_peggy.js test/cli/fixtures/lib.js docs/js/examples.js"
5757
},
5858
"devDependencies": {
59-
"@peggyjs/eslint-config": "^4.0.4",
59+
"@peggyjs/eslint-config": "^5.0.0",
6060
"@rollup/plugin-commonjs": "^28.0.0",
6161
"@rollup/plugin-json": "^6.1.0",
6262
"@rollup/plugin-multi-entry": "^6.0.1",
6363
"@rollup/plugin-node-resolve": "^15.3.0",
6464
"@rollup/plugin-typescript": "^12.1.0",
6565
"@types/chai": "^4.3.11",
6666
"@types/jest": "^29.5.13",
67-
"@types/node": "^22.7.4",
67+
"@types/node": "^22.7.5",
6868
"chai": "^4.3.11",
6969
"chai-like": "^1.1.3",
7070
"copyfiles": "^2.4.1",
71-
"eslint": "^9.11.1",
71+
"eslint": "^9.12.0",
7272
"eslint-plugin-compat": "6.0.1",
7373
"eslint-plugin-mocha": "10.5.0",
74-
"express": "4.21.0",
74+
"express": "4.21.1",
7575
"glob": "^11.0.0",
7676
"jest": "^29.7.0",
7777
"package-extract": "2.3.0",
@@ -83,10 +83,10 @@
8383
"ts-jest": "^29.2.5",
8484
"tslib": "^2.7.0",
8585
"typescript": "5.5.4",
86-
"typescript-eslint": "8.8.0"
86+
"typescript-eslint": "8.8.1"
8787
},
8888
"dependencies": {
89-
"@peggyjs/from-mem": "1.3.4",
89+
"@peggyjs/from-mem": "1.3.5",
9090
"commander": "^12.1.0",
9191
"source-map-generator": "0.8.0"
9292
},
@@ -98,7 +98,7 @@
9898
"browserslist": [
9999
"defaults, maintained node versions, not op_mini all"
100100
],
101-
"packageManager": "[email protected].0",
101+
"packageManager": "[email protected].1",
102102
"engines": {
103103
"node": ">=18"
104104
}

0 commit comments

Comments
 (0)