Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade rollup, typescript, prettier, eslint, node dependencies #268

Merged
merged 7 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,17 @@ module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
extends: [
'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin
'prettier/@typescript-eslint', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
],
parserOptions: {
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/no-explicit-any': 'always',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/prefer-interface': 'off',
'@typescript-eslint/member-delimiter-style': {
delimiter: 'none',
requireLast: true,
},
'@typescript-eslint/ban-types': 'off',
'prefer-const': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
},
};
4 changes: 2 additions & 2 deletions .github/workflows/on_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ jobs:

strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
node-version: [18]

steps:
- uses: actions/checkout@v1

- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
- uses: actions/checkout@v1

- name: Use Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: '12'
node-version: 18

- name: Install packages
if: success() && startsWith(github.ref, 'refs/tags/v')
Expand Down
14 changes: 7 additions & 7 deletions example/node/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require('dotenv').config({ path: '../../.env' });
(await import('dotenv')).config({ path: '../../.env' });

const {
import {
LayersFactory,
WmsLayer,
S1GRDAWSEULayer,
Expand All @@ -15,7 +15,7 @@ const {
setDebugEnabled,
CancelToken,
isCancelled,
} = require('../../dist/sentinelHub.cjs');
} from '../../dist/sentinelHub.esm.js';

function printOut(title, value) {
console.log(`\n${'='.repeat(10)}\n${title}`, JSON.stringify(value, null, 4));
Expand Down Expand Up @@ -75,9 +75,9 @@ async function run() {
// get the list of all of the layers:
const layers = await LayersFactory.makeLayers(baseUrl);
printOut(`Layers:`, layers);
const layersIds = layers.map(l => l.layerId);
const layersTitles = layers.map(l => l.title);
const layersDescriptions = layers.map(l => l.description);
const layersIds = layers.map((l) => l.layerId);
const layersTitles = layers.map((l) => l.title);
const layersDescriptions = layers.map((l) => l.description);
printOut(`Layers ids:`, layersIds);
printOut(`Layers titles:`, layersTitles);
printOut(`Layers descriptions:`, layersDescriptions);
Expand Down Expand Up @@ -212,7 +212,7 @@ run()
.then(() => {
console.log('Done.');
})
.catch(ex => {
.catch((ex) => {
console.error(ex);
process.exit(1);
});
Loading