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

Deprecate old browsers #464

Merged
merged 3 commits into from
Feb 8, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 0 additions & 42 deletions .eslintrc.js

This file was deleted.

15 changes: 15 additions & 0 deletions docs/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ <h2 id="table-of-contents">Table of Contents</h2>
<li><a href="#installation-browser">Browser</a></li>
</ul>
</li>
<li>
<a href="#supported-runtimes">Supported Runtimes</a>
</li>
<li>
<a href="#generating-a-parser">Generating a Parser</a>
<ul>
Expand Down Expand Up @@ -104,6 +107,18 @@ <h3 id="installation-browser">Browser</h3>

<p>When your document is done loading, there will be a global <code>peggy</code> object.</p>

<h2 id="supported-runtimes">Supported Runtimes</h2>
<p>Browsers and JS runtimes that pass the following
<a href="https://github.com/browserslist/browserslist#readme">Browserslist</a>
query at the time of release are supported:</p>
<pre><code>defaults, maintained node versions, not op_mini all</code></pre>

<p>Opera Mini can't be bothered to implement <code>URL</code> of all things,
so it's not worth our time to support.</p>
<p>Deno issues will be fixed if possible, but we are not currently testing on Deno.</p>
<p>All versions of Internet Explorer are <em>EXPLICITLY</em> unsupported,
for both generating and running generated parsers.</p>

<h2 id="generating-a-parser">Generating a Parser</h2>

<p>Peggy generates a parser from a grammar that describes the expected input
Expand Down
2 changes: 1 addition & 1 deletion docs/js/test-bundle.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"devDependencies": {
"@11ty/eleventy": "^2.0.1"
},
"browserslist": [
"defaults, maintained node versions, not op_mini all"
],
"engines": {
"node": ">=14"
}
Expand Down
60 changes: 60 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
"use strict";

module.exports = [
{
ignores: [
"benchmark/**",
"build/**",
"docs/**",
"examples/*.js", // Testing examples
"node_modules/**",
"test/cli/fixtures/bad.js", // Intentionally-invalid
"test/cli/fixtures/imports_peggy.js", // Generated
"test/cli/fixtures/lib.js", // Generated
"test/vendor/**",
],
},
{
...require("@peggyjs/eslint-config/flat/js"),
ignores: [
"**/*.min.js",
"lib/parser.js", // Generated
],
},
require("@peggyjs/eslint-config/flat/mjs"),
require("@peggyjs/eslint-config/flat/mocha"),
require("@peggyjs/eslint-config/flat/ts"),
{
...require("@peggyjs/eslint-config/flat/modern"),
// All of these can use modern JS and node constructs
files: ["bin/*.js", "tools/**", "web-test/**"],
},
{
files: ["lib/peg.d.ts"],
rules: {
// Easier than fixing the hand-generated peg.d.ts
"no-unused-vars": "off",
"one-var": "off",
"no-use-before-define": "off",
"init-declarations": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/init-declarations": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/no-shadow": "off",
"@typescript-eslint/prefer-function-type": "off",
},
},
{
// Check these files for broad browser compatibility.
files: [
"**/*.min.js",
"lib/parser.js",
],
plugins: {
compat: require("eslint-plugin-compat"),
},
rules: {
"compat/compat": "error",
},
},
];
Loading