-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AAP-19491: Enable pretifier for js and ts code on pre-commit (#782)
- Loading branch information
Showing
63 changed files
with
3,878 additions
and
3,390 deletions.
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
// See https://youtrack.jetbrains.com/issue/WEB-54170/Allow-specifying-environment-variables-for-ESLint#focus=Comments-27-6031544.0-0 | ||
module.exports = { | ||
'extends': ['react-app', 'react-app/jest'], | ||
'parser': '@typescript-eslint/parser', | ||
'parserOptions': { | ||
'babelOptions': { | ||
'presets': [ | ||
['babel-preset-react-app', false], | ||
(process.env.NODE_ENV === 'production') | ||
? 'babel-preset-react-app/prod' | ||
: (process.env.NODE_ENV === 'test') | ||
? 'babel-preset-react-app/test' | ||
: 'babel-preset-react-app/dev', | ||
], | ||
} | ||
} | ||
} | ||
extends: ["react-app", "react-app/jest"], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
babelOptions: { | ||
presets: [ | ||
["babel-preset-react-app", false], | ||
process.env.NODE_ENV === "production" | ||
? "babel-preset-react-app/prod" | ||
: process.env.NODE_ENV === "test" | ||
? "babel-preset-react-app/test" | ||
: "babel-preset-react-app/dev", | ||
], | ||
}, | ||
}, | ||
}; |
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 @@ | ||
*.css | ||
*.html | ||
*.svg | ||
*.json | ||
README.md |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module.exports = { | ||
// Stub methods as needed (we should not need any for the Admin Portal) | ||
// Stub methods as needed (we should not need any for the Admin Portal) | ||
}; |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
module.exports = { | ||
// Stub methods as needed... | ||
useTranslation: () => { | ||
return { | ||
t: (str: String) => str, | ||
}; | ||
}, | ||
// Stub methods as needed... | ||
useTranslation: () => { | ||
return { | ||
t: (str: String) => str, | ||
}; | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
// This is a custom Jest transformer turning style imports into empty objects. | ||
// http://facebook.github.io/jest/docs/en/webpack.html | ||
|
||
module.exports = { | ||
process() { | ||
return { | ||
code: `module.exports = {};`, | ||
}; | ||
}, | ||
getCacheKey() { | ||
// The output is always the same. | ||
return 'cssTransform'; | ||
}, | ||
process() { | ||
return { | ||
code: `module.exports = {};`, | ||
}; | ||
}, | ||
getCacheKey() { | ||
// The output is always the same. | ||
return "cssTransform"; | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
const path = require('path'); | ||
const path = require("path"); | ||
|
||
module.exports = { | ||
process(sourceText, sourcePath, options) { | ||
return { | ||
code: `module.exports = ${JSON.stringify(path.basename(sourcePath))};`, | ||
}; | ||
}, | ||
} | ||
}; |
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
global.matchMedia = global.matchMedia || function() { | ||
global.matchMedia = | ||
global.matchMedia || | ||
function () { | ||
return { | ||
matches : false, | ||
addListener : function() {}, | ||
removeListener: function() {} | ||
} | ||
} | ||
matches: false, | ||
addListener: function () {}, | ||
removeListener: function () {}, | ||
}; | ||
}; |
Oops, something went wrong.
e5cee4c
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.