Skip to content

Commit

Permalink
chore: configuration cleanups after migration to eslint flat config
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
  • Loading branch information
jerome-benoit committed Jul 15, 2024
1 parent 374d650 commit f3c5c4c
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 15 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,10 @@ jobs:
- name: pnpm audit
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '20.x' }}
run: pnpm audit --prod
- name: pnpm lint
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '20.x' }}
run: pnpm lint
# TODO: needs flat config support in vue.js eslint plugins
# - name: pnpm lint
# if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == '20.x' }}
# run: pnpm lint
- name: pnpm build
run: pnpm build
- name: pnpm test
Expand Down
3 changes: 2 additions & 1 deletion .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export default {
'{src,tests}/**/*.{ts,tsx,cts,mts}': [
/* 'prettier --cache --write', 'eslint --cache --fix' */
// 'prettier --cache --write',
'eslint --cache --fix',
],
'**/*.{json,md,yml,yaml}': ['prettier --cache --write'],
'**/*.{js,jsx,cjs,mjs}': ['prettier --cache --write', 'eslint --cache --fix'],
Expand Down
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default defineFlatConfig([
},
{
files: [
'src/charging-station/Bootstrap.ts',
'src/charging-station/ChargingStation.ts',
'src/charging-station/ocpp/OCPPServiceUtils.ts',
'src/charging-station/ocpp/1.6/OCPP16ResponseService.ts',
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
"lint": "cross-env TIMING=1 eslint --cache src tests ./*.js ./*.ts",
"lint:fix": "cross-env TIMING=1 eslint --cache --fix src tests ./*.js ./*.ts",
"format": "prettier --cache --write .; eslint --cache --fix src tests ./*.js ./*.ts",
"prettier": "prettier --cache --write .",
"test": "glob -c \"c8 node --import tsx --test\" \"tests/**/*.test.ts\"",
"test:debug": "glob -c \"node --import tsx --test --inspect\" \"tests/**/*.test.ts\"",
"coverage": "c8 report --reporter=lcov",
Expand Down
32 changes: 25 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion src/types/ocpp/Requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ export type ResponseCallback = (payload: JsonType, requestPayload: JsonType) =>

export type ErrorCallback = (ocppError: OCPPError, requestStatistic?: boolean) => void

export type CachedRequest = [ResponseCallback, ErrorCallback, RequestCommand, JsonType]
export type CachedRequest = [
ResponseCallback,
ErrorCallback,
RequestCommand | IncomingRequestCommand,
JsonType
]

export const MessageTrigger = {
...OCPP16MessageTrigger,
Expand Down
3 changes: 1 addition & 2 deletions ui/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
"@tsconfig/node20": "^20.1.4",
"@types/jsdom": "^21.1.7",
"@types/node": "^20.14.10",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0",
"@vitejs/plugin-vue": "^5.0.5",
"@vitejs/plugin-vue-jsx": "^4.0.0",
"@vitest/coverage-v8": "^2.0.3",
Expand All @@ -58,6 +56,7 @@
"prettier": "^3.3.3",
"rimraf": "^6.0.1",
"typescript": "~5.5.3",
"typescript-eslint": "^7.16.0",
"vite": "^5.3.3",
"vitest": "^2.0.3"
}
Expand Down

0 comments on commit f3c5c4c

Please sign in to comment.