Skip to content

Commit

Permalink
Run lint (add license headers)
Browse files Browse the repository at this point in the history
  • Loading branch information
TuckerWhitehouse committed Nov 5, 2020
1 parent 5af9aad commit da5c3f7
Show file tree
Hide file tree
Showing 49 changed files with 782 additions and 9 deletions.
16 changes: 16 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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.
*/

module.exports = {
projects: ['<rootDir>/packages/*'],
reporters: ['default', ['jest-junit', { outputDirectory: `<rootDir>/test-reports/` }]],
Expand Down
16 changes: 16 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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.
*/

module.exports = {
'*.{js,ts}': ['eslint --fix', 'git add'],
'*.json': ['prettier --write', 'git add'],
Expand Down
16 changes: 16 additions & 0 deletions packages/shared/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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.
*/

const alias = require('rollup-plugin-alias')

const globals = require('rollup-plugin-node-globals')
Expand Down
16 changes: 16 additions & 0 deletions packages/workgrid-connector/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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.
*/

module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
Expand Down
17 changes: 16 additions & 1 deletion packages/workgrid-connector/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
/* eslint-env node */
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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.
*/

const { resolve, basename } = require('path')

module.exports = {
Expand Down
16 changes: 16 additions & 0 deletions packages/workgrid-connector/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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 config from 'shared/rollup.config'

export default config('src/connector.ts')
16 changes: 16 additions & 0 deletions packages/workgrid-connector/src/connector.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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.
*/

jest.mock('@workgrid/request')
jest.mock('@workgrid/webhook-validation')

Expand Down
16 changes: 16 additions & 0 deletions packages/workgrid-connector/src/connector.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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 request, { RequestOptions, RequestResponse /*, RequestError*/ } from '@workgrid/request'
import validate from '@workgrid/webhook-validation'
import { merge } from 'lodash'
Expand Down
16 changes: 16 additions & 0 deletions packages/workgrid-conversation-builder/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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.
*/

module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
Expand Down
17 changes: 16 additions & 1 deletion packages/workgrid-conversation-builder/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
/* eslint-env node */
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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.
*/

const { resolve, basename } = require('path')

module.exports = {
Expand Down
16 changes: 16 additions & 0 deletions packages/workgrid-conversation-builder/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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 config from 'shared/rollup.config'

export default config('src/conversation-builder.ts')
16 changes: 16 additions & 0 deletions packages/workgrid-conversation-builder/src/conversation-builder.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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 { assign, cloneDeep, map } from 'lodash'
import Response from './response'
/**
Expand Down
16 changes: 16 additions & 0 deletions packages/workgrid-conversation-builder/src/response.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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 { isEmpty } from 'lodash'

export interface Conversation {
Expand Down
16 changes: 16 additions & 0 deletions packages/workgrid-conversation-builder/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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 ConversationBuilder from '../src/conversation-builder'
import Response, { Conversation } from '../src/response'

Expand Down
16 changes: 16 additions & 0 deletions packages/workgrid-courier/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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.
*/

module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
Expand Down
17 changes: 16 additions & 1 deletion packages/workgrid-courier/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
/* eslint-env node */
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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.
*/

const { resolve, basename } = require('path')

module.exports = {
Expand Down
16 changes: 16 additions & 0 deletions packages/workgrid-courier/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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 config from 'shared/rollup.config'

export default config('src/courier.ts')
16 changes: 16 additions & 0 deletions packages/workgrid-courier/src/courier.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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 ms from 'ms'
import Courier from './courier'

Expand Down
16 changes: 16 additions & 0 deletions packages/workgrid-courier/src/courier.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/**
* Copyright 2020 Workgrid Software
*
* 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
*
* http://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 emitter from './emitter'
import niceTry from 'nice-try'
import debug from 'debug/dist/debug'
Expand Down
Loading

0 comments on commit da5c3f7

Please sign in to comment.