Skip to content

Commit

Permalink
Use eslint-plugin-header for license headers (#245)
Browse files Browse the repository at this point in the history
* Configure eslint-plugin-header for license headers

* Add missing license file headers
  • Loading branch information
swissspidy authored Feb 7, 2020
1 parent 9584a79 commit a9b7eca
Show file tree
Hide file tree
Showing 13 changed files with 188 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"plugin:prettier/recommended",
"prettier/react"
],
"plugins": ["jsx-a11y"],
"plugins": ["jsx-a11y", "header"],
"rules": {
"block-scoped-var": "error",
"complexity": ["error", {"max": 20}],
Expand All @@ -25,6 +25,26 @@
"no-new": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"header/header": [ "error", "block", [
"",
{
"pattern": " \\* Copyright \\d{4} Google LLC",
"template": " * Copyright 2020 Google LLC"
},
" *",
" * Licensed under the Apache License, Version 2.0 (the \"License\");",
" * you may not use this file except in compliance with the License.",
" * You may obtain a copy of the License at",
" *",
" * https://www.apache.org/licenses/LICENSE-2.0",
" *",
" * Unless required by applicable law or agreed to in writing, software",
" * distributed under the License is distributed on an \"AS IS\" BASIS,",
" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
" * See the License for the specific language governing permissions and",
" * limitations under the License.",
" "
] ],
"import/no-restricted-paths": [ "error", {
"zones": [ {
"target": "./assets/src/edit-story/migration/migrations",
Expand Down
16 changes: 16 additions & 0 deletions assets/src/edit-story/components/panels/background.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* External dependencies
*/
Expand Down
16 changes: 16 additions & 0 deletions assets/src/edit-story/components/panels/videoPoster.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* External dependencies
*/
Expand Down
16 changes: 16 additions & 0 deletions assets/src/edit-story/types.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* External dependencies
*/
Expand Down
16 changes: 16 additions & 0 deletions assets/src/edit-story/units/dimensions.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* Internal dependencies
*/
Expand Down
16 changes: 16 additions & 0 deletions assets/src/edit-story/units/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

export { default as UnitsProvider } from './unitsProvider';
export { default as useUnits } from './useUnits';
export {
Expand Down
16 changes: 16 additions & 0 deletions assets/src/edit-story/units/unitsProvider.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* WordPress dependencies
*/
Expand Down
16 changes: 16 additions & 0 deletions assets/src/edit-story/units/useUnits.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* WordPress dependencies
*/
Expand Down
16 changes: 16 additions & 0 deletions assets/src/edit-story/utils/getFirstFrameOfVideo.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* Returns an image of the first frame of a given video.
*
Expand Down
16 changes: 16 additions & 0 deletions assets/src/edit-story/utils/useResizeEffect.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* External dependencies
*/
Expand Down
16 changes: 16 additions & 0 deletions assets/src/edit-story/utils/useUploadVideoFrame.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/**
* WordPress dependencies
*/
Expand Down
6 changes: 6 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-eslint-comments": "^3.1.2",
"eslint-plugin-header": "^3.0.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jest": "^23.6.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
Expand Down

0 comments on commit a9b7eca

Please sign in to comment.