Compare commits

...

2 Commits

Author SHA1 Message Date
Nick Playfair
35c075e1b5 New ts-eslint config 2025-06-12 22:18:50 +01:00
Nick Playfair
9b836cc360 Remove old eslint files 2025-06-12 21:40:21 +01:00
6 changed files with 2076 additions and 22 deletions

View File

@ -1,2 +0,0 @@
node_modules/
dist/

View File

@ -1,18 +0,0 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
"no-console": "off"
}
}

17
eslint.config.mjs Normal file
View File

@ -0,0 +1,17 @@
// @ts-check
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
ignores: [
'dist/**',
'node_modules/**',
'webpack.dev.js',
'webpack.prod.js',
],
},
eslint.configs.recommended,
tseslint.configs.recommended,
);

2052
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,8 @@
"main": "bom2table.js",
"scripts": {
"serve": "webpack serve --config webpack.dev.js",
"build": "webpack --config webpack.prod.js"
"build": "webpack --config webpack.prod.js",
"lint": "eslint ."
},
"author": "nplayfair",
"license": "MIT",
@ -14,12 +15,15 @@
"htmlfy": "^0.7.5"
},
"devDependencies": {
"@eslint/js": "^9.28.0",
"@types/csvtojson": "^1.1.5",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^13.0.0",
"eslint": "^9.28.0",
"prettier": "^3.5.3",
"ts-loader": "^9.5.2",
"typescript": "^5.8.3",
"typescript-eslint": "^8.34.0",
"webpack": "^5.99.9",
"webpack-cli": "^6.0.1",
"webpack-dev-server": "^5.2.2"

View File

@ -1,5 +1,6 @@
import { csvConfig, rejectedParts } from './config';
const csv = require('csvtojson');
// const csv = require('csvtojson');
import csv from 'csvtojson';
export async function getBOM(csvBOM: string) {
const rawBOM = await csv(csvConfig).fromString(csvBOM);