Skip to content

Commit

Permalink
Merge pull request #747 from unicef/node_20.18.0_shoelace_2.18.0
Browse files Browse the repository at this point in the history
Node 20.18.0 shoelace 2.18.0
  • Loading branch information
danNordlogic authored Jan 9, 2025
2 parents 98ffee8 + e10c481 commit ba851e2
Show file tree
Hide file tree
Showing 16 changed files with 6,538 additions and 5,100 deletions.
5 changes: 3 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
# The primary container is an instance of the first list image listed. Your build commands run in this container.
docker:
# - image: robertavram/etools-dash-base:tst
- image: node:14.21
- image: node:20.18.1
steps:
- checkout
- restore_cache:
Expand All @@ -29,7 +29,7 @@ jobs:
# The primary container is an instance of the first list image listed. Your build commands run in this container.
docker:
# - image: robertavram/etools-dash-base:tst
- image: node:14.21
- image: node:20.18.1
steps:
- checkout
- setup_remote_docker:
Expand Down Expand Up @@ -81,3 +81,4 @@ workflows:
- staging
- develop
- sh-migration
- node_20.18.0_shoelace_2.18.0
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

87 changes: 0 additions & 87 deletions .eslintrc.json

This file was deleted.

11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
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 [email protected]


WORKDIR /tmp
ADD package.json /tmp/
ADD package-lock.json /tmp/
Expand All @@ -17,18 +15,19 @@ ADD . /code/
WORKDIR /code
RUN rm -rf node_modules
RUN cp -a /tmp/node_modules /code/node_modules
ENV NODE_OPTIONS --max_old_space_size=4096
RUN npm run build

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
5 changes: 2 additions & 3 deletions Dockerfile-dev
Original file line number Diff line number Diff line change
@@ -1,10 +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 --unsafe-perm polymer-cli
RUN npm install -g [email protected]

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

languageOptions: {
globals: {
...globals.browser,
...globals.node,
dayjs: true,
Promise: true,
Polymer: true,
EtoolsPmpApp: true,
EtoolsRequestCacheDb: true,
ShadyCSS: true,
Set: true
},

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

rules: {
'lit-a11y/anchor-is-valid': 'off',
'lit-a11y/click-events-have-key-events': 'off',
'lit-a11y/no-autofocus': 'warn',
'lit-a11y/aria-attrs': 'warn',
'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': 'off',
'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 @@ -61,8 +61,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="assets/css/app-theme.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="assets/css/app-theme.css"></noscript>

Expand Down
Loading

0 comments on commit ba851e2

Please sign in to comment.