Skip to content

Commit

Permalink
eslint husky integration
Browse files Browse the repository at this point in the history
  • Loading branch information
sayinmehmet47 committed Apr 7, 2024
1 parent c87a580 commit 732b457
Show file tree
Hide file tree
Showing 4 changed files with 8,067 additions and 12,230 deletions.
1 change: 1 addition & 0 deletions client/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm test
20 changes: 20 additions & 0 deletions client/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import globals from "globals";
import tseslint from "typescript-eslint";
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";

import path from "path";
import { fileURLToPath } from "url";
import { FlatCompat } from "@eslint/eslintrc";
import pluginJs from "@eslint/js";

// mimic CommonJS variables -- not needed if using CommonJS
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({baseDirectory: __dirname, recommendedConfig: pluginJs.configs.recommended});

export default [
{languageOptions: { globals: globals.browser }},
...compat.extends("standard-with-typescript"),
...tseslint.configs.recommended,
pluginReactConfig,
];
Loading

0 comments on commit 732b457

Please sign in to comment.