Skip to content

Commit

Permalink
Update dependencies and create DEPENDENCY-NOTES.md
Browse files Browse the repository at this point in the history
Dependencies are updated to their latest versions. In cases where they
are not being updated to their latest versions, add a note to
DEPENDENCY-NOTES.md explaining why it is not being updated.

Due to changes in the eslint dependency, create an eslint config file.
Remove the deprecated .eslintignore and .eslintrc files.

Update jest config to use transform property instead of deprecated
globals property. Create test/tsconfig.json to use with updated jest
config.

Update tsconfig to target ES2018 to satisfy updated typescript compiler.

Minor changes to usage of commander package in app.ts.

Other formatting and style changes in various typescript files in order
to satisfy latest eslint rules.
  • Loading branch information
mint-thompson committed Aug 27, 2024
1 parent 2b934de commit 5ef2322
Show file tree
Hide file tree
Showing 18 changed files with 2,848 additions and 3,856 deletions.
14 changes: 0 additions & 14 deletions .eslintignore

This file was deleted.

19 changes: 0 additions & 19 deletions .eslintrc

This file was deleted.

9 changes: 9 additions & 0 deletions DEPENDENCY-NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
As of 2024 August 22:

The `npm outdated` command reports the following dependencies as outdated.
They are not being updated at this time for the reasons given below:

- `@types/node`: don't update until Node 22 is LTS version (currently Node 20).
- `chalk`: major version 5 causes problems for jest. Keep updated to latest 4.x release.
- `flat`: major version 6 is an esmodule.
- `yaml`: changes to `Document.toString()` behavior makes the comments in the config file produced by `sushi init` move around a bunch.
52 changes: 52 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
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: [
'dist/*',
'coverage/*',
'build*/*',
'**/*.d.ts',
'src/public/',
'src/types/',
'**/generated'
]
},
...compat.extends('plugin:@typescript-eslint/recommended', 'prettier'),
{
languageOptions: {
parser: tsParser,
ecmaVersion: 2018,
sourceType: 'module'
},

rules: {
semi: ['error', 'always'],

quotes: [
'error',
'single',
{
avoidEscape: true
}
],

'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
}
}
];
11 changes: 7 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
module.exports = {
globals: {
'ts-jest': {
tsconfig: 'tsconfig.json'
}
transform: {
'^.+\\.(js|jsx|ts|tsx)$': [
'ts-jest',
{
tsconfig: '<rootDir>/test/tsconfig.json'
}
]
},
moduleFileExtensions: ['js', 'ts'],
testMatch: ['**/test/**/*.test.(ts|js)'],
Expand Down
Loading

0 comments on commit 5ef2322

Please sign in to comment.