Skip to content

Commit

Permalink
Cleanup eslint config, tsconfig & eslint error
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomato6966 committed Sep 21, 2024
1 parent 899bbbc commit 27ddc33
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 71 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Others
node_modules
testBot/.env
testBot/node_modules
Expand Down
68 changes: 34 additions & 34 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,39 @@ const compat = new FlatCompat({
allConfig: js.configs.all
});

export default [{
ignores: [
"**/config",
"**/dist",
"**/docs",
"**/node_modules",
"**/testBot",
"**/tsDocs",
"**/tools",
"**/.*.js",
"**/.*.mjs",
"**/.*.ts",
],
}, ...compat.extends("plugin:@typescript-eslint/recommended"), {
plugins: {
"@typescript-eslint": typescriptEslint,
},

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

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

rules: {
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-explicit-any": 1,
"@typescript-eslint/no-unsafe-declaration-merging": 1,
"@typescript-eslint/no-unused-vars": 1,
export default [
{
ignores: [
"**/config",
"**/dist",
"**/docs",
"**/node_modules",
"**/testBot",
"**/tools",
"eslint.config.mjs",
],
},
}];
...compat.extends("plugin:@typescript-eslint/recommended"),
{
plugins: {
"@typescript-eslint": typescriptEslint,
},
languageOptions: {
globals: {},
parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
},
},
rules: {
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-explicit-any": 1,
"@typescript-eslint/no-unsafe-declaration-merging": 1,
"@typescript-eslint/no-unused-vars": 1,
},
}
];
5 changes: 3 additions & 2 deletions src/structures/Types/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export type SourcesRegex = "YoutubeRegex" |
"musicYandex" |
"radiohost" |
"bandcamp" |
"jiosaavn" |
"jiosaavn" |
"appleMusic" |
"TwitchTv" |
"vimeo";
Expand Down Expand Up @@ -377,7 +377,8 @@ export interface LavalinkPlayerVoice {
/** The Ping to the voice server */
ping?: number
}
export interface LavalinkPlayerVoiceOptions extends Omit<LavalinkPlayerVoice, 'connected' | 'ping'> { }

export type LavalinkPlayerVoiceOptions = Omit<LavalinkPlayerVoice, 'connected' | 'ping'>;

export interface FailingAddress {
/** The failing address */
Expand Down
69 changes: 35 additions & 34 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
{
"compilerOptions": {
/* Basic Options */
"target": "ESNext",
"module": "CommonJS",
"declaration": true,
"outDir": "./dist",
"rootDir": "./src",
"skipLibCheck": true,
"importHelpers": true,
"moduleResolution": "node",
"baseUrl": ".",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"types": [ "node", "ws" ],
"lib": [
"ESNext", "DOM"
]
},
"include": [
"src/**/*.ts",
".eslintrc.js"
],
"exclude": [
"node_modules",
"dist",
"docs",
"tsDocs",
"config",
"testBot",
],
"tsc-alias": {
"verbose": false,
"resolveFullPaths": true,
}
"target": "ESNext",
"module": "CommonJS",
"declaration": true,
"outDir": "./dist",
"rootDir": "./src",
"skipLibCheck": true,
"importHelpers": true,
"moduleResolution": "node",
"baseUrl": ".",
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"types": [
"node",
"ws"
],
"lib": [
"ESNext",
"DOM"
]
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules",
"dist",
"docs",
"config",
"testBot",
],
"tsc-alias": {
"verbose": false,
"resolveFullPaths": true,
}
}

0 comments on commit 27ddc33

Please sign in to comment.