Skip to content

Commit

Permalink
update core tools
Browse files Browse the repository at this point in the history
  • Loading branch information
juliancwirko committed Nov 9, 2024
1 parent 07b9a21 commit 0de910f
Show file tree
Hide file tree
Showing 23 changed files with 1,875 additions and 1,565 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### [0.22.0](https://github.com/useElven/core/releases/tag/v0.22.0) (2024-11-09)
- update core dependencies and adjust the codebase
- native auth configuration improvements

### [0.21.0](https://github.com/useElven/core/releases/tag/v0.21.0) (2024-07-13)
- fix nonce sync when working with multiple browser tabs
- update dependencies
Expand Down
75 changes: 75 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
import react from "eslint-plugin-react";
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 [...fixupConfigRules(compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:prettier/recommended",
)), {
plugins: {
react: fixupPluginRules(react),
"@typescript-eslint": fixupPluginRules(typescriptEslint),
},

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

parser: tsParser,
ecmaVersion: 2020,
sourceType: "commonjs",

parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},

settings: {
react: {
version: "detect",
},
},

rules: {
"no-var": "error",
"prefer-const": "error",
"no-use-before-define": "error",
"no-mixed-spaces-and-tabs": "error",
"no-nested-ternary": "error",

"prettier/prettier": ["error", {
endOfLine: "auto",
}],

"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"no-unused-vars": "off",

"@typescript-eslint/no-unused-vars": ["error", {
vars: "all",
args: "after-used",
ignoreRestSiblings: false,
}],
},
}];
Loading

0 comments on commit 0de910f

Please sign in to comment.