Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Remove events #89

Merged
merged 15 commits into from
Jan 15, 2019
6 changes: 3 additions & 3 deletions scripts/generate-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function generatePropTypes(element, attributes) {
'fireEvent': PropTypes.func,

'dashEvents': PropTypes.oneOf(['click']),

'setProps': PropTypes.func
`
}
Expand Down Expand Up @@ -174,7 +174,7 @@ function generateComponents(list, attributes) {
function writeComponents(components, destination) {
console.log(`Writing ${Object.keys(components).length} component files to ${srcPath}.`);
let componentPath;
for (let Component in components) {
for (const Component in components) {
componentPath = path.join(destination, `${Component}.react.js`);
fs.writeFileSync(componentPath, components[Component]);
}
Expand All @@ -192,7 +192,7 @@ if (!listPath) {
const list = fs
.readFileSync(listPath, 'utf8')
.split('\n')
.filter(item => !!item);
.filter(item => Boolean(item));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While at it, please add the npm run lint command to the CI Build step


// Get the mapping of attributes to elements
const attributes = JSON.parse(fs.readFileSync(attributesPath, 'utf-8'));
Expand Down