Skip to content

Commit

Permalink
Lock file maintenance (mui#32969)
Browse files Browse the repository at this point in the history
Co-authored-by: Michał Dudak <michal@dudak.me>
  • Loading branch information
2 people authored and Daniel Rabe committed Nov 29, 2022
1 parent 4b35e63 commit e5587f9
Show file tree
Hide file tree
Showing 7 changed files with 2,312 additions and 2,185 deletions.
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"react-virtualized": "^9.22.3",
"react-window": "^1.8.7",
"recast": "^0.21.2",
"recharts": "^2.1.12",
"recharts": "2.1.12",
"rimraf": "^3.0.2",
"styled-components": "^5.3.5",
"stylis": "^4.1.1",
Expand Down
4 changes: 2 additions & 2 deletions docs/scripts/ApiBuilders/ComponentApiBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ async function computeApiDescription(api: ReactApi, options: { host: string }):
})
.process(api.description);

return file.contents.toString('utf-8').trim();
return file.contents.toString().trim();
}

/**
Expand Down Expand Up @@ -162,7 +162,7 @@ async function annotateComponentDefinition(api: ReactApi) {
// /**
// */
// const Component = () => {}
node = binding.path.parentPath.node;
node = binding.path.parentPath!.node;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/components/home/ElementPointer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const withPointer = <T extends React.ElementType>(
Component: T,
options: { id: string; name: string },
) => {
const WithPointer = (props: unknown) => {
const WithPointer = (props: object) => {
const root = React.useRef<null | HTMLElement>(null);
const handleMouseOver = React.useContext(PointerContext);
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ const rule = {
noNameValue:
'Unable to resolve `name`. Please hardcode the `name` i.e. use a string literal.',
},
schema: [
{
type: 'object',
properties: {
customHooks: {
type: 'array',
items: {
type: 'string',
},
},
},
additionalProperties: false,
},
],
},
create(context) {
const [options = {}] = context.options;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@ module.exports = {
'literal-label':
"Don't use hardcoded labels. Prefer translated values by using `useTranslate`. New translations should be added to `docs/translations/translations.json`.",
},
schema: [
{
type: 'object',
properties: {
allow: {
oneOf: [
{
type: 'array',
items: {
type: 'string',
},
},
{
type: 'string',
},
],
},
},
additionalProperties: false,
},
],
},
create(context) {
const { allow: allowOption = [] } = context.options[0] || {};
Expand Down
4 changes: 2 additions & 2 deletions packages/typescript-to-proptypes/src/injector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ function plugin(
// export { Component }
path.insertAfter(babel.template.ast(`export { ${nodeName} };`));
path.insertAfter(babel.template.ast(placeholder));
path.parentPath.replaceWith(path.node);
path.parentPath!.replaceWith(path.node);
} else if (!emptyPropTypes && babelTypes.isExportDefaultDeclaration(path.parent)) {
// in:
// export default function Component() {}
Expand All @@ -217,7 +217,7 @@ function plugin(
// export default Component
path.insertAfter(babel.template.ast(`export default ${nodeName};`));
path.insertAfter(babel.template.ast(placeholder));
path.parentPath.replaceWith(path.node);
path.parentPath!.replaceWith(path.node);
} else {
path.insertAfter(babel.template.ast(placeholder));
}
Expand Down
Loading

0 comments on commit e5587f9

Please sign in to comment.