Skip to content

Commit

Permalink
Merge pull request #26 from hildjj/update-deps
Browse files Browse the repository at this point in the history
Update to eslint9.
  • Loading branch information
hildjj authored Jun 24, 2024
2 parents eeeb66f + 7f779ad commit 274acbb
Show file tree
Hide file tree
Showing 14 changed files with 3,959 additions and 4,100 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
node-version: [18.x, 20.x, 21.x]
node-version: [18.x, 20.x, 22.x]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
Expand Down
12 changes: 0 additions & 12 deletions eslint.config.js

This file was deleted.

32 changes: 32 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import cjs from "./flat/cjs.js";
import js from "./flat/js.js";
import meta from "@cto.af/eslint-plugin-meta";
import mjs from "./flat/mjs.js";
import { plugin } from "typescript-eslint";
import stylistic from "@stylistic/eslint-plugin";

export default [
{
ignores: [
"node_modules/**",
"test/**",
],
},
js,
cjs,
mjs,
{
files: [
"rules/*.js",
],
settings: {
meta: {
libs: {
"@stylistic": stylistic,
"@typescript-eslint": plugin,
},
},
},
...meta.configs.all,
},
];
22 changes: 12 additions & 10 deletions flat/ts.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
"use strict";

// Requires the optional peerDependencies be in place.
const tslint = require("typescript-eslint");
const { rules } = require("../rules/ts.js");

module.exports = {
files: ["**/*.ts"],
languageOptions: {
parser: require("@typescript-eslint/parser"),
parserOptions: {
project: true,
},
sourceType: "module",
},
plugins: {
"@typescript-eslint": require("@typescript-eslint/eslint-plugin"),
},
ignores: [
"**/node_modules/**",
"**/*.d.ts",
],
...tslint.configs.base,
rules,
};

module.exports.languageOptions.parserOptions = {
// It's undefined for now, but just in case.
...module.exports.languageOptions.parserOptions,
project: true,
};
52 changes: 19 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,34 @@
],
"scripts": {
"lint": "eslint .",
"missing": "npm run missing:js && npm run missing:ts",
"missing:js": "eslint-find-rules --verbose -u index.js",
"missing:ts": "eslint-find-rules --verbose --no-core -u ts.js",
"test": "cd test/old && npm test && cd ../flat && npm test && cd ../flat-module && npm test"
},
"author": "Joe Hildebrand <joe-github@cursive.net>",
"license": "MIT",
"repository": "peggyjs/peggyjs-eslint-config",
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "~7",
"@typescript-eslint/parser": "~7",
"eslint-plugin-mocha": "~10",
"eslint": "~8",
"typescript": "~5"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
},
"@typescript-eslint/eslint-plugin": {
"optional": true
},
"@typescript-eslint/parser": {
"optional": true
},
"eslint-plugin-mocha": {
"optional": true
}
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"eslint": "^8.57.0",
"eslint-find-rules": "4.1.0",
"eslint-plugin-mocha": "10.2.0",
"typescript": "^5.3.3"
"@cto.af/eslint-plugin-meta": "1.0.0",
"@peggyjs/sort-rules": "link:sort-rules",
"eslint": "^9.5.0",
"eslint-plugin-mocha": "10.4.3",
"typescript": "^5.4.5",
"typescript-eslint": "8.0.0-alpha.30"
},
"dependencies": {
"@stylistic/eslint-plugin": "1.6.2",
"globals": "14.0.0"
"@stylistic/eslint-plugin": "2.2.0",
"globals": "15.4.0"
},
"overrides": {
"@typescript-eslint/utils": "8.0.0-alpha.30",
"@typescript-eslint/parser": "8.0.0-alpha.30"
},
"pnpm": {
"overrides": {
"@typescript-eslint/utils": "8.0.0-alpha.30",
"@typescript-eslint/parser": "8.0.0-alpha.30"
}
},
"packageManager": "pnpm@8.15.4",
"packageManager": "pnpm@9.3.0",
"engines": {
"node": ">=18"
}
Expand Down
Loading

0 comments on commit 274acbb

Please sign in to comment.