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

build: update typescript and its friend to 5.1 #271

Merged
merged 18 commits into from
Dec 6, 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
7 changes: 6 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// @ts-check
'use strict';

const path = require('path');
Expand All @@ -7,6 +8,7 @@ const path = require('path');
const rulesDirPlugin = require('eslint-plugin-rulesdir');
rulesDirPlugin.RULES_DIR = path.join(__dirname, 'eslint');

/** @type {import('eslint').Linter.Config} */
const settings = {
'env': {
'browser': true,
Expand Down Expand Up @@ -34,9 +36,11 @@ const settings = {
'parser': '@typescript-eslint/parser',
'parserOptions': {
'ecmaVersion': 2022,
'project': ['./tsconfig.eslint.json'],
'sourceType': 'module',
},
'plugins': [
'@typescript-eslint',
'deprecation',
'import',
'rulesdir',
Expand Down Expand Up @@ -209,7 +213,7 @@ const tsOverrides = {
'files': ['*.ts'],
'parser': '@typescript-eslint/parser',
'parserOptions': {
'project': ['./tsconfig.json'],
'project': ['./tsconfig.eslint.json'],
'tsconfigRootDir': __dirname,
},
'plugins': ['@typescript-eslint', 'prefer-arrow', 'unicorn'],
Expand Down Expand Up @@ -264,6 +268,7 @@ const overrides = [
{
'files': ['*.cjs'],
'parserOptions': {
...settings.parserOptions,
'sourceType': 'script',
},
},
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/npm-package.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async function main() {
fs.rmSync('dist', { recursive: true, force: true });
fs.mkdirSync('npm-package');

await exec('npx ttsc --declaration');
await exec('npx tsc --declaration');
fs.renameSync('dist/ui', 'npm-package/ui');
fsExtra.copySync('types', 'npm-package/types', {});
fs.renameSync('dist/resources', 'npm-package/resources');
Expand Down
17 changes: 9 additions & 8 deletions .mocharc.cjs
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
'use strict';

module.exports = {
recursive: true,
colors: true,
reporter: 'progress',
exclude: [
'recursive': true,
'colors': true,
'reporter': 'progress',
'exclude': [
// Run via test_data_files.js.
'test/helper/*',
],
loader: [
'ts-node/esm',
'node-option': [
'experimental-specifier-resolution=node',
'loader=ts-node/esm',
],
extension: [
'extension': [
'.js',
'.cjs',
'.mjs',
Expand All @@ -20,5 +21,5 @@ module.exports = {
],
// The default 2000ms timeout for mocha sometimes doesn't work for larger trigger files.
// TODO: probably we should make tests faster??
timeout: 5000,
'timeout': 5000,
};
Loading
Loading