Skip to content

Commit

Permalink
Update engineering toolchain (#458)
Browse files Browse the repository at this point in the history
* Move prettierrc to package.json

* Update submodule

* Update eslint and esbuild

- No need to lint the build
- Update eslint@9, [email protected], @typescript-eslint/*@8

* Update license.txt

* update thqby copyright year

* Cleanup eslint v9 usage

* Fix some lint

* Fix ESLint errors

* Fixup misc issues (tests still failing)

* re-lint files

* Fix test name typo

* Fix matchAll

* Fixup npm scripts

Use package.json conventions

https://eslint.org/docs/latest/contribute/package-json-conventions

* Use Node 22

* Cleanup npm scripts

* Remove prebuild

only 1 file in folder

* Update npm scripts a bit
  • Loading branch information
mark-wiemer authored Aug 18, 2024
1 parent 0762124 commit f95384c
Show file tree
Hide file tree
Showing 35 changed files with 2,967 additions and 1,631 deletions.
18 changes: 0 additions & 18 deletions .eslintrc

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.idea/
.@vscode/test-electron/
.vscode-test/
dist
node_modules
out

Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.idea/
.@vscode/test-electron/
.vscode-test/
dist
node_modules
out
src/ahk2
Expand Down
7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

12 changes: 5 additions & 7 deletions build.js → build.mjs
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
const { build } = require('esbuild');
const eslint = require('esbuild-plugin-eslint');
/* eslint-disable no-undef */
import { build } from 'esbuild';
const isProd = process.argv.indexOf('--mode=production') >= 0;

build({
entryPoints: ['./src/extension.ts'],
bundle: true,
outfile: 'out/extension.js',
outfile: 'dist/extension.js',
external: ['vscode'],
format: 'cjs',
platform: 'node',
// logLevel: 'error',
metafile: true,
// sourceRoot: __dirname+"/src",
minify: isProd,
watch: !isProd,
sourcemap: !isProd,
plugins: [
eslint(),
{
name: 'build notice',
setup(build) {
build.onStart(() => {
console.log('build start');
console.log('Build start');
});
build.onEnd(() => {
console.log('build success');
console.log('Build success');
});
},
},
Expand Down
10 changes: 10 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
ignores: ['out', 'dist', '**/*.d.ts', 'src/ahk2'],
},
);
5 changes: 3 additions & 2 deletions license.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Copyright 2020-2024 [Mark Wiemer](https://github.com/mark-wiemer).
Portions copyright 2019-2022 [Weijan Chen](https://github.com/cweijan),
2020-2023 [thqby](https://github.com/thqby),
2020-2024 [thqby](https://github.com/thqby),
2022-2023 [Lexikos](https://github.com/Lexikos).

Unless otherwise indicated, all content is licensed under MIT.
Portions licensed under GNU GPLv3.
Files licensed under GNU GPLv3 are marked as such at the top of the file.
Files under src/ahk2 are licensed under GNU GPLv3.
Other files licensed under GNU GPLv3 are marked as such at the top of the file.

MIT License

Expand Down
Loading

0 comments on commit f95384c

Please sign in to comment.