Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions definitions/runtimes/plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
version: 0.1
downloads:
- name: node
downloads:
# macos arm64 was introduced after this version.
- os: macos
url: https://nodejs.org/dist/v${version}/node-v${version}-darwin-x64.tar.gz
version: <16.0.0
strip_components: 1
- os:
linux: linux
macos: darwin
cpu:
x86_64: x64
arm_64: arm64
url: https://nodejs.org/dist/v${version}/node-v${version}-${os}-${cpu}.tar.gz
strip_components: 1
- os: windows
cpu: x86_64
url: https://nodejs.org/dist/v${version}/node-v${version}-win-x64.zip
strip_components: 1

runtimes:
definitions:
- type: node
download: node
runtime_environment:
- name: HOME
value: ${env.HOME:-}
- name: PATH
list:
- "${runtime}/bin"
- "${runtime}" # Windows places binaries here instead of bin/
- "${env.PATH}"
- name: http_proxy
value: ${env.http_proxy}
optional: true
- name: https_proxy
value: ${env.https_proxy}
optional: true
- name: NODE_EXTRA_CA_CERTS
value: ${env.NODE_EXTRA_CA_CERTS}
optional: true
- name: NODE_OPTIONS
value: ${env.NODE_OPTIONS}
optional: true
- name: NPM_CONFIG_USERCONFIG
value: ${env.NPM_CONFIG_USERCONFIG}
optional: true
# Necessary for some Windows install scripts
- name: COMSPEC
value: ${env.COMSPEC}
optional: true
linter_environment:
- name: PATH
list: ["${linter}/node_modules/.bin"]
- name: NODE_PATH
value: ${linter}/node_modules
- name: NODE_OPTIONS
value: ${env.NODE_OPTIONS}
optional: true
known_good_version: 18.20.5
version_commands:
- run: node --version
parse_regex: ${semver}
shims: [node, npm, npx, corepack]
51 changes: 51 additions & 0 deletions definitions/tools/eslint/tool.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
version: 0.1
tools:
definitions:
- name: eslint
runtime: node
package: eslint
shims: [eslint]
known_good_version: 8.10.0
lint:
definitions:
- name: eslint
files: [typescript, javascript]
tools: [eslint]
description: Find and fix problems in your TS/JS code
commands:
- name: lint
version: ">=9.0.0"
direct_configs:
- eslint.config.js
- eslint.config.mjs
- eslint.config.cjs
output: eslint
run: eslint --output-file ${tmpfile} --format json ${target}
error_codes: [2]
read_output_from: tmp_file
batch: true
- name: lint
version: <=8.57.0
direct_configs:
- .eslintrc
- .eslintrc.cjs
- .eslintrc.js
- .eslintrc.json
- .eslintrc.mjs
- .eslintrc.yaml
- .eslintrc.yml
output: eslint
run: eslint --output-file ${tmpfile} --format json ${target}
error_codes: [2]
read_output_from: tmp_file
batch: true
suggest_if: config_present
affects_cache:
- .eslintignore
- package.json
- tsconfig.json
issue_url_format: https://eslint.org/docs/rules/{}
known_good_version: 8.10.0
version_command:
parse_regex: ${semver}
run: eslint --version
25 changes: 25 additions & 0 deletions definitions/tools/trivy/tool.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 0.1
downloads:
- name: trivy
downloads:
- url: https://github.com/aquasecurity/trivy/releases/download/v${version}/trivy_${version}_Linux-${cpu}.tar.gz
os: linux
cpu:
x86_64: 64bit
arm_64: ARM64
- url: https://github.com/aquasecurity/trivy/releases/download/v${version}/trivy_${version}_macOS-${cpu}.tar.gz
os: macos
cpu:
x86_64: 64bit
arm_64: ARM64
- url: https://github.com/aquasecurity/trivy/releases/download/v${version}/trivy_${version}_windows-${cpu}.zip
os: windows
cpu:
x86_64: 64bit
arm_64: ARM64
tools:
definitions:
- name: trivy
download: trivy
shims: [trivy]
known_good_version: 0.44.1
110 changes: 110 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
import emberPlugin from 'eslint-plugin-ember';
import regexpPlugin from 'eslint-plugin-regexp';

export default [
{
plugins: {
ember: emberPlugin,
regexp: regexpPlugin
},
rules: {
// Ember rules
"ember/no-volatile-computed-properties": "error",
"ember/no-assignment-of-untracked-properties-used-in-tracking-contexts": "error",
"ember/no-restricted-resolver-tests": "error",
"ember/no-component-lifecycle-hooks": "error",
"ember/no-incorrect-calls-with-inline-anonymous-functions": "error",
"ember/new-module-imports": "error",
"ember/no-invalid-test-waiters": "error",
"ember/routes-segments-snake-case": "error",
"ember/no-settled-after-test-helper": "error",
"ember/no-test-support-import": "error",
"ember/closure-actions": "error",
"ember/no-string-prototype-extensions": "error",
"ember/no-deeply-nested-dependent-keys-with-each": "error",
"ember/no-empty-glimmer-component-classes": "error",
"ember/no-mixins": "error",
"ember/no-try-invoke": "error",
"ember/no-observers": "error",
"ember/use-ember-data-rfc-395-imports": "error",
"ember/no-on-calls-in-components": "error",
"ember/no-new-mixins": "error",
"ember/jquery-ember-run": "error",
"ember/avoid-using-needs-in-controllers": "error",
"ember/no-function-prototype-extensions": "error",
"ember/no-attrs-in-components": "error",
"ember/no-classic-classes": "error",
"ember/classic-decorator-hooks": "error",
"ember/require-valid-css-selector-in-test-helpers": "error",
"ember/classic-decorator-no-classic-methods": "error",
"ember/no-test-and-then": "error",
"ember/no-actions-hash": "error",
"ember/no-ember-super-in-es-classes": "error",
"ember/no-duplicate-dependent-keys": "error",
"ember/require-return-from-computed": "error",
"ember/no-ember-testing-in-module-scope": "error",
"ember/no-test-this-render": "error",
"ember/avoid-leaking-state-in-ember-objects": "error",
"ember/no-test-import-export": "error",

// Regexp rules
"regexp/no-dupe-disjunctions": "error",

Check notice on line 51 in eslint.config.mjs

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

eslint.config.mjs#L51

Unexpected blank line between object properties.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy has a fix for the issue: Unexpected blank line between object properties.

Suggested change
"regexp/no-dupe-disjunctions": "error",
"regexp/no-useless-lazy": "error",

"regexp/no-useless-assertions": "error",
"regexp/no-useless-lazy": "error",
"regexp/no-non-standard-flag": "error",
"regexp/no-escape-backspace": "error",
"regexp/strict": "error",
"regexp/no-optional-assertion": "error",
"regexp/prefer-star-quantifier": "error",
"regexp/no-empty-alternative": "error",
"regexp/confusing-quantifier": "error",
"regexp/no-useless-two-nums-quantifier": "error",
"regexp/no-useless-set-operand": "error",
"regexp/no-super-linear-backtracking": "error",
"regexp/no-useless-range": "error",
"regexp/no-useless-flag": "error",
"regexp/no-useless-dollar-replacements": "error",
"regexp/no-useless-non-capturing-group": "error",
"regexp/prefer-set-operation": "error",
"regexp/no-dupe-characters-character-class": "error",
"regexp/no-obscure-range": "error",
"regexp/prefer-d": "error",
"regexp/no-invisible-character": "error",
"regexp/no-missing-g-flag": "error",
"regexp/no-useless-escape": "error",
"regexp/no-invalid-regexp": "error",
"regexp/prefer-predefined-assertion": "error",
"regexp/no-empty-string-literal": "error",
"regexp/no-empty-character-class": "error",
"regexp/no-empty-lookarounds-assertion": "error",
"regexp/no-useless-backreference": "error",
"regexp/no-empty-group": "error",
"regexp/negation": "error",
"regexp/optimal-lookaround-quantifier": "error",
"regexp/prefer-plus-quantifier": "error",
"regexp/prefer-question-quantifier": "error",
"regexp/no-trivially-nested-quantifier": "error",
"regexp/no-trivially-nested-assertion": "error",
"regexp/no-useless-quantifier": "error",
"regexp/prefer-range": "error",
"regexp/no-zero-quantifier": "error",
"regexp/prefer-character-class": "error",
"regexp/no-legacy-features": "error",
"regexp/sort-flags": "error",
"regexp/control-character-escape": "error",
"regexp/match-any": "error",
"regexp/no-potentially-useless-backreference": "error",
"regexp/no-useless-string-literal": "error",
"regexp/no-useless-character-class": "error",
"regexp/no-empty-capturing-group": "error",
"regexp/optimal-quantifier-concatenation": "error",
"regexp/no-misleading-unicode-character": "error",
"regexp/no-contradiction-with-assertion": "error",
"regexp/no-misleading-capturing-group": "error",
"regexp/no-lazy-ends": "error",
"regexp/simplify-set-operations": "error",
"regexp/prefer-unicode-codepoint-escapes": "error",
"regexp/use-ignore-case": "error"
}
}
];