Skip to content

Commit

Permalink
Fix Small Bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kathund committed Sep 24, 2024
1 parent 3b0eada commit c670d88
Show file tree
Hide file tree
Showing 6 changed files with 516 additions and 390 deletions.
11 changes: 6 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = crlf
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120

[*.{md,markdown}]
trim_trailing_whitespace = false
insert_final_newline = false
138 changes: 66 additions & 72 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,72 +1,66 @@
import globals from 'globals';
import prettier from 'eslint-config-prettier';
import sortImports from '@j4cobi/eslint-plugin-sort-imports';
import js from '@eslint/js';

export default [
js.configs.recommended,
prettier,
{
ignores: ['**/node_modules/', '**/pnpm-lock.yaml'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.es2022,
...globals.node
}
},
plugins: { 'sort-imports': sortImports },
rules: {
'sort-imports/sort-imports': [
'error',
{ ignoreCase: false, ignoreMemberSort: false, memberSyntaxSortOrder: ['all', 'single', 'multiple', 'none'] }
],
'max-len': ['error', { code: 120, ignoreUrls: true, ignoreComments: true }],
'no-constant-condition': ['error', { checkLoops: false }],
'prefer-const': ['warn', { destructuring: 'all' }],
'no-unused-vars': ['error', { args: 'none' }],
curly: ['warn', 'multi-line', 'consistent'],
'logical-assignment-operators': 'warn',
'no-template-curly-in-string': 'error',
'quote-props': ['error', 'as-needed'],
'comma-dangle': ['error', 'never'],
'no-useless-constructor': 'error',
'no-useless-assignment': 'error',
'no-inner-declarations': 'error',
'no-implicit-coercion': 'error',
'no-use-before-define': 'warn',
'no-underscore-dangle': 'warn',
'no-unneeded-ternary': 'error',
'default-param-last': 'error',
'one-var': ['warn', 'never'],
'no-inline-comments': 'warn',
'no-empty-function': 'error',
'no-useless-return': 'error',
'no-useless-rename': 'warn',
'no-useless-concat': 'warn',
'no-throw-literal': 'error',
'no-extend-native': 'error',
'default-case-last': 'warn',
'no-self-compare': 'error',
'no-new-wrappers': 'error',
'no-lone-blocks': 'error',
'no-undef-init': 'error',
'no-else-return': 'warn',
'no-extra-semi': 'error',
'require-await': 'warn',
yoda: ['error', 'always'],
'default-case': 'error',
'dot-notation': 'error',
'no-sequences': 'warn',
'no-multi-str': 'warn',
'no-lonely-if': 'warn',
'no-new-func': 'error',
'no-console': 'error',
camelcase: 'warn',
'no-var': 'warn',
eqeqeq: 'warn',
semi: 'error'
}
}
];
import prettier from 'eslint-config-prettier';
import globals from 'globals';
import js from '@eslint/js';

export default [
js.configs.recommended,
prettier,
{
ignores: ['**/node_modules/', '**/pnpm-lock.yaml'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.es2022,
...globals.node
}
},
rules: {
'max-len': ['error', { code: 120, ignoreUrls: true, ignoreComments: true }],
'no-constant-condition': ['error', { checkLoops: false }],
'prefer-const': ['warn', { destructuring: 'all' }],
'no-unused-vars': ['error', { args: 'none' }],
curly: ['warn', 'multi-line', 'consistent'],
'logical-assignment-operators': 'warn',
'no-template-curly-in-string': 'error',
'quote-props': ['error', 'as-needed'],
'comma-dangle': ['error', 'never'],
'no-useless-constructor': 'error',
'no-useless-assignment': 'error',
'no-inner-declarations': 'error',
'no-implicit-coercion': 'error',
'no-use-before-define': 'warn',
'no-underscore-dangle': 'warn',
'no-unneeded-ternary': 'error',
'default-param-last': 'error',
'one-var': ['warn', 'never'],
'no-inline-comments': 'warn',
'no-empty-function': 'error',
'no-useless-return': 'error',
'no-useless-rename': 'warn',
'no-useless-concat': 'warn',
'no-throw-literal': 'error',
'no-extend-native': 'error',
'default-case-last': 'warn',
'no-self-compare': 'error',
'no-new-wrappers': 'error',
'no-lone-blocks': 'error',
'no-undef-init': 'error',
'no-else-return': 'warn',
'no-extra-semi': 'error',
'require-await': 'warn',
yoda: ['error', 'always'],
'default-case': 'error',
'dot-notation': 'error',
'no-sequences': 'warn',
'no-multi-str': 'warn',
'no-lonely-if': 'warn',
'no-new-func': 'error',
'no-console': 'error',
camelcase: 'warn',
'no-var': 'warn',
eqeqeq: 'warn',
semi: 'error'
}
}
];
67 changes: 33 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
{
"name": "discord.js-docs",
"version": "0.3.0",
"description": "A discord.js docs parser and wrapper.",
"main": "index.js",
"repository": "git@github.com:TeeSeal/discord.js-docs.git",
"author": "TeeSeal <teesealz@gmail.com>",
"license": "MIT",
"types": "types/index.d.ts",
"engines": {
"node": ">=16.20.2"
},
"packageManager": "pnpm@9.7.0",
"scripts": {
"lint:check": "npx eslint src/ index.js",
"lint": "npx eslint --fix src/ index.js",
"prettier:check": "npx prettier --check src/ index.js",
"prettier": "npx prettier --write src/ index.js"
},
"dependencies": {
"common-tags": "^1.8.2",
"discord.js": "^14.16.2",
"fuse.js": "^3.6.1",
"node-fetch": "^2.7.0"
},
"devDependencies": {
"@eslint/js": "^9.11.1",
"@j4cobi/eslint-plugin-sort-imports": "^1.0.2",
"@types/eslint": "^9.6.1",
"eslint": "^9.11.1",
"eslint-config-prettier": "^9.1.0",
"prettier": "^3.3.3"
}
}
{
"name": "discord.js-docs",
"version": "0.3.0",
"description": "A discord.js docs parser and wrapper.",
"main": "index.js",
"repository": "git@github.com:TeeSeal/discord.js-docs.git",
"author": "TeeSeal <teesealz@gmail.com>",
"license": "MIT",
"types": "types/index.d.ts",
"engines": {
"node": ">=16.20.2"
},
"packageManager": "pnpm@9.7.0",
"scripts": {
"lint:check": "npx eslint src/ index.js",
"lint": "npx eslint --fix src/ index.js",
"prettier:check": "npx prettier --check src/ types/ index.js",
"prettier": "npx prettier --write src/ types/ index.js"
},
"dependencies": {
"common-tags": "^1.8.2",
"discord.js": "^14.16.2",
"fuse.js": "^3.6.1",
"node-fetch": "^2.7.0"
},
"devDependencies": {
"@eslint/js": "^9.11.1",
"@types/eslint": "^9.6.1",
"eslint": "^9.11.1",
"eslint-config-prettier": "^9.1.0",
"prettier": "^3.3.3"
}
}
Loading

0 comments on commit c670d88

Please sign in to comment.