Skip to content

Commit c670d88

Browse files
committed
Fix Small Bugs
1 parent 3b0eada commit c670d88

File tree

6 files changed

+516
-390
lines changed

6 files changed

+516
-390
lines changed

.editorconfig

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
# EditorConfig is awesome: https://EditorConfig.org
2-
3-
# top-most EditorConfig file
41
root = true
52

63
[*]
74
indent_style = space
85
indent_size = 2
9-
end_of_line = crlf
6+
end_of_line = lf
107
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
max_line_length = 120
11+
12+
[*.{md,markdown}]
1113
trim_trailing_whitespace = false
12-
insert_final_newline = false

eslint.config.mjs

Lines changed: 66 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,66 @@
1-
import globals from 'globals';
2-
import prettier from 'eslint-config-prettier';
3-
import sortImports from '@j4cobi/eslint-plugin-sort-imports';
4-
import js from '@eslint/js';
5-
6-
export default [
7-
js.configs.recommended,
8-
prettier,
9-
{
10-
ignores: ['**/node_modules/', '**/pnpm-lock.yaml'],
11-
languageOptions: {
12-
ecmaVersion: 2022,
13-
sourceType: 'module',
14-
globals: {
15-
...globals.es2022,
16-
...globals.node
17-
}
18-
},
19-
plugins: { 'sort-imports': sortImports },
20-
rules: {
21-
'sort-imports/sort-imports': [
22-
'error',
23-
{ ignoreCase: false, ignoreMemberSort: false, memberSyntaxSortOrder: ['all', 'single', 'multiple', 'none'] }
24-
],
25-
'max-len': ['error', { code: 120, ignoreUrls: true, ignoreComments: true }],
26-
'no-constant-condition': ['error', { checkLoops: false }],
27-
'prefer-const': ['warn', { destructuring: 'all' }],
28-
'no-unused-vars': ['error', { args: 'none' }],
29-
curly: ['warn', 'multi-line', 'consistent'],
30-
'logical-assignment-operators': 'warn',
31-
'no-template-curly-in-string': 'error',
32-
'quote-props': ['error', 'as-needed'],
33-
'comma-dangle': ['error', 'never'],
34-
'no-useless-constructor': 'error',
35-
'no-useless-assignment': 'error',
36-
'no-inner-declarations': 'error',
37-
'no-implicit-coercion': 'error',
38-
'no-use-before-define': 'warn',
39-
'no-underscore-dangle': 'warn',
40-
'no-unneeded-ternary': 'error',
41-
'default-param-last': 'error',
42-
'one-var': ['warn', 'never'],
43-
'no-inline-comments': 'warn',
44-
'no-empty-function': 'error',
45-
'no-useless-return': 'error',
46-
'no-useless-rename': 'warn',
47-
'no-useless-concat': 'warn',
48-
'no-throw-literal': 'error',
49-
'no-extend-native': 'error',
50-
'default-case-last': 'warn',
51-
'no-self-compare': 'error',
52-
'no-new-wrappers': 'error',
53-
'no-lone-blocks': 'error',
54-
'no-undef-init': 'error',
55-
'no-else-return': 'warn',
56-
'no-extra-semi': 'error',
57-
'require-await': 'warn',
58-
yoda: ['error', 'always'],
59-
'default-case': 'error',
60-
'dot-notation': 'error',
61-
'no-sequences': 'warn',
62-
'no-multi-str': 'warn',
63-
'no-lonely-if': 'warn',
64-
'no-new-func': 'error',
65-
'no-console': 'error',
66-
camelcase: 'warn',
67-
'no-var': 'warn',
68-
eqeqeq: 'warn',
69-
semi: 'error'
70-
}
71-
}
72-
];
1+
import prettier from 'eslint-config-prettier';
2+
import globals from 'globals';
3+
import js from '@eslint/js';
4+
5+
export default [
6+
js.configs.recommended,
7+
prettier,
8+
{
9+
ignores: ['**/node_modules/', '**/pnpm-lock.yaml'],
10+
languageOptions: {
11+
ecmaVersion: 2022,
12+
sourceType: 'module',
13+
globals: {
14+
...globals.es2022,
15+
...globals.node
16+
}
17+
},
18+
rules: {
19+
'max-len': ['error', { code: 120, ignoreUrls: true, ignoreComments: true }],
20+
'no-constant-condition': ['error', { checkLoops: false }],
21+
'prefer-const': ['warn', { destructuring: 'all' }],
22+
'no-unused-vars': ['error', { args: 'none' }],
23+
curly: ['warn', 'multi-line', 'consistent'],
24+
'logical-assignment-operators': 'warn',
25+
'no-template-curly-in-string': 'error',
26+
'quote-props': ['error', 'as-needed'],
27+
'comma-dangle': ['error', 'never'],
28+
'no-useless-constructor': 'error',
29+
'no-useless-assignment': 'error',
30+
'no-inner-declarations': 'error',
31+
'no-implicit-coercion': 'error',
32+
'no-use-before-define': 'warn',
33+
'no-underscore-dangle': 'warn',
34+
'no-unneeded-ternary': 'error',
35+
'default-param-last': 'error',
36+
'one-var': ['warn', 'never'],
37+
'no-inline-comments': 'warn',
38+
'no-empty-function': 'error',
39+
'no-useless-return': 'error',
40+
'no-useless-rename': 'warn',
41+
'no-useless-concat': 'warn',
42+
'no-throw-literal': 'error',
43+
'no-extend-native': 'error',
44+
'default-case-last': 'warn',
45+
'no-self-compare': 'error',
46+
'no-new-wrappers': 'error',
47+
'no-lone-blocks': 'error',
48+
'no-undef-init': 'error',
49+
'no-else-return': 'warn',
50+
'no-extra-semi': 'error',
51+
'require-await': 'warn',
52+
yoda: ['error', 'always'],
53+
'default-case': 'error',
54+
'dot-notation': 'error',
55+
'no-sequences': 'warn',
56+
'no-multi-str': 'warn',
57+
'no-lonely-if': 'warn',
58+
'no-new-func': 'error',
59+
'no-console': 'error',
60+
camelcase: 'warn',
61+
'no-var': 'warn',
62+
eqeqeq: 'warn',
63+
semi: 'error'
64+
}
65+
}
66+
];

package.json

Lines changed: 33 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,33 @@
1-
{
2-
"name": "discord.js-docs",
3-
"version": "0.3.0",
4-
"description": "A discord.js docs parser and wrapper.",
5-
"main": "index.js",
6-
"repository": "[email protected]:TeeSeal/discord.js-docs.git",
7-
"author": "TeeSeal <[email protected]>",
8-
"license": "MIT",
9-
"types": "types/index.d.ts",
10-
"engines": {
11-
"node": ">=16.20.2"
12-
},
13-
"packageManager": "[email protected]",
14-
"scripts": {
15-
"lint:check": "npx eslint src/ index.js",
16-
"lint": "npx eslint --fix src/ index.js",
17-
"prettier:check": "npx prettier --check src/ index.js",
18-
"prettier": "npx prettier --write src/ index.js"
19-
},
20-
"dependencies": {
21-
"common-tags": "^1.8.2",
22-
"discord.js": "^14.16.2",
23-
"fuse.js": "^3.6.1",
24-
"node-fetch": "^2.7.0"
25-
},
26-
"devDependencies": {
27-
"@eslint/js": "^9.11.1",
28-
"@j4cobi/eslint-plugin-sort-imports": "^1.0.2",
29-
"@types/eslint": "^9.6.1",
30-
"eslint": "^9.11.1",
31-
"eslint-config-prettier": "^9.1.0",
32-
"prettier": "^3.3.3"
33-
}
34-
}
1+
{
2+
"name": "discord.js-docs",
3+
"version": "0.3.0",
4+
"description": "A discord.js docs parser and wrapper.",
5+
"main": "index.js",
6+
"repository": "[email protected]:TeeSeal/discord.js-docs.git",
7+
"author": "TeeSeal <[email protected]>",
8+
"license": "MIT",
9+
"types": "types/index.d.ts",
10+
"engines": {
11+
"node": ">=16.20.2"
12+
},
13+
"packageManager": "[email protected]",
14+
"scripts": {
15+
"lint:check": "npx eslint src/ index.js",
16+
"lint": "npx eslint --fix src/ index.js",
17+
"prettier:check": "npx prettier --check src/ types/ index.js",
18+
"prettier": "npx prettier --write src/ types/ index.js"
19+
},
20+
"dependencies": {
21+
"common-tags": "^1.8.2",
22+
"discord.js": "^14.16.2",
23+
"fuse.js": "^3.6.1",
24+
"node-fetch": "^2.7.0"
25+
},
26+
"devDependencies": {
27+
"@eslint/js": "^9.11.1",
28+
"@types/eslint": "^9.6.1",
29+
"eslint": "^9.11.1",
30+
"eslint-config-prettier": "^9.1.0",
31+
"prettier": "^3.3.3"
32+
}
33+
}

0 commit comments

Comments
 (0)