Skip to content

Commit 4795197

Browse files
bourdakos1lresende
authored andcommitted
Enforce license headers via lint rule
1 parent 8226f88 commit 4795197

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+557
-46
lines changed

.eslintrc.js

+39-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,48 @@
1+
/*
2+
* Copyright 2018-2021 Elyra Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
const allExtensions = [".ts", ".tsx", ".d.ts", ".js", ".jsx"];
218

319
module.exports = {
420
root: true,
521
extends: "react-app",
6-
plugins: ["import"],
22+
plugins: ["import", "header"],
723
rules: {
24+
"header/header": [
25+
"warn",
26+
"block",
27+
[
28+
"",
29+
" * Copyright 2018-2021 Elyra Authors",
30+
" *",
31+
' * Licensed under the Apache License, Version 2.0 (the "License");',
32+
" * you may not use this file except in compliance with the License.",
33+
" * You may obtain a copy of the License at",
34+
" *",
35+
" * http://www.apache.org/licenses/LICENSE-2.0",
36+
" *",
37+
" * Unless required by applicable law or agreed to in writing, software",
38+
' * distributed under the License is distributed on an "AS IS" BASIS,',
39+
" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
40+
" * See the License for the specific language governing permissions and",
41+
" * limitations under the License.",
42+
" ",
43+
],
44+
2,
45+
],
846
"import/newline-after-import": ["warn", { count: 1 }],
947
"import/no-extraneous-dependencies": [
1048
"warn",

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# production
22
dist
3+
build
34

45
# dependencies
56
node_modules

.prettierrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{}
1+
{}

.vscode/launch.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
}
1313
}
1414
]
15-
}
15+
}

Makefile

+9-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,12 @@ watch:
1919

2020
.PHONY: start
2121
start:
22-
FORCE_COLOR=true yarn lerna run start --scope demo --stream
22+
FORCE_COLOR=true yarn lerna run start --scope demo --stream
23+
24+
.PHONY: fix
25+
fix:
26+
yarn eslint . --fix --ignore-path .gitignore --ext .ts,.tsx
27+
28+
.PHONY: lint
29+
lint:
30+
yarn eslint . --ignore-path .gitignore --ext .ts,.tsx

lerna.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
{
2-
"packages": [
3-
"packages/*"
4-
],
2+
"packages": ["packages/*"],
53
"npmClient": "yarn",
64
"useWorkspaces": true,
75
"version": "0.0.0"

package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"eslint": "^7.11.0",
4444
"eslint-config-react-app": "^6.0.0",
4545
"eslint-plugin-flowtype": "^5.2.0",
46+
"eslint-plugin-header": "^3.1.0",
4647
"eslint-plugin-import": "^2.22.1",
4748
"eslint-plugin-jest": "^24.1.0",
4849
"eslint-plugin-jsx-a11y": "^6.3.1",
@@ -60,9 +61,9 @@
6061
}
6162
},
6263
"lint-staged": {
63-
"*.{tsx,ts,js,md,css,html}": [
64+
"*.{tsx,ts,js,md,css,html,json}": [
6465
"prettier --write",
6566
"git add"
6667
]
6768
}
68-
}
69+
}

packages/demo/.gitignore

-23
This file was deleted.

packages/demo/src/GitHub/index.tsx

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2018-2021 Elyra Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
import { useEffect } from "react";
218

319
import { PipelineEditor } from "@elyra/pipeline-editor";

packages/demo/src/Jupyter/index.tsx

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2018-2021 Elyra Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
import { useEffect } from "react";
218

319
import { PipelineEditor } from "@elyra/pipeline-editor";

packages/demo/src/VSCode/index.tsx

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2018-2021 Elyra Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
import { useEffect } from "react";
218

319
import { PipelineEditor } from "@elyra/pipeline-editor";

packages/demo/src/index.tsx

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2018-2021 Elyra Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
import React from "react";
218
import ReactDOM from "react-dom";
319

packages/demo/src/nodes/index.ts

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2018-2021 Elyra Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
import notebook from "./notebook";
218
import python from "./python";
319
import wmlDeploy from "./wml-deploy";

packages/demo/src/nodes/notebook.ts

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2018-2021 Elyra Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
const jupyterSVG = `
218
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300">
319
<g transform="translate(-1638,-1844)">

packages/demo/src/nodes/python.ts

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2018-2021 Elyra Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
const pythonSVG = `
218
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
319
<g transform="translate(-1.5418e-7 -.00046865)">

packages/demo/src/nodes/wml-deploy.ts

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2018-2021 Elyra Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
const wmlSVG = `
218
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-4 -4 40 40" fill="#8a3ffc">
319
<path d="M22,26H20V17.76l-3.23,3.88a1,1,0,0,1-1.54,0L12,17.76V26H10V15a1,1,0,0,1,.66-.94,1,1,0,0,1,1.11.3L16,19.44l4.23-5.08a1,1,0,0,1,1.11-.3A1,1,0,0,1,22,15Z" />

packages/demo/src/pipeline.ts

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2018-2021 Elyra Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
const pipeline = {
218
doc_type: "pipeline",
319
version: "3.0",

packages/demo/src/react-app-env.d.ts

+16
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1+
/*
2+
* Copyright 2018-2021 Elyra Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
/// <reference types="react-scripts" />

packages/demo/tsconfig.json

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"lib": [
5-
"dom",
6-
"dom.iterable",
7-
"esnext"
8-
],
4+
"lib": ["dom", "dom.iterable", "esnext"],
95
"allowJs": true,
106
"skipLibCheck": true,
117
"esModuleInterop": true,
@@ -20,7 +16,5 @@
2016
"noEmit": true,
2117
"jsx": "react-jsx"
2218
},
23-
"include": [
24-
"src"
25-
]
19+
"include": ["src"]
2620
}

packages/pipeline-editor/src/CustomFormControls/BooleanControl.tsx

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2018-2021 Elyra Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
import React, { useState } from "react";
218

319
interface Props {

packages/pipeline-editor/src/CustomFormControls/StringArrayControl.tsx

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2018-2021 Elyra Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
export class StringArrayControl {
218
parameter: string;
319
controller: any;

0 commit comments

Comments
 (0)