Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSOND - 517, 518, 519 | Synk issues fixed #10

Merged
merged 2 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 0 additions & 182 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/sca-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --all-projects --fail-on=all
args: --all-projects --fail-on=all --strict-out-of-sync=false
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
134 changes: 134 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
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 [{
ignores: ["src/utils/tracking.js"],
}, ...compat.extends(
"next/core-web-vitals",
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
), {
plugins: {
react,
"@typescript-eslint": typescriptEslint,
},

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

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

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

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

rules: {
"react-hooks/exhaustive-deps": "off",
indent: ["error", 4],
"linebreak-style": ["error", "unix"],
quotes: ["error", "single"],
semi: ["error", "never"],

"no-underscore-dangle": ["error", {
allow: ["_content_type_uid", "_source", "_esClient", "_version", "_metadata", "_"],
}],

"no-shadow": ["error", {
builtinGlobals: false,
hoist: "functions",
allow: [],
}],

"@typescript-eslint/no-explicit-any": "off",
"comma-dangle": ["error", "never"],

"max-len": ["error", {
code: 250,
}],

radix: "error",

"key-spacing": ["error", {
beforeColon: false,
}],

"dot-notation": "error",
"operator-linebreak": ["error", "before"],
"@typescript-eslint/no-empty-function": "off",
"space-before-function-paren": ["error", "always"],
"array-callback-return": "off",
"consistent-return": "off",
"class-methods-use-this": "off",
"no-restricted-syntax": "off",

"import/order": [1, {
groups: ["external", "builtin", "internal", "sibling", "parent", "index"],
}],

"sort-imports": ["error", {
ignoreCase: true,
ignoreDeclarationSort: true,
}],

"jsx-quotes": ["error", "prefer-single"],
"no-param-reassign": "off",
"react/no-children-prop": "off",
"no-nested-ternary": "off",

"react/jsx-key": ["off", {
checkFragmentShorthand: false,
}],

"no-plusplus": ["error", {
allowForLoopAfterthoughts: true,
}],

"react/forbid-prop-types": "off",
"react/require-default-props": "off",
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/anchor-has-content": "off",
"jsx-a11y/control-has-associated-label": "off",
"no-mixed-operators": "off",
"react/no-danger": "off",
"react/destructuring-assignment": 0,
"no-useless-escape": "off",

"no-console": ["error", {
allow: ["warn", "error", "debug"],
}],

"react/react-in-jsx-scope": "off",

"react/jsx-filename-extension": [1, {
extensions: [".js", ".tsx", ".ts"],
}],
},
}];
Loading
Loading