Skip to content

Commit

Permalink
Configurable Session Timeout for Community (#2464)
Browse files Browse the repository at this point in the history
* completed session timeout for API: adjusted model adn implemented resolver

* updating tests to meet coverage

* small changes

* updated dependencies to match the eslint version for compatibility

* updated test for login

* small fix

* small changes to test

* small changes to test file

* final changes for test file from suggestions

* fixed linting errors from last merge from codebase

* moved setup file to config folder with a similar file that has eslint disable statement as well

* moved the setup file back to its original place

* added missing poackage

* possible fix for lint issue

* fixing schema to match admin

* lint fix

* lint fix

* lint fix

* lint fix

* lint fix

* updated schema
  • Loading branch information
JordanCampbell1 authored Oct 15, 2024
1 parent 01a2814 commit c1dc667
Show file tree
Hide file tree
Showing 11 changed files with 1,995 additions and 1,919 deletions.
199 changes: 112 additions & 87 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,136 +4,161 @@ import _import from "eslint-plugin-import";
import { fixupPluginRules } from "@eslint/compat";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import parser from "@graphql-eslint/eslint-plugin";
import * as parser from "@graphql-eslint/eslint-plugin";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import graphqlEslint from "@graphql-eslint/eslint-plugin";
import * as graphqlEslint from "@graphql-eslint/eslint-plugin";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
});

export default [{
export default [
{
ignores: [
"**/.github",
"**/.vscode",
"**/build",
"**/coverage",
"**/node_modules",
"src/types",
"docs/Schema.md",
"**/.github",
"**/.vscode",
"**/build",
"**/coverage",
"**/node_modules",
"src/types",
"docs/Schema.md",
],
}, ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"), {
},
...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
),
{
plugins: {
"@typescript-eslint": typescriptEslint,
tsdoc,
"import": fixupPluginRules(_import),
"@typescript-eslint": typescriptEslint,
tsdoc,
import: fixupPluginRules(_import),
},

languageOptions: {
env: {
node: true,
parser: tsParser,
globals: globals.node,
},
parser: tsParser,
}
,

rules: {
"no-restricted-imports": ["error", {
patterns: ["**/src/**"],
}],
"no-restricted-imports": [
"error",
{
patterns: ["**/src/**"],
},
],

"import/no-duplicates": "error",
"tsdoc/syntax": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-var-requires": "error",
"import/no-duplicates": "error",
"tsdoc/syntax": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-unsafe-function-type": "error",
"@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-var-requires": "error",
},
}, {
},
{
files: ["**/*.ts"],

languageOptions: {
parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",
parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",

parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: ".",
},
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: ".",
},
},

rules: {
"@typescript-eslint/array-type": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/explicit-function-return-type": "error",

"@typescript-eslint/naming-convention": ["error", {
selector: "interface",
format: ["PascalCase"],
prefix: ["Interface", "TestInterface"],
}, {
selector: ["typeAlias", "typeLike", "enum"],
format: ["PascalCase"],
}, {
selector: "typeParameter",
format: ["PascalCase"],
prefix: ["T"],
}, {
selector: "variable",
format: ["camelCase", "UPPER_CASE"],
leadingUnderscore: "allow",
}, {
selector: "parameter",
format: ["camelCase"],
leadingUnderscore: "allow",
}, {
selector: "function",
format: ["camelCase"],
}, {
selector: "memberLike",
modifiers: ["private"],
format: ["camelCase"],
leadingUnderscore: "require",
}, {
selector: "variable",
modifiers: ["exported"],
format: null,
}],
"@typescript-eslint/naming-convention": [
"error",
{
selector: "interface",
format: ["PascalCase"],
prefix: ["Interface", "TestInterface"],
},
{
selector: ["typeAlias", "typeLike", "enum"],
format: ["PascalCase"],
},
{
selector: "typeParameter",
format: ["PascalCase"],
prefix: ["T"],
},
{
selector: "variable",
format: ["camelCase", "UPPER_CASE"],
leadingUnderscore: "allow",
},
{
selector: "parameter",
format: ["camelCase"],
leadingUnderscore: "allow",
},
{
selector: "function",
format: ["camelCase"],
},
{
selector: "memberLike",
modifiers: ["private"],
format: ["camelCase"],
leadingUnderscore: "require",
},
{
selector: "variable",
modifiers: ["exported"],
format: null,
},
],
},
}, {
},
{
files: ["./src/typeDefs/**/*.ts"],
processor: "@graphql-eslint/graphql",
}, {
},
{
files: ["./src/typeDefs/**/*.graphql"],

plugins: {
"@graphql-eslint": graphqlEslint,
"@graphql-eslint": graphqlEslint,
},

languageOptions: {
parser: parser,
parser: parser,
},
}, {
},
{
files: ["tests/**/*"],

rules: {
"no-restricted-imports": "off",
"no-restricted-imports": "off",
},
}, {
},
{
files: ["./src/index.ts", "./src/utilities/copyToClipboard.ts"],

rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-empty-function": "off",
},
}];
},
];
Loading

0 comments on commit c1dc667

Please sign in to comment.