Skip to content

Commit

Permalink
Merge pull request #258 from christopheranderson/chrande/license-fixes
Browse files Browse the repository at this point in the history
Add license header rules to tslint
  • Loading branch information
munozemilio committed Oct 22, 2019
2 parents 83fcbb2 + 98ad2b1 commit 0d2e363
Show file tree
Hide file tree
Showing 66 changed files with 369 additions and 16 deletions.
5 changes: 5 additions & 0 deletions packages/chatdown/src/commands/chatdown.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import {flags} from '@oclif/command'
import {CLIError, Command, utils} from '@microsoft/bf-cli-command'
const chalk = require('chalk')
Expand Down
5 changes: 5 additions & 0 deletions packages/chatdown/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

export default {}
11 changes: 10 additions & 1 deletion packages/chatdown/tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
"extends": "@oclif/tslint",
"rules": {
"ordered-imports": [false],
"object-literal-sort-keys": [false]
"object-literal-sort-keys": [false],
"file-header": [
true,
{
"match": "Copyright \\(c\\) Microsoft Corporation\\.*",
"allow-single-line-comments": false,
"default": "Copyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the MIT License.",
"enforce-trailing-newline": false
}
]
}
}
5 changes: 5 additions & 0 deletions packages/cli/src/hooks/init/inithook.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import {Hook} from '@oclif/config'
import cli from 'cli-ux'
import * as fs from 'fs-extra'
Expand Down
5 changes: 5 additions & 0 deletions packages/cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

export {run} from '@oclif/command'
15 changes: 14 additions & 1 deletion packages/cli/tslint.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
{
"extends": "@oclif/tslint"
"extends": "@oclif/tslint",
"rules": {
"ordered-imports": [false],
"object-literal-sort-keys": [false],
"file-header": [
true,
{
"match": "Copyright \\(c\\) Microsoft Corporation\\.*",
"allow-single-line-comments": false,
"default": "Copyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the MIT License.",
"enforce-trailing-newline": false
}
]
}
}
5 changes: 5 additions & 0 deletions packages/command/src/clierror.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

export class CLIError extends Error {
constructor(error: string | Error) {
const message = error instanceof Error ? error.message : error
Expand Down
5 changes: 5 additions & 0 deletions packages/command/src/command.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

// tslint:disable:object-curly-spacing ordered-imports

import { Command as Base } from '@oclif/command'
Expand Down
5 changes: 5 additions & 0 deletions packages/command/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import {CLIError, Command, flags} from './command'
import utils from './utils'
export {CLIError, Command, flags, utils}
Expand Down
5 changes: 5 additions & 0 deletions packages/command/src/readpipeddata.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

const ReadPipedStdin = {
read: async () => {
return new Promise<string>(async (resolve, reject) => {
Expand Down
5 changes: 5 additions & 0 deletions packages/command/src/telemetry.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import * as AppInsights from 'applicationinsights'

const INSTRUMENTATION_KEY = 'cc91f74a-1abd-4be0-8a96-fddedbc08dd7'
Expand Down
5 changes: 5 additions & 0 deletions packages/command/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

const fs = require('fs-extra')
const path = require('path')
import {CLIError} from './clierror'
Expand Down
15 changes: 14 additions & 1 deletion packages/command/tslint.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
{
"extends": "@oclif/tslint"
"extends": "@oclif/tslint",
"rules": {
"ordered-imports": [false],
"object-literal-sort-keys": [false],
"file-header": [
true,
{
"match": "Copyright \\(c\\) Microsoft Corporation\\.*",
"allow-single-line-comments": false,
"default": "Copyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the MIT License.",
"enforce-trailing-newline": false
}
]
}
}
5 changes: 5 additions & 0 deletions packages/config/src/commands/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import {Command, flags} from '@oclif/command'

export default class ConfigIndex extends Command {
Expand Down
5 changes: 5 additions & 0 deletions packages/config/src/commands/config/set/qnamaker.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import {Command, flags} from '@microsoft/bf-cli-command'
import {getConfigFile, writeConfigFile, Config} from '../../../utils/configfilehandler'

Expand Down
5 changes: 5 additions & 0 deletions packages/config/src/commands/config/set/telemetry.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import {Command, flags} from '@microsoft/bf-cli-command'
import {getConfigFile, writeConfigFile, Config} from '../../../utils/configfilehandler'

Expand Down
5 changes: 5 additions & 0 deletions packages/config/src/commands/config/show.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import {Command, flags} from '@microsoft/bf-cli-command'
import {getConfigFile, Config} from '../../utils/configfilehandler'

Expand Down
5 changes: 5 additions & 0 deletions packages/config/src/commands/config/show/qnamaker.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import {Command, flags} from '@microsoft/bf-cli-command'
import {getConfigFile, Config} from '../../../utils/configfilehandler'

Expand Down
5 changes: 5 additions & 0 deletions packages/config/src/commands/config/show/telemetry.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import {Command, flags} from '@microsoft/bf-cli-command'
import {getConfigFile, Config} from '../../../utils/configfilehandler'

Expand Down
5 changes: 5 additions & 0 deletions packages/config/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

export default {}
5 changes: 5 additions & 0 deletions packages/config/src/utils/configfilehandler.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

const fs = require('fs-extra')
const path = require('path')

Expand Down
11 changes: 10 additions & 1 deletion packages/config/tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
"extends": "@oclif/tslint",
"rules": {
"ordered-imports": [false],
"object-literal-sort-keys": [false]
"object-literal-sort-keys": [false],
"file-header": [
true,
{
"match": "Copyright \\(c\\) Microsoft Corporation\\.*",
"allow-single-line-comments": false,
"default": "Copyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the MIT License.",
"enforce-trailing-newline": false
}
]
}
}
4 changes: 2 additions & 2 deletions packages/dialog/src/commands/dialog/merge.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright(c) Microsoft Corporation.All rights reserved.
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

Expand Down
5 changes: 3 additions & 2 deletions packages/dialog/src/commands/dialog/verify.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* Copyright(c) Microsoft Corporation.All rights reserved.
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import { Command, flags } from '@microsoft/bf-cli-command';
import * as chalk from 'chalk';
import { Definition, DialogTracker, SchemaTracker } from '../../library/dialogTracker';
Expand Down
4 changes: 2 additions & 2 deletions packages/dialog/src/commands/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright(c) Microsoft Corporation.All rights reserved.
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

Expand Down
5 changes: 5 additions & 0 deletions packages/dialog/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

export default {}
6 changes: 4 additions & 2 deletions packages/dialog/src/library/dialogTracker.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/usr/bin/env node
/**
* Copyright(c) Microsoft Corporation.All rights reserved.

/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

export * from './schemaTracker';
import * as fs from 'fs-extra';
import * as glob from 'globby';
Expand Down
5 changes: 3 additions & 2 deletions packages/dialog/src/library/schemaTracker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env node
/**
* Copyright(c) Microsoft Corporation.All rights reserved.

/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

Expand Down
11 changes: 10 additions & 1 deletion packages/dialog/tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
"no-trailing-whitespace": false,
"ordered-imports": false,
"no-empty-line-after-opening-brace": false,
"semicolon": false
"semicolon": false,
"file-header": [
true,
{
"match": "Copyright \\(c\\) Microsoft Corporation\\.*",
"allow-single-line-comments": false,
"default": "Copyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the MIT License.",
"enforce-trailing-newline": false
}
]
}
}
5 changes: 5 additions & 0 deletions packages/lu/src/commands/luis/convert.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import {CLIError, Command, flags, utils} from '@microsoft/bf-cli-command'
const exception = require('./../../parser/lufile/classes/exception')
const fs = require('fs-extra')
Expand Down
5 changes: 5 additions & 0 deletions packages/lu/src/commands/luis/generate/cs.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import {CLIError, Command, flags} from '@microsoft/bf-cli-command'
import {camelCase, upperFirst} from 'lodash'
import * as path from 'path'
Expand Down
5 changes: 5 additions & 0 deletions packages/lu/src/commands/luis/generate/ts.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import {CLIError, Command, flags} from '@microsoft/bf-cli-command'
import {camelCase, kebabCase, upperFirst} from 'lodash'
import * as path from 'path'
Expand Down
5 changes: 5 additions & 0 deletions packages/lu/src/commands/luis/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import {Command, flags} from '@microsoft/bf-cli-command'

export default class LuisIndex extends Command {
Expand Down
5 changes: 5 additions & 0 deletions packages/lu/src/commands/luis/translate.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import {CLIError, Command, flags, utils} from '@microsoft/bf-cli-command'
const fs = require('fs-extra')
const path = require('path')
Expand Down
5 changes: 5 additions & 0 deletions packages/lu/src/commands/qnamaker/convert.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import {CLIError, Command, flags, utils} from '@microsoft/bf-cli-command'
const exception = require('./../../parser/lufile/classes/exception')
const fs = require('fs-extra')
Expand Down
5 changes: 5 additions & 0 deletions packages/lu/src/commands/qnamaker/translate.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import {CLIError, Command, flags, utils} from '@microsoft/bf-cli-command'
const fs = require('fs-extra')
const path = require('path')
Expand Down
5 changes: 5 additions & 0 deletions packages/lu/src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

export default {}
5 changes: 5 additions & 0 deletions packages/lu/src/utils/filehelper.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*!
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/

import {CLIError, utils} from '@microsoft/bf-cli-command'
const fs = require('fs-extra')
const path = require('path')
Expand Down
13 changes: 13 additions & 0 deletions packages/lu/tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,18 @@
"exclude": [
"src/parser/**/**.js"
]
},
"rules": {
"ordered-imports": [false],
"object-literal-sort-keys": [false],
"file-header": [
true,
{
"match": "Copyright \\(c\\) Microsoft Corporation\\.*",
"allow-single-line-comments": false,
"default": "Copyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the MIT License.",
"enforce-trailing-newline": false
}
]
}
}
Loading

0 comments on commit 0d2e363

Please sign in to comment.