Skip to content

Commit

Permalink
build(deps-dev): bump eslint from 8.57.0 to 9.10.0 (#413)
Browse files Browse the repository at this point in the history
* build(deps-dev): bump eslint from 8.57.0 to 9.10.0

Bumps [eslint](https://github.com/eslint/eslint) from 8.57.0 to 9.10.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v8.57.0...v9.10.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: migrate eslint configs to 9.10

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: karel rehor <karl.koerner@bonitoo.io>
  • Loading branch information
dependabot[bot] and karel-rehor committed Sep 18, 2024
1 parent 11240e3 commit a495bb4
Show file tree
Hide file tree
Showing 6 changed files with 216 additions and 100 deletions.
79 changes: 79 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import typescriptEslintEslintPlugin from "@typescript-eslint/eslint-plugin";
import prettier from "eslint-plugin-prettier";
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 [...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
), {
plugins: {
"@typescript-eslint": typescriptEslintEslintPlugin,
prettier,
},

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

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

parserOptions: {
ecmaFeatures: {},
},
},

rules: {
"no-console": "off",

"@typescript-eslint/naming-convention": ["error", {
selector: "variable",
format: ["camelCase", "UPPER_CASE"],

filter: {
regex: "^DEFAULT_|^Log$",
match: false,
},

leadingUnderscore: "allow",
trailingUnderscore: "allow",
}, {
selector: "typeLike",
format: ["PascalCase"],
}],

"@typescript-eslint/no-explicit-any": "off",

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

"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "off",
"prefer-template": "error",

"@typescript-eslint/explicit-module-boundary-types": ["error", {
allowArgumentsExplicitlyTypedAsAny: true,
}],

"@typescript-eslint/no-non-null-assertion": "error",
},
}];
3 changes: 2 additions & 1 deletion packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@
"chai": "^4.2.0",
"esbuild": "^0.23.0",
"esbuild-runner": "^2.2.1",
"eslint": "^8.43.0",
"eslint": "^9.10.0",
"eslint-config-prettier": "^9.0.0",
"eslint-formatter-junit": "^8.40.0",
"eslint-plugin-prettier": "^5.0.0",
"follow-redirects": "^1.14.7",
"mocha": "^10.0.0",
Expand Down
10 changes: 10 additions & 0 deletions packages/client/src/impl/browser/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import globals from "globals";

export default [{
languageOptions: {
globals: {
...Object.fromEntries(Object.entries(globals.node).map(([key]) => [key, "off"])),
...globals.browser,
},
},
}];
13 changes: 13 additions & 0 deletions packages/client/test/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import globals from "globals";

export default [{
languageOptions: {
globals: {
...globals.node,
},
},

rules: {
"@typescript-eslint/no-unused-expressions": "warn",
},
}];
15 changes: 15 additions & 0 deletions packages/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import globals from "globals";

export default [{
ignores: ["dist/*.js", "**/generated/"],
}, {
languageOptions: {
globals: {
...globals.node,
},
},

rules: {
"no-console": "warn",
},
}];
Loading

0 comments on commit a495bb4

Please sign in to comment.