Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
registry-url: "https://registry.npmjs.org"

- name: Install pnpm
uses: pnpm/action-setup@v5
uses: pnpm/action-setup@v6

- name: Install dependencies
run: pnpm i
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"useTabs": true,
"tabWidth": 4,
"trailingComma": "none",
"printWidth": 150
"printWidth": 140
}
167 changes: 96 additions & 71 deletions eslint.config.ts
Original file line number Diff line number Diff line change
@@ -1,78 +1,103 @@
import js from "@eslint/js";
import globals from "globals";
import ts from "typescript-eslint";
import importPlugin from "eslint-plugin-import";
import importPlugin from "eslint-plugin-import-x";
import prettierConfig from "eslint-config-prettier";
import { defineConfig } from "eslint/config";

export default defineConfig([
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
plugins: { js },
extends: ["js/recommended"],
languageOptions: {
globals: globals.node,
},
},
ts.configs.recommended,
importPlugin.flatConfigs.recommended,
importPlugin.flatConfigs.typescript,
prettierConfig,
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
languageOptions: {
parserOptions: {
project: "./tsconfig.json",
sourceType: "module",
ecmaVersion: "latest",
},
},
rules: {
"import/namespace": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-explicit-any": "warn",
"import/order": [
"error",
{
groups: [
"builtin",
"external",
"internal",
["parent", "sibling", "index"],
"object",
"type",
],
pathGroups: [
{
pattern: "@/**",
group: "internal",
},
],
pathGroupsExcludedImportTypes: ["builtin"],
alphabetize: {
order: "asc",
caseInsensitive: true,
},
},
],
"import/newline-after-import": ["error", { count: 1 }],
"import/no-unresolved": "error",
"import/no-duplicates": "error",
"no-console": "off",
"no-var": "error",
"prefer-const": "error",
},
settings: {
"import/resolver": {
typescript: {
alwaysTryTypes: true,
project: "./tsconfig.json",
},
node: {
extensions: [".js", ".ts"],
},
},
},
},
]);
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
plugins: { js },
extends: ["js/recommended"],
languageOptions: {
globals: globals.node
}
},
ts.configs.recommended,
importPlugin.flatConfigs.recommended,
importPlugin.flatConfigs.typescript,
prettierConfig,
{
files: ["**/*.{js,mjs,cjs,ts,mts,cts}"],
languageOptions: {
parserOptions: {
project: "./tsconfig.json",
sourceType: "module",
ecmaVersion: "latest"
}
},
rules: {
"import-x/namespace": "off",
"import-x/no-unresolved": "error",
"import-x/no-duplicates": "error",
"import-x/newline-after-import": ["error", { count: 1 }],
"import-x/order": [
"error",
{
groups: ["builtin", "external", "internal", ["parent", "sibling", "index"], "object", "type"],
pathGroups: [
{
pattern: "@/**",
group: "internal"
}
],
pathGroupsExcludedImportTypes: ["builtin"],
alphabetize: {
order: "asc",
caseInsensitive: true
}
}
],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
fixStyle: "inline-type-imports"
}
],
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/return-await": ["error", "in-try-catch"],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
ignoreRestSiblings: true
}
],
"sort-imports": [
"error",
{
ignoreCase: true,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ["none", "all", "multiple", "single"]
}
],
eqeqeq: ["error", "always"],
curly: ["error", "all"],
"no-useless-return": "error",
"no-throw-literal": "error",
"no-void": ["error", { allowAsStatement: true }],
"no-console": "off",
"no-var": "error",
"prefer-const": "error"
},
settings: {
"import-x/resolver": {
typescript: {
alwaysTryTypes: true,
project: "./tsconfig.json"
},
node: {
extensions: [".js", ".ts"]
}
}
}
}
]);
61 changes: 36 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,48 +1,59 @@
{
"name": "@stelliajs/framework",
"version": "1.7.1",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"lint": "eslint src",
"format": "prettier --write ./src/**/*.ts",
"build": "tsc && tsc-alias"
},
"repository": {
"type": "git",
"url": "https://github.com/StelliaJS/framework.git"
},
"version": "1.7.3",
"type": "module",
"description": "A framework for simplifying the creation of discord bots",
"author": "Tweenty_",
"license": "ISC",
"description": "A framework for simplify the creation of discord bots",
"packageManager": "pnpm@11.1.3",
"engines": {
"node": ">=24.0.0"
},
"keywords": [
"discord",
"bot",
"discordjs",
"typescript",
"framework"
],
"repository": {
"type": "git",
"url": "https://github.com/StelliaJS/framework.git"
},
"files": [
"dist/"
"dist"
],
"exports": {
".": {
"types": "./dist/index.d.mts",
"import": "./dist/index.mjs"
},
"./package.json": "./package.json"
},
"scripts": {
"build": "tsdown",
"lint": "eslint src",
"format": "prettier --write ./src/**/*.ts"
},
"peerDependencies": {
"discord.js": "^14.26.4",
"i18next": "26.2.0"
},
"dependencies": {
"discord.js": "^14.26.3",
"i18next": "^26.0.7",
"log-symbols": "^7.0.1"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"eslint": "^10.2.1",
"discord.js": "^14.26.4",
"eslint": "^10.4.0",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
"globals": "^17.5.0",
"jiti": "^2.6.1",
"eslint-plugin-import-x": "^4.16.2",
"globals": "^17.6.0",
"jiti": "^2.7.0",
"prettier": "^3.8.3",
"tsc-alias": "^1.8.16",
"tsdown": "^0.22.0",
"typescript": "^6.0.3",
"typescript-eslint": "^8.59.0"
},
"type": "module",
"packageManager": "pnpm@10.33.2"
"typescript-eslint": "^8.59.4"
}
}
Loading