From 8ff149f9fa3ed633dea227a355312e53217ba595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Wed, 18 Sep 2024 16:31:18 +0200 Subject: [PATCH] Use editorconfig-checker as a pre-commit --- .pre-commit-config.yaml | 11 +++++++++++ Makefile | 6 +----- package.json | 1 - 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fe1250ce7fd9..28efbca98471 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,6 +57,17 @@ repos: |\.prettierignore |examples/svg\.html )$ + - repo: https://github.com/editorconfig-checker/editorconfig-checker.python + rev: 3.0.3 + hooks: + - id: editorconfig-checker + args: + - -disable-indentation + - -disable-max-line-length + exclude: |- + (?x)^( + secrets\.tar\.enc + )$ - repo: https://github.com/shellcheck-py/shellcheck-py rev: v0.10.0.1 hooks: diff --git a/Makefile b/Makefile index ca9e25c4e021..fb80b2cf7b23 100644 --- a/Makefile +++ b/Makefile @@ -117,7 +117,7 @@ check-examples-checker: $(CHECK_EXAMPLE_CHECKER) check-examples: $(BUILD_EXAMPLES_CHECK_TIMESTAMP_FILES) .PHONY: lint -lint: .build/eslint.timestamp .build/eslint-ts.timestamp eclint lint-extra +lint: .build/eslint.timestamp .build/eslint-ts.timestamp lint-extra .PHONY: lint-extra lint-extra: @@ -127,10 +127,6 @@ lint-extra: .PHONY: eslint eslint: .build/eslint.timestamp .build/eslint-ts.timestamp -.PHONY: eclint -eclint: .build/node_modules.timestamp - npm run eclint - .PHONY: test test: .build/node_modules.timestamp .build/build-dll.timestamp TS_NODE_PROJECT=disable.json ./node_modules/karma/bin/karma start karma-conf.js --single-run diff --git a/package.json b/package.json index 19f0008688e7..51e605bc98db 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "build-gmf-examples": "TARGET=gmf-examples webpack --mode=development --progress", "build-gmf-apps": "TARGET=gmf-apps webpack --mode=development --progress", "build-api": "webpack --config buildtools/webpack.api.js --mode=production --progress", - "eclint": "editorconfig-checker -disable-indentation -disable-max-line-length --exclude secrets.tar.enc", "serve-ngeo-examples": "DEV_SERVER=1 TARGET=ngeo-examples webpack serve --open --server-type=https --server-options-cert=private.crt --server-options-key=private.key --port=3000 --mode=development --progress --watch", "serve-gmf-examples": "DEV_SERVER=1 TARGET=gmf-examples webpack serve --open --server-type=https --server-options-cert=private.crt --server-options-key=private.key --port=3000 --mode=development --progress --watch", "serve-gmf-apps": "DEV_SERVER=1 TARGET=gmf-apps webpack serve --open --server-type=https --server-options-cert=private.crt --server-options-key=private.key --port=3000 --mode=development --progress",