Skip to content

Commit

Permalink
Upgraded eslint dependencies and config file.
Browse files Browse the repository at this point in the history
  • Loading branch information
smallsaucepan committed Dec 4, 2024
1 parent 6416d66 commit 401fef5
Show file tree
Hide file tree
Showing 5 changed files with 366 additions and 448 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

62 changes: 0 additions & 62 deletions .eslintrc.js

This file was deleted.

100 changes: 100 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
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";

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 [
{
ignores: [
"**/dist/**/*",
"**/node_modules",
"packages/turf/turf.js",
"packages/turf/turf.min.js",
"packages/turf/test.example.js",
],
},
...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
),
{
plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
globals: {
...globals.node,
},

parser: tsParser,
ecmaVersion: 6,
sourceType: "module",
},

rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
},
],

"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-var-requires": "off",
"no-constant-condition": "off",
"no-redeclare": "off",
"no-var": "off",
"prefer-const": "off",
},
},
{
files: ["packages/*/types.ts", "packages/*/test.ts"],

rules: {
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-unused-expressions": "off",
},
},
{
files: [
"**/.eslintrc.js",
"packages/*/bench.js",
"packages/*/test.js",
"packages/turf/rollup.config.js",
"scripts/check-dependencies.js",
],

languageOptions: {
globals: {
...globals.node,
},
},
},
{
files: [
"packages/turf-isobands/lib/marchingsquares-isobands.js",
"packages/turf-isolines/lib/marchingsquares-isocontours.js",
],

languageOptions: {
globals: {
...globals.browser,
},
},
},
];
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,29 @@
},
"packageManager": "[email protected]+sha512.d1a029e1a447ad90bc96cd58b0fad486d2993d531856396f7babf2d83eb1823bb83c5a3d0fc18f675b2d10321d49eb161fece36fe8134aa5823ecd215feed392",
"devDependencies": {
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.16.0",
"@monorepolint/cli": "0.5.0",
"@monorepolint/config": "0.5.0",
"@monorepolint/core": "0.5.0",
"@monorepolint/rules": "0.5.0",
"@types/node": "18.11.9",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"acorn": "^7.4.1",
"camelcase": "^8.0.0",
"d3-queue": "*",
"decamelize": "^6.0.0",
"dependency-tree": "^11.0.0",
"documentation": "^14.0.3",
"es-check": "^7.1.1",
"eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint": "^9.16.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"esm": "^3.2.25",
"fs-extra": "^11.1.1",
"glob": "^10.3.10",
"globals": "^15.13.0",
"husky": "^9.0.0",
"lerna": "^8.1.9",
"lint-staged": "^15.2.8",
Expand Down
Loading

0 comments on commit 401fef5

Please sign in to comment.