Skip to content

Commit

Permalink
fix: new eslint settings because of eslint bump in simple_rest_signat…
Browse files Browse the repository at this point in the history
…ure_provider (#2624)

Signed-off-by: Ivaylo Nikolov <[email protected]>
  • Loading branch information
ivaylonikolov7 authored Oct 30, 2024
1 parent 932d93f commit f90c95e
Show file tree
Hide file tree
Showing 4 changed files with 2,526 additions and 3,337 deletions.
70 changes: 0 additions & 70 deletions examples/simple_rest_signature_provider/.eslintrc.cjs

This file was deleted.

86 changes: 86 additions & 0 deletions examples/simple_rest_signature_provider/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import ie11 from "eslint-plugin-ie11";
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 [
...fixupConfigRules(
compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:jsdoc/recommended",
"plugin:import/errors",
"plugin:import/typescript",
"plugin:n/recommended",
"plugin:compat/recommended",
),
),
{
plugins: {
"@typescript-eslint": fixupPluginRules(typescriptEslint),
ie11,
},

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

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

parserOptions: {
project: ["./tsconfig.json"],
warnOnUnsupportedTypeScriptVersion: false,
},
},

rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",

"n/no-unsupported-features/es-syntax": [
"error",
{
ignores: ["dynamicImport", "modules"],
},
],

"@typescript-eslint/ban-ts-comment": "off",
"jsdoc/valid-types": "off",
"jsdoc/no-undefined-types": "off",
"jsdoc/require-property-description": "off",
"jsdoc/require-returns-description": "off",
"jsdoc/require-param-description": "off",

"jsdoc/check-tag-names": [
"warn",
{
definedTags: ["internal"],
},
],
"ie11/no-collection-args": "error",
"ie11/no-for-in-const": "error",
"ie11/no-loop-func": "warn",
"ie11/no-weak-collections": "error",
},
},
];
5 changes: 4 additions & 1 deletion examples/simple_rest_signature_provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"dotenv": "^14.3.2",
"eslint": "~9.0.0",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-deprecation": "^2.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jsdoc": "^46.8.2",
"eslint-plugin-mocha": "^10.1.0",
Expand All @@ -48,6 +47,10 @@
"vite": "~3.2.11"
},
"devDependencies": {
"@eslint/compat": "^1.2.2",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.13.0",
"globals": "^15.11.0",
"npm-run-all": "^4.1.5"
}
}
Loading

0 comments on commit f90c95e

Please sign in to comment.