Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

versatile-data-kit: git pre-commit hooks config #1625

Merged
merged 17 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitlint
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ contrib=contrib-body-requires-signed-off-by
# commit-msg title must be matched to.
# Note that the regex can contradict with other rules if not used correctly
# (e.g. title-must-not-contain-word).
regex=(vdk-.*|versatile-data-kit|control-service|examples): .*
regex=(vdk-.*|versatile-data-kit|control-service|examples|frontend): .*
30 changes: 30 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ repos:
# exclude helm chart templates
exclude: ^projects/control-service/projects/helm_charts
- id: check-json
exclude: (^projects/frontend/data-pipelines/gui/tsconfig.json|^projects/frontend/data-pipelines/gui/package-lock.json|^projects/frontend/data-pipelines/gui/projects/data-pipelines/.eslintrc.json|^projects/frontend/data-pipelines/gui/projects/data-pipelines/tsconfig.lib.prod.json|^projects/frontend/data-pipelines/gui/projects/data-pipelines/tsconfig.spec.json|^projects/frontend/data-pipelines/gui/projects/data-pipelines/tsconfig.lib.json|^projects/frontend/data-pipelines/gui/projects/ui/.eslintrc.json|^projects/frontend/data-pipelines/gui/projects/ui/tsconfig.app.json|^projects/frontend/data-pipelines/gui/projects/ui/tsconfig.spec.json)
- id: check-ast
exclude: ^projects/vdk-core/tests/functional/run/jobs/syntax-error-job/1_step.py
- id: check-added-large-files
exclude: (^projects/frontend/data-pipelines/gui/tsconfig.json|^projects/frontend/data-pipelines/gui/package-lock.json|^projects/frontend/data-pipelines/gui/projects/ui/src/assets/css/clr-ui.min.css)
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-executables-have-shebangs
Expand Down Expand Up @@ -76,6 +78,34 @@ repos:
- NOTICE.txt
- --comment-style
- /*| *| */
- id: insert-license
files: \.ts$
args:
- --license-filepath
- NOTICE.txt
- --comment-style
- /*| *| */
- id: insert-license
files: \.js$
args:
- --license-filepath
- NOTICE.txt
- --comment-style
- /*| *| */
- id: insert-license
files: \.html
args:
- --license-filepath
- NOTICE.txt
- --comment-style
- <!--| ~| -->
- id: insert-license
files: (\.scss$|\.css$)
args:
- --license-filepath
- NOTICE.txt
- --comment-style
- /*| *| */
- id: insert-license
files: \.py$
args:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2021 VMware, Inc.
* SPDX-License-Identifier: Apache-2.0
*/

module.exports = {
extends: [
'eslint:recommended',
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/*
* Copyright 2021 VMware, Inc.
* SPDX-License-Identifier: Apache-2.0
*/

module.exports = require('@jupyterlab/testutils/lib/babel.config');
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2021 VMware, Inc.
* SPDX-License-Identifier: Apache-2.0
*/

const jestJupyterLab = require('@jupyterlab/testutils/lib/jest-config');

const esModules = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2021 VMware, Inc.
* SPDX-License-Identifier: Apache-2.0
*/

/**
* Example of [Jest](https://jestjs.io/docs/getting-started) unit tests
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2021 VMware, Inc.
* SPDX-License-Identifier: Apache-2.0
*/

import { URLExt } from '@jupyterlab/coreutils';

import { ServerConnection } from '@jupyterlab/services';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2021 VMware, Inc.
* SPDX-License-Identifier: Apache-2.0
*/

import {
JupyterFrontEnd,
JupyterFrontEndPlugin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2021 VMware, Inc.
* SPDX-License-Identifier: Apache-2.0
*/

import { requestAPI } from './handler';
import { Dialog, showErrorMessage } from '@jupyterlab/apputils';
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@


/*
* Copyright 2021 VMware, Inc.
* SPDX-License-Identifier: Apache-2.0
*/

export function removeCreateJobDataFromSessionStorage(){
sessionStorage.removeItem('create-job-name');
sessionStorage.removeItem('create-job-team');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2021 VMware, Inc.
* SPDX-License-Identifier: Apache-2.0
*/

/*
See the JupyterLab Developer Guide for useful CSS Patterns:

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/*
* Copyright 2021 VMware, Inc.
* SPDX-License-Identifier: Apache-2.0
*/

@import url('base.css');
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/*
* Copyright 2021 VMware, Inc.
* SPDX-License-Identifier: Apache-2.0
*/

import './base.css';
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2021 VMware, Inc.
* SPDX-License-Identifier: Apache-2.0
*/

.jp-vdk-input-wrapper {
display: flex;
flex-direction: column;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2021 VMware, Inc.
* SPDX-License-Identifier: Apache-2.0
*/

/**
* Configuration for Playwright using default from @jupyterlab/galata
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* Copyright 2021 VMware, Inc.
* SPDX-License-Identifier: Apache-2.0
*/

import { expect, test } from '@jupyterlab/galata';
import { assert } from 'console';

Expand Down