diff --git a/.gitignore b/.gitignore index 308caa5..0916cb9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ +# ESLINT report +eslint_report.html + +# Demo sources demos/src_highres demos/src_lowres diff --git a/eslint/Dockerfile b/eslint/Dockerfile new file mode 100644 index 0000000..000aeb9 --- /dev/null +++ b/eslint/Dockerfile @@ -0,0 +1,11 @@ +FROM debian:latest + +RUN apt-get update && apt-get install -y --no-install-recommends npm + +RUN npm install eslint --global + +COPY eslintrc.json /eslintrc.json + +ENTRYPOINT ["eslint", "--no-eslintrc"] + +CMD ["--help"] diff --git a/eslint/eslintrc.json b/eslint/eslintrc.json new file mode 100644 index 0000000..76a0ec4 --- /dev/null +++ b/eslint/eslintrc.json @@ -0,0 +1,34 @@ +{ + "env": { + "browser": true, + "es2021": true + }, + "extends": [ + "eslint:all" + ], + "rules": { + "semi": "warn", + "spaced-comment": "warn", + "padded-blocks": ["warn", "never"], + "camelcase": "warn", + "multiline-comment-style": "off", + "max-len": "warn", + "prefer-template": "warn", + "object-curly-spacing" : ["warn", "always"], + "func-style": ["warn", "declaration"], + "key-spacing": "warn", + "one-var": ["warn", "never"], + "quotes": "warn", + "space-before-function-paren": ["warn", "never"], + "no-undefined": "off", + "strict": ["error", "global"], + "keyword-spacing": "warn", + "function-call-argument-newline": "warn", + "operator-assignment": "off", + "space-before-blocks": "warn", + "brace-style": ["warn", "allman", {"allowSingleLine": true}], + "function-call-argument-newline" : ["warn", "consistent"], + "function-paren-newline": ["warn", "consistent"], + "no-magic-numbers": ["error", {"ignore": [0,1,2,100]}] + } +}