From f5417f57e5054423d049642ed137fcfda68c58ac Mon Sep 17 00:00:00 2001 From: confused-Techie Date: Thu, 14 Dec 2023 17:44:21 -0800 Subject: [PATCH] Add codacy config, and eslint config --- .codacy.yaml | 34 ++++++++++++++++++++++++++++++++++ .eslintrc.js | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 .codacy.yaml create mode 100644 .eslintrc.js diff --git a/.codacy.yaml b/.codacy.yaml new file mode 100644 index 00000000..375b64e1 --- /dev/null +++ b/.codacy.yaml @@ -0,0 +1,34 @@ +--- +engines: + duplication: + minTokenMatch: 80 +exclude_paths: + - "spec/fixtures/**" + - "templates/**" + +# Since Codacy exposes significantly little on the config. +# We can use the rest of this document to solidify our settings. +# +# Quality Settings: (Below are changed values, rest are default) +# * Pull requests won't pass the quality gate when: +# - New issues are over: 15 'critical' +# * Commits won't pass the quality gate: +# - New issues are over: 15 'critical' +# * The repository is below the quality goals when: +# - Issues are over: 20% +# - Complexity is over: 10% +# - File is complex when over: 20 +# - Duplication is over: 30 +# - File is duplicated when over: 1 'cloned block' +# - Coverage is under: 60% +# Enabled Engines: +# - CSSLint 1.0.5 +# - CoffeeLint 2.1.0 +# - ESLint 8.23.1 +# - Hadolint 1.18.2 +# - Jackson Linter 2.10.2 +# - PMD 6.48.0 +# - Semgrep: 1.50.0 +# - ShellCheck 0.8.0 +# - Stylelint 14.2.0 +# diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..086e9ad4 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,38 @@ +module.exports = { + env: { + browser: false, + commonjs: true, + es2021: true + }, + extends: [ + "eslint:recommended", + "plugin:node/recommended" + ], + overrides: [], + parserOptions: { + ecmaVersion: "latest" + }, + rules: { + "space-before-function-paren": [ "error", { + anonymous: "always", + asyncArrow: "always", + named: "never" + }], + "prettier/prettier": "off", + "ember-suave/lines-between-object-propertiess": "off", + "no-empty": "off" + }, + plugins: [], + globals: { + "describe": "readonly", + "it": "readonly", + "runs": "readonly", + "expect": "readonly", + "beforeEach": "readonly", + "afterEach": "readonly", + "silenceOutput": "readonly", + "spyOn": "readonly", + "spyOnToken": "readonly", + "waitsFor": "readonly" + } +};