feat: env config
This commit is contained in:
parent
0367540e36
commit
d6bfca2208
4 changed files with 996 additions and 2 deletions
8
.editorconfig
Normal file
8
.editorconfig
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
root = true
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
insert_final_newline = true
|
||||||
|
end_of_line = lf
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
max_line_length = 150
|
||||||
52
eslint.config.js
Normal file
52
eslint.config.js
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
import comments from "@eslint-community/eslint-plugin-eslint-comments/configs";
|
||||||
|
import js from "@eslint/js";
|
||||||
|
import prettier from "eslint-config-prettier/flat";
|
||||||
|
import { defineConfig, globalIgnores } from "eslint/config";
|
||||||
|
import globals from "globals";
|
||||||
|
import tseslint from "typescript-eslint";
|
||||||
|
|
||||||
|
export default defineConfig([
|
||||||
|
{
|
||||||
|
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
|
||||||
|
plugins: { js },
|
||||||
|
extends: ["js/recommended"],
|
||||||
|
languageOptions: { globals: globals.browser },
|
||||||
|
},
|
||||||
|
prettier,
|
||||||
|
comments.recommended,
|
||||||
|
globalIgnores(["coverage/"]),
|
||||||
|
|
||||||
|
tseslint.configs.recommendedTypeChecked.map((config) => ({ ...config, files: config.files ?? ["**/*.{ts,tsx}"] })),
|
||||||
|
{
|
||||||
|
files: ["**/*.{ts,tsx}"],
|
||||||
|
languageOptions: { parserOptions: { projectService: true } },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ["**/*.{ts,tsx}"],
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-unused-vars": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
args: "after-used",
|
||||||
|
argsIgnorePattern: "^_",
|
||||||
|
caughtErrors: "all",
|
||||||
|
caughtErrorsIgnorePattern: "^_",
|
||||||
|
destructuredArrayIgnorePattern: "^_",
|
||||||
|
varsIgnorePattern: "^_",
|
||||||
|
ignoreRestSiblings: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
"@typescript-eslint/unbound-method": "off",
|
||||||
|
"@typescript-eslint/no-unsafe-declaration-merging": "off",
|
||||||
|
"@typescript-eslint/no-empty-object-type": ["error", { allowInterfaces: "with-single-extends" }],
|
||||||
|
"@typescript-eslint/consistent-type-imports": ["warn"],
|
||||||
|
"@typescript-eslint/only-throw-error": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ["**/*.{test,spec}-d.{ts,tsx}"],
|
||||||
|
rules: {
|
||||||
|
"@typescript-eslint/no-unused-vars": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
@ -9,7 +9,15 @@
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
||||||
|
"@eslint/js": "^9.39.1",
|
||||||
|
"eslint": "^9.39.1",
|
||||||
|
"eslint-config-prettier": "^10.1.8",
|
||||||
|
"globals": "^16.5.0",
|
||||||
|
"jiti": "^2.6.1",
|
||||||
|
"prettier": "^3.7.4",
|
||||||
"typescript": "~5.9.3",
|
"typescript": "~5.9.3",
|
||||||
|
"typescript-eslint": "^8.48.1",
|
||||||
"vite": "npm:rolldown-vite@7.2.5"
|
"vite": "npm:rolldown-vite@7.2.5"
|
||||||
},
|
},
|
||||||
"overrides": {
|
"overrides": {
|
||||||
|
|
|
||||||
930
pnpm-lock.yaml
generated
930
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue