diff --git a/packages/material-ui-styles/src/defaultTheme/defaultTheme.spec.ts b/packages/material-ui-styles/src/defaultTheme/defaultTheme.spec.ts index 96a7b2142e5237..6bc4c5ddd2eb4c 100644 --- a/packages/material-ui-styles/src/defaultTheme/defaultTheme.spec.ts +++ b/packages/material-ui-styles/src/defaultTheme/defaultTheme.spec.ts @@ -13,7 +13,7 @@ declare module '@material-ui/styles' { } { - makeStyles(theme => { + makeStyles((theme) => { // $ExpectType string const value = theme.myProperty; diff --git a/packages/material-ui/src/styles/createMixins.spec.ts b/packages/material-ui/src/styles/createMixins.spec.ts index 91e3e0292cb6fe..0564d0fdab7ae1 100644 --- a/packages/material-ui/src/styles/createMixins.spec.ts +++ b/packages/material-ui/src/styles/createMixins.spec.ts @@ -1,29 +1,29 @@ import { createMuiTheme, makeStyles } from '@material-ui/core/styles'; { - const theme = createMuiTheme({ - mixins: { - toolbar: { - background: '#fff', - minHeight: 36, - '@media (min-width:0px) and (orientation: landscape)': { - minHeight: 24 - }, - '@media (min-width:600px)': { - minHeight: 48 - } - }, - } - }); - - const useStyles = makeStyles(theme => ({ - appBarSpacer: theme.mixins.toolbar, - toolbarIcon: { - display: 'flex', - alignItems: 'center', - justifyContent: 'flex-end', - padding: '0 8px', - ...theme.mixins.toolbar, + const theme = createMuiTheme({ + mixins: { + toolbar: { + background: '#fff', + minHeight: 36, + '@media (min-width:0px) and (orientation: landscape)': { + minHeight: 24, + }, + '@media (min-width:600px)': { + minHeight: 48, }, - })); + }, + }, + }); + + const useStyles = makeStyles((theme) => ({ + appBarSpacer: theme.mixins.toolbar, + toolbarIcon: { + display: 'flex', + alignItems: 'center', + justifyContent: 'flex-end', + padding: '0 8px', + ...theme.mixins.toolbar, + }, + })); } diff --git a/packages/material-ui/test/typescript/colors.spec.ts b/packages/material-ui/test/typescript/colors.spec.ts index 8c24ba74d1c59b..45058f5bc42022 100644 --- a/packages/material-ui/test/typescript/colors.spec.ts +++ b/packages/material-ui/test/typescript/colors.spec.ts @@ -1,13 +1,26 @@ import { colors, Color } from '@material-ui/core'; const { - amber, blue, blueGrey, - brown, cyan, deepOrange, - deepPurple, green, grey, - indigo, lightBlue, lightGreen, - lime, orange, pink, - purple, red, teal, - yellow, common + amber, + blue, + blueGrey, + brown, + cyan, + deepOrange, + deepPurple, + green, + grey, + indigo, + lightBlue, + lightGreen, + lime, + orange, + pink, + purple, + red, + teal, + yellow, + common, } = colors; const colorList: Color[] = [ diff --git a/scripts/generateProptypes.ts b/scripts/generateProptypes.ts index e92ac892467e7b..7926bafad120c8 100644 --- a/scripts/generateProptypes.ts +++ b/scripts/generateProptypes.ts @@ -43,8 +43,8 @@ async function generateProptypes( return GenerateResult.NoComponent; } - proptypes.body.forEach(component => { - component.types.forEach(prop => { + proptypes.body.forEach((component) => { + component.types.forEach((prop) => { if (prop.name === 'classes' && prop.jsDoc) { prop.jsDoc += '\nSee [CSS API](#css) below for more details.'; } else if (prop.name === 'children' && !prop.jsDoc) { @@ -100,7 +100,7 @@ async function run() { [ path.resolve(__dirname, '../packages/material-ui/src'), path.resolve(__dirname, '../packages/material-ui-lab/src'), - ].map(folderPath => + ].map((folderPath) => glob('+([A-Z])*/+([A-Z])*.d.ts', { absolute: true, cwd: folderPath, @@ -111,7 +111,7 @@ async function run() { const files = _.flatten(allFiles) // Filter out files where the directory name and filename doesn't match // Example: Modal/ModalManager.d.ts - .filter(filePath => { + .filter((filePath) => { const folderName = path.basename(path.dirname(filePath)); const fileName = path.basename(filePath, '.d.ts'); @@ -120,7 +120,7 @@ async function run() { const program = ttp.createProgram(files, tsconfig); - const promises = files.map>(async tsFile => { + const promises = files.map>(async (tsFile) => { const jsFile = tsFile.replace('.d.ts', '.js'); if (!ignoreCache && (await fse.stat(jsFile)).mtimeMs > (await fse.stat(tsFile)).mtimeMs) { @@ -140,7 +140,7 @@ async function run() { } console.log('--- Summary ---'); - const groups = _.groupBy(results, x => x); + const groups = _.groupBy(results, (x) => x); _.forOwn(groups, (count, key) => { console.log('%s: %d', GenerateResult[(key as unknown) as GenerateResult], count.length); @@ -149,7 +149,7 @@ async function run() { console.log('Total: %d', results.length); } -run().catch(error => { +run().catch((error) => { console.error(error); process.exit(1); }); diff --git a/scripts/prettier.js b/scripts/prettier.js index 2b38897360fe7e..37beae02144615 100644 --- a/scripts/prettier.js +++ b/scripts/prettier.js @@ -24,7 +24,7 @@ function runPrettier(options) { .filter((notEmpty) => notEmpty); const files = glob - .sync('**/*.{js,tsx,d.ts}', { ignore: ['**/node_modules/**', ...ignoredFiles] }) + .sync('**/*.{js,tsx,ts}', { ignore: ['**/node_modules/**', ...ignoredFiles] }) .filter((f) => !changedFiles || changedFiles.has(f)); if (!files.length) {