Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
UrielCh committed Jun 11, 2024
1 parent 6ad4ff2 commit da3b05a
Show file tree
Hide file tree
Showing 28 changed files with 1,397 additions and 4,782 deletions.
26 changes: 0 additions & 26 deletions .eslintrc

This file was deleted.

18 changes: 5 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
opencv
node_modules
opencv-*/
lib/
.pnpm-debug.log
dist/esm/*.js
dist/esm/*.ts
dist/esm/*.map
dist/cjs/*.js
dist/cjs/*.ts
dist/cjs/*.map
latest
dist/esm/helper
dist/cjs/helper
dist/types/
*log
esm/src
cjs/src
types
*.tgz
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## V 1.0.0

- new project configuration as ESM by default
- new eslint configuration

## V 0.9.3

- export .d.ts file twice, to avoid ESM / CJS warnings
Expand Down
2 changes: 1 addition & 1 deletion bin/main.js → bin/main.cjs
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node
const OpenCVBuilder = require("../dist/cjs/OpenCVBuilder.js");
const OpenCVBuilder = require("../cjs/src/OpenCVBuilder.js");
const builder = new OpenCVBuilder.OpenCVBuilder(process.argv);
void builder.install();
2 changes: 1 addition & 1 deletion bin/main.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env node
import { OpenCVBuilder } from "../dist/esm/OpenCVBuilder.js";
import { OpenCVBuilder } from "../esm/src/OpenCVBuilder.js";
void new OpenCVBuilder(process.argv).install();
2 changes: 1 addition & 1 deletion bin/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node
import * as OpenCVBuilder from "../src/OpenCVBuilder";
import * as OpenCVBuilder from "../src/OpenCVBuilder.ts";
//= require("../dist/cjs/OpenCVBuilder.js");
const builder = new OpenCVBuilder.OpenCVBuilder(process.argv);
void builder.install();
File renamed without changes.
36 changes: 36 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// @ts-check
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
ignores: [
"test/**/*.ts",
"**/*.js",
"types/**/*.d.ts",
"src/lib/meta.ts",
],
}
,
{"rules": {
"linebreak-style": 0,
"comma-dangle": ["error", "always-multiline"],
"no-plusplus": "off",
"import/no-unresolved": 0,
"import/extensions": 0,
"import/no-extraneous-dependencies": 0,
"no-async-promise-executor": 0,
"radix": 1,
"no-undef": 0,
"no-case-declarations": 0,
// unit tests only
// "max-len" : 0,
// "no-new" : 0,
// "no-unused-expressions": 0,
// "prefer-spread": 0,
// "@typescript-eslint/ban-ts-comment": 0,
// "@typescript-eslint/no-explicit-any": 0
}},
);
File renamed without changes.

0 comments on commit da3b05a

Please sign in to comment.