Skip to content

Commit

Permalink
chore(lint): rework linting stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
awlayton committed Jun 26, 2024
1 parent d9def65 commit ddfae99
Show file tree
Hide file tree
Showing 106 changed files with 3,892 additions and 2,619 deletions.
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
- package-ecosystem: github-actions
directory: /
schedule:
interval: 'daily'
interval: daily
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: 'CodeQL'
name: CodeQL

on:
push:
Expand All @@ -18,7 +18,7 @@ on:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '25 20 * * 4'
- cron: 25 20 * * 4

jobs:
analyze:
Expand All @@ -28,7 +28,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: ['javascript']
language: [javascript]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/semgrep-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ on:
workflow_dispatch: {}
# Scan mainline branches and report all findings:
push:
branches: ["master", "main"]
branches: [master, main]
# Schedule the CI job (this method uses cron syntax):
schedule:
- cron: '24 3 * * 3'
- cron: 24 3 * * 3

jobs:
semgrep:
Expand Down Expand Up @@ -55,4 +55,4 @@ jobs:
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ./securecodewarrior.sarif
if: always()
if: always()
8 changes: 4 additions & 4 deletions .github/workflows/validate-codeowners.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Validate Codeowners file

permissions: read-all

on:
push:
branches:
Expand All @@ -9,8 +11,6 @@ on:
pull_request:
branches:
- '**'
tags-ignore:
- '**'

jobs:
validate-codeowners:
Expand All @@ -32,8 +32,8 @@ jobs:
# so we will not be using it for now
# duppaterns: Reports if codeowners file contains duplicated lines
# syntax: Reports if file contains an invalid syntax definition
checks: 'files,duppatterns,syntax'
experimental_checks: 'notowned'
checks: files,duppatterns,syntax
experimental_checks: notowned

# GitHub access token is required only if the `owners` check is enabled
#github_access_token: "${{ secrets.OWNERS_VALIDATOR_PAC }}"
2 changes: 1 addition & 1 deletion charts/oada/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ maintainers:
email: alex@layton.in
type: application
version: 3.4.0
appVersion: '3.10.0'
appVersion: 3.10.0
annotations:
artifacthub.io/recommendations: |
- url: https://artifacthub.io/packages/helm/cert-manager/cert-manager
Expand Down
2 changes: 1 addition & 1 deletion common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
CONFIG: ${OADA_CONFIG-/oada.config.mjs}
# Default to development
NODE_ENV: ${NODE_ENV-development}
NODE_OPTIONS: "$$INSPECT --enable-source-maps --unhandled-rejections=strict"
NODE_OPTIONS: $$INSPECT --enable-source-maps --unhandled-rejections=strict
INSPECT: ${INSPECT---inspect=0.0.0.0:9229}
DEBUG: ${DEBUG-*}
PINO_LEVEL: ${PINO_LEVEL-debug}
Expand Down
30 changes: 15 additions & 15 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ services:
args:
OADA_SERVICE: http-handler
healthcheck:
test: [ 'CMD', 'yarn', 'healthcheck' ]
test: [ CMD, yarn, healthcheck ]
depends_on:
- startup
networks:
Expand Down Expand Up @@ -204,7 +204,7 @@ services:
# - ARANGO_RANDOM_ROOT_PASSWORD=1
ARANGO_NO_AUTH: 1
ARANGO_STORAGE_ENGINE: rocksdb
command: [ 'arangod', '--server.statistics=false' ]
command: [ arangod, --server.statistics=false ]

# Redpanda is API compatible with kafka.
redpanda:
Expand Down Expand Up @@ -292,7 +292,7 @@ services:
- prometheus_config:/etc/prometheus
user: root
entrypoint:
- '/bin/sh'
- /bin/sh
- -c
command:
- |
Expand All @@ -312,7 +312,7 @@ services:
networks:
grafana_net:
ports:
- '3000:3000'
- 3000:3000
volumes:
- grafana_data:/var/lib/grafana
- grafana_prov:/etc/grafana/provisioning
Expand All @@ -331,7 +331,7 @@ services:
volumes:
- grafana_prov:/etc/grafana/provisioning
entrypoint:
- '/bin/sh'
- /bin/sh
- -c
command:
- |
Expand All @@ -355,7 +355,7 @@ services:
volumes:
- grafana_prov:/etc/grafana/provisioning
entrypoint:
- '/bin/sh'
- /bin/sh
- -c
command:
- |
Expand All @@ -382,7 +382,7 @@ services:
- grafana_data:/var/lib/grafana
- grafana_prov:/etc/grafana/provisioning
entrypoint:
- '/bin/sh'
- /bin/sh
- -c
command:
- |
Expand Down Expand Up @@ -416,14 +416,14 @@ networks:
x-mutagen:
forward:
agrango:
source: 'tcp:localhost:8529'
destination: 'network://arango_net:tcp:arangodb:8529'
source: tcp:localhost:8529
destination: network://arango_net:tcp:arangodb:8529
kafka:
source: 'tcp:localhost:9092'
destination: 'network://kafka_net:tcp:kafka:9092'
source: tcp:localhost:9092
destination: network://kafka_net:tcp:kafka:9092
prometheus:
source: 'tcp:localhost:9090'
destination: 'network://grafana_net:tcp:prometheus:9090'
source: tcp:localhost:9090
destination: network://grafana_net:tcp:prometheus:9090
grafana:
source: 'tcp:localhost:3000'
destination: 'network://grafana_net:tcp:grafana:3000'
source: tcp:localhost:3000
destination: network://grafana_net:tcp:grafana:3000
21 changes: 21 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* @license
* Copyright 2024 Open Ag Data Alliance
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

// @ts-check

export * from './oada/eslint.config.mjs';

22 changes: 15 additions & 7 deletions oada-server.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -117,19 +117,20 @@
"prettier.prettierPath": "oada/.yarn/sdks/prettier/index.js",
"typescript.tsdk": "oada/.yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"eslint.nodePath": "../../.yarn/sdks",
"eslint.workingDirectories": [{ "directory": "./oada/", "!cwd": true }],
"eslint.nodePath": "../../../oada/.yarn/sdks",
"files.exclude": {
".actrc": true,
".history": true,
".dccache": true,
".history": true,
"**/.DS_Store": true,
"**/.grunt": true,
"**/.history": true,
"**/.lock-wscript": true,
"**/.node_repl_history": true,
"**/.npm": true,
"**/.nyc_output": true,
"**/.pnp.*": true,
"**/.test": true,
"**/.vim": true,
"**/.yarn": true,
"**/*.log": true,
Expand All @@ -138,7 +139,6 @@
"**/*.tsbuildinfo": true,
"**/coverage": true,
"**/dist": true,
"**/.test": true,
"**/lib-cov": true,
"**/logs": true,
"**/node_modules": true,
Expand Down Expand Up @@ -211,11 +211,19 @@
"Yaguang",
"Zhang"
],
"eslint.useESLintClass": true,
"licenser.author": "Open Ag Data Alliance",
"licenser.license": "AL2",
"commitlint.config.file": "oada/commitlint.config.cjs",
"html.format.templating": true,
"html.validate.styles": false
"html.validate.styles": false,
"eslint.format.enable": true,
"eslint.lintTask.enable": true,
"eslint.useFlatConfig": true,
"eslint.debug": true,
"eslint.useESLintClass": true,
"eslint.validate": [
"typescript",
"javascript"
]
}
}
}
9 changes: 0 additions & 9 deletions oada/.eslintignore

This file was deleted.

2 changes: 0 additions & 2 deletions oada/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,5 @@
"**/.pnp.*": true
},
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"eslint.nodePath": ".yarn/sdks"
}
Loading

0 comments on commit ddfae99

Please sign in to comment.