-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #228 from navikt/feature/prettier-eslint
Prettier, eslint and editorconfig
- Loading branch information
Showing
121 changed files
with
5,280 additions
and
6,270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
max_line_length = 120 | ||
|
||
[*.{js,ejs,cjs,mjs,ts,jsx,tsx,json,css,less,yml,yaml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,17 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"next/core-web-vitals", | ||
"prettier", | ||
"plugin:cypress/recommended" | ||
], | ||
"rules": { | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ "ignoreRestSiblings": true } | ||
], | ||
"cypress/no-unnecessary-waiting": "warn" | ||
} | ||
} | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint"], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"next/core-web-vitals", | ||
"prettier", | ||
"plugin:cypress/recommended" | ||
], | ||
"rules": { | ||
"@typescript-eslint/no-unused-vars": ["warn", { "ignoreRestSiblings": true }], | ||
"cypress/no-unnecessary-waiting": "warn" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
- package-ecosystem: 'npm' | ||
directory: '/' | ||
schedule: | ||
interval: "monthly" | ||
interval: 'monthly' | ||
open-pull-requests-limit: 20 | ||
groups: | ||
all-minor-patch: | ||
patterns: | ||
- "*" | ||
- '*' | ||
update-types: | ||
- "minor" | ||
- "patch" | ||
- 'minor' | ||
- 'patch' | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
interval: "monthly" | ||
interval: 'monthly' | ||
groups: | ||
all: | ||
patterns: | ||
- "*" | ||
- package-ecosystem: "docker" | ||
directory: "/" | ||
- '*' | ||
|
||
- package-ecosystem: 'docker' | ||
directory: '/' | ||
schedule: | ||
interval: "monthly" | ||
interval: 'monthly' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
name: Autodeployment | ||
run-name: Autodeploy til prod (hver mandag) | ||
on: | ||
schedule: | ||
- cron: '0 08 * * 1' # kl 09 hver mandag | ||
schedule: | ||
- cron: '0 08 * * 1' # kl 09 hver mandag | ||
|
||
jobs: | ||
build-push-deploy-main: | ||
uses: ./.github/workflows/main.yml | ||
secrets: inherit | ||
permissions: | ||
contents: "read" | ||
id-token: "write" | ||
packages: "read" | ||
build-push-deploy-main: | ||
uses: ./.github/workflows/main.yml | ||
secrets: inherit | ||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
packages: 'read' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,48 @@ | ||
name: Build and push Docker container | ||
on: | ||
workflow_call: | ||
outputs: | ||
image: | ||
description: "The docker image" | ||
value: ${{ jobs.build-and-push.outputs.image }} | ||
inputs: | ||
environment: | ||
required: true | ||
type: string | ||
on: | ||
workflow_call: | ||
outputs: | ||
image: | ||
description: 'The docker image' | ||
value: ${{ jobs.build-and-push.outputs.image }} | ||
inputs: | ||
environment: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build-and-push: | ||
name: Build and push Docker container | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: "read" | ||
id-token: "write" | ||
packages: "read" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
registry-url: https://npm.pkg.github.com | ||
scope: "@navikt" | ||
cache: "npm" | ||
- name: Install dependencies | ||
run: npm ci | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set environment variables | ||
run: cp environments/${{ inputs.environment }}.env .env | ||
- name: Build | ||
env: | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
run: npm run build | ||
- name: Build and push Docker image | ||
uses: nais/docker-build-push@v0 | ||
id: docker-build-push | ||
with: | ||
team: team-soknad | ||
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} | ||
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} | ||
image_suffix: ${{ inputs.environment }} | ||
outputs: | ||
image: ${{ steps.docker-build-push.outputs.image }} | ||
|
||
|
||
|
||
build-and-push: | ||
name: Build and push Docker container | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
packages: 'read' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
registry-url: https://npm.pkg.github.com | ||
scope: '@navikt' | ||
cache: 'npm' | ||
- name: Install dependencies | ||
run: npm ci | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Set environment variables | ||
run: cp environments/${{ inputs.environment }}.env .env | ||
- name: Build | ||
env: | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
run: npm run build | ||
- name: Build and push Docker image | ||
uses: nais/docker-build-push@v0 | ||
id: docker-build-push | ||
with: | ||
team: team-soknad | ||
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} | ||
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} | ||
image_suffix: ${{ inputs.environment }} | ||
outputs: | ||
image: ${{ steps.docker-build-push.outputs.image }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
name: Manually triggered deployment | ||
run-name: Manual deploy to ${{ inputs.environment }} [${{ github.ref_name }}] | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: 'Environment to deploy' | ||
required: true | ||
default: 'preprod' | ||
type: choice | ||
options: | ||
- preprod | ||
- preprod-alt | ||
- prod | ||
workflow_dispatch: | ||
inputs: | ||
environment: | ||
description: 'Environment to deploy' | ||
required: true | ||
default: 'preprod' | ||
type: choice | ||
options: | ||
- preprod | ||
- preprod-alt | ||
- prod | ||
permissions: | ||
contents: "read" | ||
id-token: "write" | ||
packages: "read" | ||
contents: 'read' | ||
id-token: 'write' | ||
packages: 'read' | ||
|
||
jobs: | ||
preprod: | ||
if: inputs.environment == 'preprod' | ||
uses: ./.github/workflows/preprod.yml | ||
secrets: inherit | ||
preprod: | ||
if: inputs.environment == 'preprod' | ||
uses: ./.github/workflows/preprod.yml | ||
secrets: inherit | ||
|
||
preprod-alt: | ||
if: inputs.environment == 'preprod-alt' | ||
uses: ./.github/workflows/preprod-alt.yml | ||
secrets: inherit | ||
preprod-alt: | ||
if: inputs.environment == 'preprod-alt' | ||
uses: ./.github/workflows/preprod-alt.yml | ||
secrets: inherit | ||
|
||
prod: | ||
if: inputs.environment == 'prod' | ||
uses: ./.github/workflows/main.yml | ||
secrets: inherit | ||
prod: | ||
if: inputs.environment == 'prod' | ||
uses: ./.github/workflows/main.yml | ||
secrets: inherit |
Oops, something went wrong.