Skip to content

Commit

Permalink
Had a CI eslint error (ran fine locally). "eslint --inspect-config" s…
Browse files Browse the repository at this point in the history
…uggested it might be a migrated config file issue, so refactored problematic section.
  • Loading branch information
smallsaucepan committed Dec 4, 2024
1 parent 401fef5 commit 543e6a1
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 38 deletions.
25 changes: 7 additions & 18 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import tsEslint from "typescript-eslint";
import prettierRecommended from "eslint-plugin-prettier/recommended";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
export default tsEslint.config(
js.configs.recommended,
tsEslint.configs.recommended,
{
ignores: [
"**/dist/**/*",
Expand All @@ -24,11 +17,6 @@ export default [
"packages/turf/test.example.js",
],
},
...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
),
{
plugins: {
"@typescript-eslint": typescriptEslint,
Expand Down Expand Up @@ -97,4 +85,5 @@ export default [
},
},
},
];
prettierRecommended
);
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
"@monorepolint/core": "0.5.0",
"@monorepolint/rules": "0.5.0",
"@types/node": "18.11.9",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"acorn": "^7.4.1",
"camelcase": "^8.0.0",
"d3-queue": "*",
Expand All @@ -63,6 +61,7 @@
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^5.5.4",
"typescript-eslint": "^8.17.0",
"yamljs": "^0.3.0"
}
}
43 changes: 25 additions & 18 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 543e6a1

Please sign in to comment.