Skip to content

Commit

Permalink
Merge pull request #574 from unicef/staging
Browse files Browse the repository at this point in the history
#Staging
  • Loading branch information
jualopez authored Jan 17, 2025
2 parents 0a87fb2 + 301ba57 commit 8854219
Show file tree
Hide file tree
Showing 20 changed files with 8,415 additions and 9,881 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
working_directory: ~/code
# The primary container is an instance of the first list image listed. Your build commands run in this container.
docker:
- image: node:14.21
- image: node:20.18.1
steps:
- checkout
- run:
Expand Down Expand Up @@ -36,7 +36,7 @@ jobs:
working_directory: ~/code
# The primary container is an instance of the first list image listed. Your build commands run in this container.
docker:
- image: node:14.21
- image: node:20.18.1
steps:
- checkout
- setup_remote_docker
Expand Down Expand Up @@ -91,3 +91,4 @@ workflows:
- master
- staging
- develop
- node_20.18.0_shoelace_2.18.0
82 changes: 0 additions & 82 deletions .eslintrc.json

This file was deleted.

7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FROM node:14.21-alpine3.16 as builder
FROM node:20.18.1-alpine3.19 AS builder
RUN apk update
RUN apk add --update bash

RUN apk add git
RUN npm config set unsafe-perm true
# RUN npm install -g --unsafe-perm polymer-cli
RUN npm install -g [email protected]

WORKDIR /tmp
Expand All @@ -21,14 +19,15 @@ RUN cp -a /tmp/node_modules /code/node_modules
WORKDIR /code
RUN npm run build

FROM node:14.21-alpine3.16
FROM node:20.18.1-alpine3.19
RUN apk update
RUN apk add --update bash

WORKDIR /code
RUN npm init -y
RUN npm install express
RUN npm install compression
RUN npm install ua-parser-js
RUN npm install [email protected]
COPY --from=builder /code/express.js /code/express.js
COPY --from=builder /code/src /code/src
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile-dev
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM node:14.21-alpine3.16
FROM node:20.18.1-alpine3.19
RUN apk update
RUN apk add --update bash

RUN apk add git
RUN npm install -g [email protected]

WORKDIR /code
CMD ["npm", "start"]
CMD ["sh", "-c", "npm start"]
110 changes: 110 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import lit from 'eslint-plugin-lit';
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 [
...compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:lit/recommended',
'plugin:prettier/recommended'
),
{
plugins: {
'@typescript-eslint': typescriptEslint,
lit,
prettier
},

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

parser: tsParser,
ecmaVersion: 2018,
sourceType: 'module'
},

rules: {
'prettier/prettier': 'error',
'lit/attribute-value-entities': 'off',
'lit/no-legacy-template-syntax': 'off',
'linebreak-style': 'off',

'no-irregular-whitespace': [
'error',
{
skipTemplates: true
}
],

'@typescript-eslint/no-object-literal-type-assertion': 'off',
'padded-blocks': 'off',
'brace-style': 'off',

'new-cap': [
'error',
{
capIsNewExceptions: ['GestureEventListeners'],
capIsNewExceptionPattern: '^Etools..|..Mixin$'
}
],

'no-var': 'off',
'require-jsdoc': 'off',
'valid-jsdoc': 'off',
'comma-dangle': ['error', 'never'],

'max-len': [
'error',
{
code: 120,
ignoreUrls: true
}
],

'prefer-promise-reject-errors': 'off',
camelcase: 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
'@typescript-eslint/no-use-before-define': [
'error',
{
functions: false,
classes: true,
variables: true
}
],

'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_'
}
]
}
}
];
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
<link rel="preload" as="style" crossorigin="anonymous" href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,700|Roboto:400,300,300italic,400italic,500,500italic,700,700italic&display=swap" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" crossorigin="anonymous" href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,700|Roboto:400,300,300italic,400italic,500,500italic,700,700italic&display=swap"></noscript>

<link rel="preload" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.5.2/dist/themes/light.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.5.2/dist/themes/light.css"></noscript>
<link rel="preload" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.18.0/dist/themes/light.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.18.0/dist/themes/light.css"></noscript>

<link rel="preload" href="node_modules/leaflet/dist/leaflet.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="node_modules/leaflet/dist/leaflet.css"></noscript>
Expand Down
Loading

0 comments on commit 8854219

Please sign in to comment.