Initial commit

This commit is contained in:
Gabriel Augendre 2022-10-08 19:39:04 +02:00
commit 3af2ea3966
6 changed files with 109 additions and 0 deletions

50
.eslintrc Normal file
View File

@ -0,0 +1,50 @@
{
"env": {
"browser": true,
"es2019": true,
"jquery": true
},
"extends": [
"eslint:recommended"
],
"ignorePatterns": ["dist/", "node_modules/"],
"rules": {
"block-scoped-var": "error",
"consistent-return": "error",
"curly": "error",
"default-case": "error",
"default-param-last": ["error"],
"dot-notation": "error",
"eqeqeq": "error",
"guard-for-in": "error",
"max-classes-per-file": "error",
"no-alert": "error",
"no-caller": "error",
"no-else-return": "error",
"no-empty-function": "error",
"no-floating-decimal": "error",
"no-implicit-coercion": "error",
"no-multi-spaces": "error",
"no-multi-str": "error",
"no-param-reassign": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-self-compare": "error",
"no-throw-literal": "error",
"no-useless-concat": "error",
"radix": ["error", "as-needed"],
"require-await": "error",
"yoda": "error",
"no-shadow": "off",
"prefer-destructuring": ["error", { "array": false, "object": true }],
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "import", "next": "export" },
{ "blankLine": "always", "prev": "export", "next": "export" },
{ "blankLine": "always", "prev": "*", "next": "return" }
]
},
"parserOptions": {
"sourceType": "module"
}
}

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.idea

36
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,36 @@
exclude: (\.min\.(js|css)(\.map)?$|/vendor/)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-json
- id: check-yaml
args: [--allow-multiple-documents]
- id: end-of-file-fixer
- id: check-merge-conflict
- id: detect-private-key
- id: pretty-format-json
args:
- --autofix
- --no-sort-keys
- id: trailing-whitespace
args:
- --markdown-linebreak-ext=md
- repo: https://github.com/rtts/djhtml
rev: v1.5.2
hooks:
- id: djhtml
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.0
hooks:
- id: prettier
types_or: [javascript, css]
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.24.0
hooks:
- id: eslint
args: [--fix]
types_or: [javascript, css]
additional_dependencies:
- eslint
- eslint-config-prettier

5
.prettierrc Normal file
View File

@ -0,0 +1,5 @@
{
"tabWidth": 4,
"printWidth": 120,
"endOfLine": "auto"
}

17
index.html Normal file
View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Doses</title>
</head>
<body>
<h1>Doses converter</h1>
<label for="proof">Proof (%)</label>
<input type="number" id="proof" value="40">
<label for="volume">Volume (cl)</label>
<input type="number" id="volume" value="10">
<label for="dose">Dose</label>
<input type="number" id="dose" value="3.2">
<script src="main.js" defer></script>
</body>
</html>

0
main.js Normal file
View File