Skip to content

Commit

Permalink
Update deps and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
raub committed Jun 2, 2024
1 parent bac2ec1 commit 6b47ff6
Show file tree
Hide file tree
Showing 15 changed files with 785 additions and 735 deletions.
76 changes: 0 additions & 76 deletions .eslintrc.json

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ jobs:
Eslint:
strategy:
matrix:
os: [ubuntu-20.04]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}

steps:

- name: Fetch Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.16.0
node-version: 20.14.0
cache: 'npm'

- name: Install Modules
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
steps:

- name: Fetch Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.16.0
node-version: 20.14.0
cache: 'npm'

- name: Get Package Version
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ jobs:
Test:
strategy:
matrix:
os: [ubuntu-20.04]
os: [ubuntu-22.04]

runs-on: ${{ matrix.os }}

steps:

- name: Fetch Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.16.0
node-version: 20.14.0
cache: 'npm'

- name: Install Modules
run: npm ci

- name: Run Unit Tests
if: matrix.os == 'ubuntu-20.04'
if: matrix.os == 'ubuntu-22.04'
run: xvfb-run --auto-servernum npm run test-ci
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Luis Blanco
Copyright (c) 2024 Luis Blanco

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
101 changes: 101 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
'use strict';

const js = require('@eslint/js');


module.exports = [
{
ignores: ['examples/clouds']
},
js.configs.recommended,
{
languageOptions: {
'parserOptions': {
'ecmaVersion': 2022,
sourceType: 'commonjs'
},
globals: {
global: 'readonly',
require: 'readonly',
Buffer: 'readonly',
module: 'readonly',
console: 'readonly',
__dirname: 'readonly',
process: 'readonly',
setTimeout: 'readonly',
setImmediate: 'readonly',
clearImmediate: 'readonly',
URL: 'readonly',
},
},
'rules': {
'arrow-parens': ['error', 'always'],
'no-trailing-spaces': [
'error',
{
'skipBlankLines': true
}
],
'indent': [
'error',
'tab',
{
'SwitchCase': 1
}
],
'operator-linebreak': [
'error',
'after',
{
'overrides': {
'?': 'before',
':': 'before'
}
}
],
'max-len': ['error', 110],
'quotes': [
'error',
'single'
],
'semi': [
'error',
'always'
],
'no-multiple-empty-lines': ['error', { 'max': 3, 'maxEOF': 1, 'maxBOF': 1 }],
'keyword-spacing': ['error', { 'before': true, 'after': true }],
'space-before-blocks': ['error'],
'space-before-function-paren': [
'error', {'anonymous': 'always', 'named': 'never', 'asyncArrow': 'always'}
],
'camelcase': ['error'],
'no-tabs': [0],
'no-unused-vars': [
'error',
{
'argsIgnorePattern': '^_',
'varsIgnorePattern': '^_',
'caughtErrorsIgnorePattern': '^_'
}
],
'global-require': [0],
'no-underscore-dangle': [0],
'no-plusplus': [0],
'no-shadow': [0],
'node/no-unpublished-require': [0],
'no-process-exit': [0],
'linebreak-style': [0],
'node/no-missing-require': [0],
'no-console': [0],
'node/no-unsupported-features/es-builtins': 0,
'node/no-unsupported-features/node-builtins': 0,
'func-names': [
'error',
'never',
{
'generators': 'never'
}
]
}
},
];
1 change: 1 addition & 0 deletions examples/palette/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const {
const icon = new Image(__dirname + '/textures/icon.png');
icon.on('load', () => { doc.icon = icon; });
doc.title = 'Palette Swap';
doc.getRootNode = () => doc;

(async () => {
const THREE = await import('three');
Expand Down
2 changes: 1 addition & 1 deletion examples/palette/utils/DRACOLoader.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ function DRACOWorker() {

let decoderConfig;
let decoderPending;
// eslint-disable-next-line no-undef

const { parentPort } = require('worker_threads');
global.self = global;
global.globalThis = global;
Expand Down
Loading

0 comments on commit 6b47ff6

Please sign in to comment.