-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8251 from blink1073/handle-session-error-1.x
[1.2.x] Fix session context error handling
- Loading branch information
Showing
11 changed files
with
391 additions
and
194 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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,35 @@ | ||
const escape = require('shell-quote').quote; | ||
const fs = require('fs'); | ||
const isWin = process.platform === 'win32'; | ||
|
||
const escapeFileNames = filenames => | ||
filenames | ||
.filter(filename => fs.existsSync(filename)) | ||
.map(filename => `"${isWin ? filename : escape([filename])}"`) | ||
.join(' '); | ||
|
||
module.exports = { | ||
'**/*{.css,.json,.md}': filenames => { | ||
const escapedFileNames = escapeFileNames(filenames); | ||
return [ | ||
`prettier --write ${escapedFileNames}`, | ||
`git add ${escapedFileNames}` | ||
]; | ||
}, | ||
'**/*{.ts,.tsx}': filenames => { | ||
const escapedFileNames = escapeFileNames(filenames); | ||
return [ | ||
`prettier --write ${escapedFileNames}`, | ||
`tslint --fix ${escapedFileNames}`, | ||
`git add ${escapedFileNames}` | ||
]; | ||
}, | ||
'**/*{.js,.jsx}': filenames => { | ||
const escapedFileNames = escapeFileNames(filenames); | ||
return [ | ||
`prettier --write ${escapedFileNames}`, | ||
`eslint --fix ${escapedFileNames}`, | ||
`git add ${escapedFileNames}` | ||
]; | ||
} | ||
}; |
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
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
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
Oops, something went wrong.