-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow setting a max quantity. we still can't set a max price unfortunately. add eslint/prettier setup. update readme.
- Loading branch information
1 parent
dbbae02
commit 8bc040f
Showing
11 changed files
with
4,558 additions
and
355 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"env": { "browser": true, "es2021": true, "greasemonkey": true }, | ||
"extends": [ | ||
"eslint:recommended", | ||
"airbnb-base", | ||
"plugin:prettier/recommended" | ||
], | ||
"parserOptions": { "ecmaVersion": "latest", "sourceType": "script" }, | ||
"globals": { | ||
"GM_getValue": "writable", | ||
"GM_setValue": "writable", | ||
"GM_addStyle": "writable", | ||
"GM_registerMenuCommand": "writable", | ||
"GM_unregisterMenuCommand": "writable" | ||
}, | ||
"rules": { | ||
"camelcase": [ | ||
"error", | ||
{ | ||
"ignoreDestructuring": false, | ||
"ignoreGlobals": true, | ||
"ignoreImports": true, | ||
"properties": "always" | ||
} | ||
], | ||
"class-methods-use-this": "off", | ||
"curly": [ | ||
// You're not supposed to use this rule with prettier, but in my experience | ||
// it works just fine with prettier-eslint and the following settings: | ||
"error", | ||
"multi-line", | ||
"consistent" | ||
], | ||
"default-param-last": "off", | ||
"eqeqeq": ["error", "smart"], | ||
"indent": "off", | ||
"max-classes-per-file": "off", | ||
"max-len": "off", | ||
"new-cap": ["error", { "capIsNew": false }], | ||
"no-alert": "off", | ||
"no-cond-assign": ["error", "except-parens"], | ||
"no-confusing-arrow": ["error", { "allowParens": false }], | ||
"no-console": "off", | ||
"no-continue": "off", | ||
"no-empty": ["error", { "allowEmptyCatch": true }], | ||
"no-eval": "error", | ||
"no-fallthrough": [ | ||
"error", | ||
{ | ||
// The eslint rule doesn't allow for case-insensitive regex option. | ||
// The following pattern allows for a dash between "fall through" as | ||
// well as alternate spelling of "fall thru". The pattern also allows | ||
// for an optional "s" at the end of "fall" ("falls through"). | ||
"commentPattern": "[Ff][Aa][Ll][Ll][Ss]?[\\s-]?([Tt][Hh][Rr][Oo][Uu][Gg][Hh]|[Tt][Hh][Rr][Uu])" | ||
} | ||
], | ||
"no-implied-eval": "error", | ||
"no-param-reassign": "off", | ||
"no-plusplus": "off", | ||
"no-promise-executor-return": "off", | ||
"no-restricted-syntax": ["error", "SequenceExpression"], | ||
"no-return-assign": "off", | ||
"no-shadow": "off", | ||
"no-underscore-dangle": "off", | ||
"no-unused-expressions": [ | ||
"error", | ||
{ "allowTaggedTemplates": true, "allowTernary": true } | ||
], | ||
"no-unused-vars": ["error", { "args": "after-used", "vars": "local" }], | ||
"no-use-before-define": ["error", { "classes": false, "functions": false }], | ||
"prefer-destructuring": "off", | ||
"prettier/prettier": ["error", {}, { "usePrettierrc": true }], | ||
"quotes": [ | ||
"error", | ||
"double", | ||
{ "allowTemplateLiterals": false, "avoidEscape": true } | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Node modules | ||
node_modules/ | ||
|
||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
!.vscode/*.code-snippets | ||
|
||
# Local History for Visual Studio Code | ||
.history/ | ||
|
||
# Built Visual Studio Code Extensions | ||
*.vsix | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional stylelint cache | ||
.stylelintcache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"endOfLine": "lf", | ||
"arrowParens": "avoid", | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": false, | ||
"trailingComma": "es5", | ||
"quoteProps": "as-needed", | ||
"bracketSameLine": true, | ||
"bracketSpacing": true, | ||
"embeddedLanguageFormatting": "auto" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"eslint.validate": ["javascript"], | ||
"prettier.printWidth": 80, | ||
"rewrap.wrappingColumn": 80, | ||
"editor.rulers": [72, 80], | ||
"[git-commit]": { "editor.rulers": [50, 72], "rewrap.wrappingColumn": 72 }, | ||
"editor.formatOnPaste": false, | ||
"editor.formatOnType": false, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnSaveMode": "file", | ||
"[javascript][javascriptreact][typescript][typescriptreact]": { | ||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint", | ||
"editor.codeActionsOnSave": {} | ||
}, | ||
"[json][jsonc]": { | ||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint" | ||
}, | ||
"[html]": { "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" }, | ||
"[yaml]": { "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" }, | ||
"[css][sass][scss][less]": { | ||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint" | ||
}, | ||
"[markdown]": { "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.