-
Notifications
You must be signed in to change notification settings - Fork 946
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgraded eslint dependencies and config file.
- Loading branch information
1 parent
6416d66
commit 401fef5
Showing
5 changed files
with
366 additions
and
448 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}, | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
|
Oops, something went wrong.