Skip to content

Commit

Permalink
Merge branch 'develop' into add-nais-deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
skykanin committed Jan 6, 2025
2 parents de32f0d + 17a7ea2 commit aa9348b
Show file tree
Hide file tree
Showing 19 changed files with 3,524 additions and 916 deletions.
26 changes: 0 additions & 26 deletions .eslintrc.cjs

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/build-and-lint-on-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ jobs:

- name: Check for ESLint warnings and errors
run: pnpm run lint

- name: Run tests
run: pnpm run tests
16 changes: 8 additions & 8 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = {
arrowParens: 'always',
printWidth: 120,
semi: false,
tabWidth: 2,
singleQuote: true,
jsxSingleQuote: true,
trailingComma: 'es5'
}
arrowParens: 'always',
printWidth: 120,
semi: false,
tabWidth: 2,
singleQuote: true,
jsxSingleQuote: true,
trailingComma: 'es5',
}
63 changes: 63 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { fixupConfigRules } from '@eslint/compat'
import reactRefresh from 'eslint-plugin-react-refresh'
import prettier from 'eslint-plugin-prettier'
import globals from 'globals'
import tsParser from '@typescript-eslint/parser'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
})

export default [
{
ignores: ['**/dist', '**/.gitignore'],
},
...fixupConfigRules(
compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'prettier'
)
),
{
plugins: {
'react-refresh': reactRefresh,
prettier,
},

languageOptions: {
globals: {
...globals.node,
...globals.browser,
},

parser: tsParser,
},

rules: {
'react-refresh/only-export-components': [
'warn',
{
allowConstantExport: true,
},
],

'prettier/prettier': [
'error',
{},
{
usePrettierrc: true,
},
],
},
},
]
9 changes: 9 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
transformIgnorePatterns: ['<rootDir>/node_modules/'],
}
54 changes: 30 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,37 @@
"type": "module",
"scripts": {
"preinstall": "npx only-allow pnpm",
"prepare": "npx vite-envs update-types",
"prepare": "pnpm exec vite-envs update-types",
"dev": "nodemon server.js -w server.js",
"prod": "NODE_ENV=production node server.js",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0 --ignore-path ./.gitignore",
"lint:fix": "eslint ./src --ext .jsx,.js,.ts,.tsx --quiet --fix --ignore-path ./.gitignore",
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",
"lint:fix": "eslint ./src --quiet --fix",
"lint:format": "prettier --loglevel warn --write \"./**/*.{js,jsx,ts,tsx,css,md,json}\" ",
"tests": "pnpm jest",
"preview": "vite preview"
},
"dependencies": {
"@effect/platform": "^0.57.0",
"@effect/schema": "^0.67.22",
"@effect/typeclass": "^0.24.27",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.11.5",
"@effect/platform": "^0.70.7",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@mui/material": "^5.15.15",
"@statisticsnorway/ssb-component-library": "^2.0.99",
"@mui/material": "^5.16.11",
"@statisticsnorway/ssb-component-library": "^2.4.3",
"body-parser": "^1.20.2",
"dotenv": "^16.4.5",
"effect": "^3.3.1",
"dotenv": "^16.4.7",
"effect": "^3.11.8",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"express": "4.21.1",
"express-http-proxy": "^2.0.0",
"eslint-plugin-prettier": "^5.2.1",
"express": "4.21.2",
"express-http-proxy": "^2.1.1",
"http-status-codes": "^2.3.0",
"jsonwebtoken": "^9.0.2",
"jwks-rsa": "^3.1.0",
"lightship": "^9.0.3",
"memory-cache": "^0.2.0",
"nodemon": "^3.1.7",
"prettier": "^3.2.5",
"nodemon": "^3.1.9",
"prettier": "^3.4.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-feather": "^2.0.10",
Expand All @@ -46,16 +45,23 @@
"zustand": "^5.0.2"
},
"devDependencies": {
"@eslint/compat": "^1.2.4",
"@types/jest": "^29.5.14",
"@types/node": "^22.10.2",
"@types/react": "^18.3.2",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/parser": "^8.18.0",
"@vitejs/plugin-react-swc": "^3.6.0",
"eslint": "^8.57.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.12",
"typescript": "^5.6.3",
"eslint": "^9.16.0",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.16",
"globals": "^15.13.0",
"jest": "^29.7.0",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"typescript": "^5.7.2",
"vite": "^5.4.8",
"vite-envs": "^4.4.5"
"vite-envs": "^4.4.10"
}
}
Loading

0 comments on commit aa9348b

Please sign in to comment.