Skip to content

Commit

Permalink
chore: update yarn eslint etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
awlayton committed Jun 4, 2024
1 parent 8b4f05e commit 2cddd7e
Show file tree
Hide file tree
Showing 20 changed files with 2,043 additions and 2,720 deletions.
24 changes: 12 additions & 12 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
root: true

extends:
- 'plugin:@typescript-eslint/recommended'
- plugin:@typescript-eslint/recommended
- plugin:node/recommended
- plugin:github/recommended
- plugin:promise/recommended
- plugin:regexp/recommended
- plugin:array-func/recommended
#- plugin:array-func/recommended
- plugin:optimize-regex/recommended
- plugin:import/recommended
- plugin:unicorn/recommended
- plugin:security/recommended
- plugin:sonarjs/recommended
#- plugin:security/recommended
#- plugin:sonarjs/recommended
- plugin:ava/recommended
- xo
- prettier
- plugin:prettier/recommended

plugins:
- '@typescript-eslint'
- node
- github
- promise
- regexp
- array-func
#- array-func
- optimize-regex
- no-constructor-bind
- import
Expand All @@ -37,18 +37,18 @@ parser: '@typescript-eslint/parser'

parserOptions:
ecmaVersion: 2020
project: './**/tsconfig*.json'
project: ./**/tsconfig*.json

overrides:
- files: '*.{c,m,}ts'
extends:
- plugin:github/typescript
- plugin:import/typescript
- xo-typescript
- prettier
- plugin:prettier/recommended
parserOptions:
ecmaVersion: 2020
project: './**/tsconfig*.json'
project: ./**/tsconfig*.json
rules:
'@typescript-eslint/naming-convention':
[
Expand Down Expand Up @@ -86,8 +86,8 @@ overrides:
{
args: after-used,
ignoreRestSiblings: true,
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
varsIgnorePattern: ^_,
argsIgnorePattern: ^_,
},
]
'@typescript-eslint/consistent-type-definitions': [warn, interface]
Expand All @@ -114,7 +114,7 @@ rules:
*/
onNonMatchingHeader: append
nonMatchingTolerance: 0.7
sonarjs/no-duplicate-string: [warn, 5]
sonarjs/no-duplicate-string: [warn, { threshold: 5 }]
sonarjs/cognitive-complexity: warn
eslint-comments/no-unused-disable: off
import/extensions: off
Expand Down
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
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"tags.*": true,
"**/.pnp.*": true
},
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"eslint.nodePath": ".yarn/sdks",
Expand Down Expand Up @@ -54,7 +54,10 @@
"cSpell.words": [
"Buildx",
"codeql",
"foodlogiq",
"fsqa",
"lcov",
"masterid",
"pino",
"Snyk",
"sonarjs",
Expand Down
593 changes: 297 additions & 296 deletions .yarn/releases/yarn-4.1.1.cjs → .yarn/releases/yarn-4.2.2.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ compressionLevel: mixed

enableGlobalCache: false

yarnPath: .yarn/releases/yarn-4.1.1.cjs
yarnPath: .yarn/releases/yarn-4.2.2.cjs
41 changes: 20 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,42 @@
ARG NODE_VER=20-alpine
ARG DIR=/usr/src/app/

FROM node:$NODE_VER AS install
FROM node:$NODE_VER AS base
ARG DIR

# Install needed packages
RUN apk add --no-cache \
dumb-init

WORKDIR ${DIR}

COPY ./.yarn ${DIR}.yarn
COPY ./package.json ./yarn.lock ./.yarnrc.yml ${DIR}

RUN chown -R node:node ${DIR}
# Do not run service as root
USER node

RUN yarn workspaces focus --all --production

FROM install AS build
# Launch entrypoint with dumb-init
# Remap SIGTERM to SIGINT https://github.com/Yelp/dumb-init#signal-rewriting
ENTRYPOINT ["/usr/bin/dumb-init", "--rewrite", "15:2", "--", "yarn", "run"]
CMD ["start"]

FROM base AS build
ARG DIR

# Install dev deps too
RUN yarn install --immutable

COPY . ${DIR}

# Build code and remove dev deps
RUN yarn build --verbose && rm -rfv .yarn .pnp*
# Build code
RUN yarn build --verbose

FROM node:$NODE_VER AS production
FROM base AS production
ARG DIR

# Install needed packages
RUN apk add --no-cache \
dumb-init

# Do not run service as root
USER node

WORKDIR ${DIR}

COPY --from=install ${DIR} ${DIR}
COPY --from=build ${DIR} ${DIR}

# Launch entrypoint with dumb-init
# Remap SIGTERM to SIGINT https://github.com/Yelp/dumb-init#signal-rewriting
ENTRYPOINT ["/usr/bin/dumb-init", "--rewrite", "15:2", "--", "yarn", "run"]
CMD ["start"]
# Copy in build code
COPY --from=build ${DIR}/dist ${DIR}/dist
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ The query method utilizes Fuse.js to fuzzy find things, but `sapid` and `masteri
-queries including `sapid` and/or `masterid` will attempt to find matches using those keys. Matches based on these keys will include `exact: true` in the result.
-If one of the two is included and matches on an entry (regardless of other keys), that entry will be returned.
-If both are included, both must match exactly on an entry in order for that entry to be returned.
-If both are included along with additonal search keys, but no `exact` matches are returned, it will fall back to a fuzzy search.
-If both are included along with additonal search keys, but no `exact` matches are returned, it will fall back to a fuzzy search.
90 changes: 44 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,69 +51,67 @@
},
"license": "Apache-2.0",
"dependencies": {
"@elastic/elasticsearch": "^8.6.0",
"@elastic/elasticsearch": "^8.13.1",
"@oada/client": "^5.1.0",
"@oada/jobs": "^4.5.1",
"@oada/lib-config": "^3.5.1",
"@oada/lib-prom": "^3.5.1",
"@oada/list-lib": "^4.2.6",
"@oada/lib-config": "^3.9.1",
"@oada/lib-prom": "^3.8.0",
"@oada/list-lib": "^4.3.0",
"@oada/pino-debug": "^3.10.0",
"@oada/types": "^3.4.6",
"@oada/types": "^3.5.3",
"clone-deep": "^4.0.1",
"convict": "^6.2.4",
"convict-format-with-moment": "^6.2.0",
"debug": "^4.3.4",
"dotenv": "^16.0.3",
"es-main": "^1.2.0",
"fuse.js": "^6.6.2",
"js-sha256": "^0.9.0",
"debug": "^4.3.5",
"es-main": "^1.3.0",
"fuse.js": "^7.0.0",
"js-sha256": "^0.11.0",
"json-ptr": "^3.1.1",
"lodash": "^4.17.21",
"match-json": "^1.3.5",
"tslib": "^2.5.0"
"match-json": "^1.3.7",
"tslib": "^2.6.2"
},
"devDependencies": {
"@ava/typescript": "^3.0.1",
"@tsconfig/node16": "^1.0.3",
"@types/clone-deep": "^4",
"@types/convict": "^6.1.1",
"@types/debug": "^4.1.7",
"@types/lodash": "^4",
"@types/node": "^16.18.12",
"@typescript-eslint/eslint-plugin": "^5.51.0",
"@typescript-eslint/parser": "^5.51.0",
"@yarnpkg/sdks": "^3.0.0-rc.39",
"ava": "5.2.0",
"c8": "^7.12.0",
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.6.0",
"eslint-config-xo": "^0.43.1",
"eslint-config-xo-typescript": "^0.56.0",
"eslint-plugin-array-func": "^3.1.8",
"eslint-plugin-ava": "^14.0.0",
"eslint-plugin-escompat": "^3.3.4",
"@ava/typescript": "^5.0.0",
"@tsconfig/node20": "^20.1.4",
"@types/clone-deep": "^4.0.4",
"@types/convict": "^6.1.6",
"@types/debug": "^4.1.12",
"@types/lodash": "^4.17.4",
"@types/node": "^20.14.1",
"@typescript-eslint/eslint-plugin": "^7.12.0",
"@typescript-eslint/parser": "^7.12.0",
"@yarnpkg/sdks": "^3.1.2",
"ava": "6.1.3",
"c8": "^9.1.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-xo": "^0.45.0",
"eslint-config-xo-typescript": "^4.0.0",
"eslint-plugin-array-func": "^5.0.1",
"eslint-plugin-ava": "^15.0.1",
"eslint-plugin-escompat": "^3.4.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-github": "^4.6.0",
"eslint-plugin-github": "^5.0.0",
"eslint-plugin-i18n-text": "^1.0.1",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-no-constructor-bind": "^2.0.4",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-no-secrets": "^0.8.9",
"eslint-plugin-no-secrets": "^1.0.2",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-notice": "^0.9.10",
"eslint-plugin-optimize-regex": "^1.2.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-regexp": "^1.12.0",
"eslint-plugin-security": "^1.7.1",
"eslint-plugin-sonarjs": "^0.18.0",
"eslint-plugin-unicorn": "^45.0.2",
"prettier": "^2.8.4",
"typescript": "^5.0.2"
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.2.0",
"eslint-plugin-regexp": "^2.6.0",
"eslint-plugin-security": "^3.0.0",
"eslint-plugin-sonarjs": "^1.0.3",
"eslint-plugin-unicorn": "^53.0.0",
"prettier": "^3.3.0",
"typescript": "^5.4.5"
},
"packageManager": "yarn@4.1.1",
"packageManager": "yarn@4.2.2",
"volta": {
"node": "16.19.0"
"node": "20.14.0"
}
}
}
Loading

0 comments on commit 2cddd7e

Please sign in to comment.