From 55a6e891c8d7f19dc9841bf097e66df2f00d0d5f Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Fri, 6 Jul 2018 21:47:04 +0200 Subject: Add license notice to all missing files --- .eslintrc | 6 +++++- .licence-template | 20 ++++++++++++++++++++ package-lock.json | 20 ++++++++++++++++++++ package.json | 1 + src/client/react/App.js | 20 ++++++++++++++++++++ src/client/react/AppRouter.js | 20 ++++++++++++++++++++ .../react/components/presentational/WeekDisplay.js | 20 ++++++++++++++++++++ src/client/react/lib/getSearchResults.js | 20 ++++++++++++++++++++ src/client/react/lib/rejectIfBadStatus.js | 20 ++++++++++++++++++++ src/client/react/lib/withinRange.js | 20 ++++++++++++++++++++ src/client/react/lib/withinRange.test.js | 20 ++++++++++++++++++++ src/client/react/store/actions.js | 20 ++++++++++++++++++++ src/client/react/store/selectors.js | 20 ++++++++++++++++++++ src/server/lib/schools/hetmml/parseSchedule.js | 20 ++++++++++++++++++++ webpack.config.js | 20 ++++++++++++++++++++ 15 files changed, 266 insertions(+), 1 deletion(-) create mode 100644 .licence-template diff --git a/.eslintrc b/.eslintrc index dab636c..36ded27 100644 --- a/.eslintrc +++ b/.eslintrc @@ -6,12 +6,16 @@ "node": true, "jest": true }, + "plugins":["notice"], "rules": { "react/jsx-filename-extension": "off", "no-underscore-dangle": ["error", { "allow": ["_test", "__REDUX_DEVTOOLS_EXTENSION_COMPOSE__"] }], "no-prototype-builtins": "off", "react/forbid-prop-types": "off", "react/prefer-stateless-function": "off", - "import/prefer-default-export": "off" + "import/prefer-default-export": "off", + "notice/notice":["error", { + "templateFile": ".licence-template" + }] } } diff --git a/.licence-template b/.licence-template new file mode 100644 index 0000000..f8e8582 --- /dev/null +++ b/.licence-template @@ -0,0 +1,20 @@ +/** + * Copyright (C) 2018 Noah Loomans + * + * This file is part of rooster.hetmml.nl. + * + * rooster.hetmml.nl is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * rooster.hetmml.nl is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with rooster.hetmml.nl. If not, see . + * + */ + diff --git a/package-lock.json b/package-lock.json index 06c9573..471a426 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3879,6 +3879,16 @@ "jsx-ast-utils": "2.0.1" } }, + "eslint-plugin-notice": { + "version": "0.7.7", + "resolved": "https://registry.npmjs.org/eslint-plugin-notice/-/eslint-plugin-notice-0.7.7.tgz", + "integrity": "sha512-kHVNObyW2QPEqunQyZiV9loKRV04IuDv096rtYJSziyDASOSPcjl2eLibQdw8BFNbb/DNZj3obN8iMAeydL2hg==", + "requires": { + "find-root": "1.1.0", + "lodash": "4.17.10", + "metric-lcs": "0.1.2" + } + }, "eslint-plugin-react": { "version": "7.10.0", "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.10.0.tgz", @@ -4510,6 +4520,11 @@ "pkg-dir": "2.0.0" } }, + "find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==" + }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", @@ -7218,6 +7233,11 @@ "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, + "metric-lcs": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/metric-lcs/-/metric-lcs-0.1.2.tgz", + "integrity": "sha512-+TZ5dUDPKPJaU/rscTzxyN8ZkX7eAVLAiQU/e+YINleXPv03SCmJShaMT1If1liTH8OcmWXZs0CmzCBRBLcMpA==" + }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", diff --git a/package.json b/package.json index d46178f..5b751f4 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "compression": "^1.6.2", "connected-react-router": "^4.3.0", "dompurify": "^1.0.3", + "eslint-plugin-notice": "^0.7.7", "express": "^4.16.3", "express-handlebars": "^3.0.0", "fuzzy-search": "^2.0.1", diff --git a/src/client/react/App.js b/src/client/react/App.js index f4cb848..d79b653 100644 --- a/src/client/react/App.js +++ b/src/client/react/App.js @@ -1,3 +1,23 @@ +/** + * Copyright (C) 2018 Noah Loomans + * + * This file is part of rooster.hetmml.nl. + * + * rooster.hetmml.nl is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * rooster.hetmml.nl is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with rooster.hetmml.nl. If not, see . + * + */ + import React from 'react'; import PropTypes from 'prop-types'; diff --git a/src/client/react/AppRouter.js b/src/client/react/AppRouter.js index 0384555..276c5d3 100644 --- a/src/client/react/AppRouter.js +++ b/src/client/react/AppRouter.js @@ -1,3 +1,23 @@ +/** + * Copyright (C) 2018 Noah Loomans + * + * This file is part of rooster.hetmml.nl. + * + * rooster.hetmml.nl is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * rooster.hetmml.nl is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with rooster.hetmml.nl. If not, see . + * + */ + import React from 'react'; import { diff --git a/src/client/react/components/presentational/WeekDisplay.js b/src/client/react/components/presentational/WeekDisplay.js index 38125b2..f459284 100644 --- a/src/client/react/components/presentational/WeekDisplay.js +++ b/src/client/react/components/presentational/WeekDisplay.js @@ -1,3 +1,23 @@ +/** + * Copyright (C) 2018 Noah Loomans + * + * This file is part of rooster.hetmml.nl. + * + * rooster.hetmml.nl is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * rooster.hetmml.nl is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with rooster.hetmml.nl. If not, see . + * + */ + import React from 'react'; import PropTypes from 'prop-types'; diff --git a/src/client/react/lib/getSearchResults.js b/src/client/react/lib/getSearchResults.js index fafbd0b..6b7fd9d 100644 --- a/src/client/react/lib/getSearchResults.js +++ b/src/client/react/lib/getSearchResults.js @@ -1,3 +1,23 @@ +/** + * Copyright (C) 2018 Noah Loomans + * + * This file is part of rooster.hetmml.nl. + * + * rooster.hetmml.nl is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * rooster.hetmml.nl is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with rooster.hetmml.nl. If not, see . + * + */ + import FuzzySearch from 'fuzzy-search'; import uniqBy from 'lodash/uniqBy'; import users from '../users'; diff --git a/src/client/react/lib/rejectIfBadStatus.js b/src/client/react/lib/rejectIfBadStatus.js index 29bf3b2..c44e824 100644 --- a/src/client/react/lib/rejectIfBadStatus.js +++ b/src/client/react/lib/rejectIfBadStatus.js @@ -1 +1,21 @@ +/** + * Copyright (C) 2018 Noah Loomans + * + * This file is part of rooster.hetmml.nl. + * + * rooster.hetmml.nl is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * rooster.hetmml.nl is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with rooster.hetmml.nl. If not, see . + * + */ + export default response => (response.ok ? response : Promise.reject(response.status)); diff --git a/src/client/react/lib/withinRange.js b/src/client/react/lib/withinRange.js index d3d4f24..c973d74 100644 --- a/src/client/react/lib/withinRange.js +++ b/src/client/react/lib/withinRange.js @@ -1,3 +1,23 @@ +/** + * Copyright (C) 2018 Noah Loomans + * + * This file is part of rooster.hetmml.nl. + * + * rooster.hetmml.nl is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * rooster.hetmml.nl is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with rooster.hetmml.nl. If not, see . + * + */ + export default function withinRange(number, rangeMax) { if (number < 0) { return withinRange(number + (rangeMax + 1), rangeMax); diff --git a/src/client/react/lib/withinRange.test.js b/src/client/react/lib/withinRange.test.js index baec122..aca85d2 100644 --- a/src/client/react/lib/withinRange.test.js +++ b/src/client/react/lib/withinRange.test.js @@ -1,3 +1,23 @@ +/** + * Copyright (C) 2018 Noah Loomans + * + * This file is part of rooster.hetmml.nl. + * + * rooster.hetmml.nl is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * rooster.hetmml.nl is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with rooster.hetmml.nl. If not, see . + * + */ + import withinRange from './withinRange'; describe('withinRange', () => { diff --git a/src/client/react/store/actions.js b/src/client/react/store/actions.js index 131bcaa..7e49f46 100644 --- a/src/client/react/store/actions.js +++ b/src/client/react/store/actions.js @@ -1,3 +1,23 @@ +/** + * Copyright (C) 2018 Noah Loomans + * + * This file is part of rooster.hetmml.nl. + * + * rooster.hetmml.nl is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * rooster.hetmml.nl is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with rooster.hetmml.nl. If not, see . + * + */ + import { push } from 'connected-react-router'; import queryString from 'query-string'; import users from '../users'; diff --git a/src/client/react/store/selectors.js b/src/client/react/store/selectors.js index 2567107..d52539b 100644 --- a/src/client/react/store/selectors.js +++ b/src/client/react/store/selectors.js @@ -1,3 +1,23 @@ +/** + * Copyright (C) 2018 Noah Loomans + * + * This file is part of rooster.hetmml.nl. + * + * rooster.hetmml.nl is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * rooster.hetmml.nl is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with rooster.hetmml.nl. If not, see . + * + */ + import moment from 'moment'; import queryString from 'query-string'; import isNaN from 'lodash/isNaN'; diff --git a/src/server/lib/schools/hetmml/parseSchedule.js b/src/server/lib/schools/hetmml/parseSchedule.js index 14e861e..066d637 100644 --- a/src/server/lib/schools/hetmml/parseSchedule.js +++ b/src/server/lib/schools/hetmml/parseSchedule.js @@ -1,3 +1,23 @@ +/** + * Copyright (C) 2018 Noah Loomans + * + * This file is part of rooster.hetmml.nl. + * + * rooster.hetmml.nl is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * rooster.hetmml.nl is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with rooster.hetmml.nl. If not, see . + * + */ + const { JSDOM } = require('jsdom'); function fixFirstLargeScheduleItem(trNodeList) { diff --git a/webpack.config.js b/webpack.config.js index 2549124..1291180 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,3 +1,23 @@ +/** + * Copyright (C) 2018 Noah Loomans + * + * This file is part of rooster.hetmml.nl. + * + * rooster.hetmml.nl is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * rooster.hetmml.nl is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with rooster.hetmml.nl. If not, see . + * + */ + const webpack = require('webpack'); const path = require('path'); -- cgit v1.1