@maptiler/sdk
Version:
The Javascript & TypeScript map SDK tailored for MapTiler Cloud
62 lines (59 loc) • 2.72 kB
JavaScript
// @ts-check
import tseslint from "typescript-eslint";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
export default tseslint.config(
// https://typescript-eslint.io/getting-started/typed-linting/
tseslint.configs.strictTypeChecked,
tseslint.configs.stylisticTypeChecked,
tseslint.configs.recommendedTypeChecked,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
// https://github.com/prettier/eslint-plugin-prettier
eslintPluginPrettierRecommended,
//
{
rules: {
"@typescript-eslint/array-type": "off",
"@typescript-eslint/consistent-indexed-object-style": "warn",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/no-base-to-string": "warn",
"@typescript-eslint/no-confusing-void-expression": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-empty-function": "warn", // this is to satisfy maplibre-gl custom layer interface
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-misused-promises": "warn",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",
"@typescript-eslint/no-unnecessary-condition": "warn",
"@typescript-eslint/no-unnecessary-type-arguments": "off",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unnecessary-type-parameters": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-unsafe-argument": "warn",
"@typescript-eslint/no-unsafe-assignment": "warn",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-enum-comparison": "off",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/non-nullable-type-assertion-style": "warn",
"@typescript-eslint/prefer-for-of": "off",
"@typescript-eslint/prefer-nullish-coalescing": "warn",
"@typescript-eslint/prefer-optional-chain": "off",
"@typescript-eslint/prefer-return-this-type": "off",
"@typescript-eslint/prefer-string-starts-ends-with": "warn",
"@typescript-eslint/restrict-plus-operands": "warn",
"@typescript-eslint/restrict-template-expressions": "warn",
"@typescript-eslint/related-getter-setter-pairs": "off",
"@typescript-eslint/unbound-method": "warn",
"@typescript-eslint/use-unknown-in-catch-callback-variable": "warn",
},
},
//
);