-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from aiFdn/sharkar/update-gpt-models
Update build script, dependencies, and default model
- Loading branch information
Showing
10 changed files
with
19,421 additions
and
14,095 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import simpleImportSort from "eslint-plugin-simple-import-sort"; | ||
import _import from "eslint-plugin-import"; | ||
import typescriptEslint from "@typescript-eslint/eslint-plugin"; | ||
import prettier from "eslint-plugin-prettier"; | ||
import { fixupPluginRules } from "@eslint/compat"; | ||
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: { | ||
"simple-import-sort": simpleImportSort, | ||
import: fixupPluginRules(_import), | ||
"@typescript-eslint": typescriptEslint, | ||
prettier, | ||
}, | ||
|
||
languageOptions: { | ||
parser: tsParser, | ||
ecmaVersion: 2022, | ||
sourceType: "module", | ||
|
||
parserOptions: { | ||
project: "./tsconfig.json", | ||
}, | ||
}, | ||
|
||
settings: { | ||
"import/resolver": { | ||
node: { | ||
extensions: [".js", ".jsx", ".ts", ".tsx"], | ||
}, | ||
}, | ||
}, | ||
|
||
rules: { | ||
"prettier/prettier": "error", | ||
"no-console": "error", | ||
"import/order": "off", | ||
"sort-imports": "off", | ||
"simple-import-sort/imports": "error", | ||
"simple-import-sort/exports": "error", | ||
"import/first": "error", | ||
"import/newline-after-import": "error", | ||
"import/no-duplicates": "error", | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-explicit-any": "off", | ||
complexity: ["warn", 10], | ||
"max-depth": ["warn", 4], | ||
"@typescript-eslint/consistent-type-definitions": ["error", "type"], | ||
"@typescript-eslint/prefer-for-of": "warn", | ||
"@typescript-eslint/prefer-includes": "warn", | ||
"@typescript-eslint/prefer-string-starts-ends-with": "warn", | ||
}, | ||
}]; |
Oops, something went wrong.