-
Notifications
You must be signed in to change notification settings - Fork 756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
💅 integrate prettier and eslint #1240
Merged
Merged
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
cf8a1a8
introduce dependency, tslint additions
cwhitten 925e933
Lockfile
cwhitten d34bd3c
Prettier savepoints
cwhitten 9a28c6f
Prettier step 2
cwhitten 47a7a60
add includes to each tsconfig
a-b-r-o-w-n 087fc7d
add node-fetch dep to emulator core
a-b-r-o-w-n 7670594
add prettier config
a-b-r-o-w-n b025ff4
add prettier to pre-commit hook
a-b-r-o-w-n e77903a
add lint script to all packages
a-b-r-o-w-n 6897a0a
lint & prettify sdk-shared
a-b-r-o-w-n eb0982d
fix linting setup script
a-b-r-o-w-n fa3ef0e
fix lint script in package.jsons
a-b-r-o-w-n f32b1e1
fix lint setup script again
a-b-r-o-w-n a77194f
add instructions to lint setup script
a-b-r-o-w-n f95d559
lint & prettify sdk-main
a-b-r-o-w-n 7ea39fc
add eslint config to lint setup
a-b-r-o-w-n 9f8c342
lint & prettify ui-react
a-b-r-o-w-n 97fa494
lint & prettify sdk-client
a-b-r-o-w-n 7beb0b0
remove prettier-eslint dependency
a-b-r-o-w-n b3847fa
lint & prettify app-shared
a-b-r-o-w-n 365b5b8
use ts compiler to check for unused variables
a-b-r-o-w-n 19cd490
lint & prettify app main
a-b-r-o-w-n 2c64141
lint & prettify app client
a-b-r-o-w-n 3c04dab
apply new lint rules
a-b-r-o-w-n 43c07d7
do not lint scss.d.ts files
a-b-r-o-w-n 32a890e
fix conflicts from master
a-b-r-o-w-n d0be2df
lint & prettify luis client
a-b-r-o-w-n 3ada833
enable parsing of jsx in js files
a-b-r-o-w-n 8251875
lint & prettify debug extension
a-b-r-o-w-n 24915b6
lint & prettify qna extension
a-b-r-o-w-n c5cc011
lint & prettify emulator core
a-b-r-o-w-n 531011e
lint & prettify emulator cli
a-b-r-o-w-n 5bddc35
add top level lint:fix script
a-b-r-o-w-n f6f5c6e
correctly represent return value
a-b-r-o-w-n 2b1dc32
remove license from generated files
a-b-r-o-w-n 7b7a388
revert converting to import
a-b-r-o-w-n 6bc20f1
use defined class to export singleton
a-b-r-o-w-n 1eb600a
get tests passing
a-b-r-o-w-n 5dbb129
remove outdated comment
a-b-r-o-w-n d0bce8e
convert eslintrc to js modules
a-b-r-o-w-n a807ad3
fix merge conflicts
a-b-r-o-w-n 5d9ee05
ignore scss typings
a-b-r-o-w-n fc0b947
do not bail when running lint scripts
a-b-r-o-w-n File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
module.exports = { | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:typescript/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
plugins: ['import', 'notice'], | ||
env: { | ||
browser: true, | ||
es6: true, | ||
node: true, | ||
}, | ||
rules: { | ||
// eslint rules | ||
'no-dupe-class-members': 'off', | ||
'no-undef': 'off', // ts compiler catches this | ||
'prefer-const': 'error', | ||
|
||
// plugin: import | ||
'import/first': 'error', | ||
'import/order': ['error', { 'newlines-between': 'always' }], | ||
|
||
// plugin: notice | ||
'notice/notice': [ | ||
'error', | ||
{ | ||
mustMatch: 'Copyright \\(c\\) Microsoft', | ||
templateFile: require.resolve('./copyright.js'), | ||
messages: { | ||
whenFailedToMatch: 'Missing copyright header.', | ||
}, | ||
}, | ||
], | ||
|
||
// plugin: typescript | ||
'typescript/explicit-function-return-type': 'off', | ||
'typescript/explicit-member-accessibility': 'off', | ||
'typescript/indent': 'off', | ||
'typescript/no-empty-interface': 'warn', | ||
'typescript/no-object-literal-type-assertion': 'off', | ||
'typescript/no-parameter-properties': 'off', | ||
'typescript/no-use-before-define': [ | ||
'error', | ||
{ functions: false, classes: false }, | ||
], | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/*.+(js|jsx)'], | ||
parser: 'babel-eslint', | ||
}, | ||
{ | ||
files: ['**/*.+(test|spec).+(js|jsx|ts|tsx)'], | ||
env: { | ||
jest: true, | ||
}, | ||
rules: { | ||
'typescript/class-name-casing': 'off', | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module.exports = { | ||
extends: ['./.eslintrc.js', 'plugin:react/recommended'], | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 6, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
rules: { | ||
'react/no-deprecated': 'warn', | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/*.+(test|spec).+(js|jsx|ts|tsx)'], | ||
rules: { | ||
'react/display-name': 'off', | ||
}, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"parser": "typescript", | ||
"trailingComma": "es5", | ||
"singleQuote": true | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// Copyright (c) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. | ||
// | ||
// Microsoft Bot Framework: http://botframework.com | ||
// | ||
// Bot Framework Emulator Github: | ||
// https://github.com/Microsoft/BotFramwork-Emulator | ||
// | ||
// Copyright (c) Microsoft Corporation | ||
// All rights reserved. | ||
// | ||
// MIT License: | ||
// Permission is hereby granted, free of charge, to any person obtaining | ||
// a copy of this software and associated documentation files (the | ||
// "Software"), to deal in the Software without restriction, including | ||
// without limitation the rights to use, copy, modify, merge, publish, | ||
// distribute, sublicense, and/or sell copies of the Software, and to | ||
// permit persons to whom the Software is furnished to do so, subject to | ||
// the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be | ||
// included in all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, | ||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
// |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can debate here on the prettier formatting options. https://prettier.io/docs/en/options.html