FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore(react-docs): resolved existing linting errors by evwilkin · Pull Request #3715 · patternfly/patternfly-react · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .js  (5) .json  (1) dotfile  (1) All 3 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
1 change: 1 addition & 0 deletions .eslintcache

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
This file contains hidden or 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
Expand Up @@ -100,7 +100,7 @@
"generate": "yarn plop",
"lint:md": "yarn eslint packages/patternfly-4 --ext md --no-eslintrc --config .eslintrc-md.json --cache",
"lint:style": "stylelint \"**/sass/**/*.scss\" \"!**/dist/**/*.scss\"",
"lint:ts": "node --max-old-space-size=4096 node_modules/.bin/eslint packages/patternfly-4/react-core packages/patternfly-4/react-table packages/patternfly-4/react-topology packages/patternfly-4/react-catalog-view-extension --ext js,jsx,ts,tsx --cache",
"lint:ts": "node --max-old-space-size=4096 node_modules/.bin/eslint packages/patternfly-4/react-core packages/patternfly-4/react-table packages/patternfly-4/react-topology packages/patternfly-4/react-catalog-view-extension packages/patternfly-4/react-docs --ext js,jsx,ts,tsx --cache",
"lint:versions": "node ./packages/patternfly-4/verifyCoreVersions.js",
"prettier": "node node_modules/.bin/prettier --write \"storybook/**/*.{js,ts,tsx}\" \"packages/**/*.{js,ts,tsx}\" \"scripts/**/*.{js,ts,tsx}\"",
"serve:docs": "lerna run serve",
Expand Down
This file contains hidden or 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
Expand Up @@ -15,4 +15,3 @@ import '@patternfly/patternfly/patternfly.css';

// Utilities
import '@patternfly/patternfly/patternfly-addons.css';

8 changes: 3 additions & 5 deletions packages/patternfly-4/react-docs/gatsby-config.js
This file contains hidden or 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
Expand Up @@ -19,12 +19,10 @@ module.exports = {
{ section: 'components' },
{ section: 'demos' },
{ section: 'extensions' },
{ section: 'layouts' },
{ section: 'layouts' }
]
},
topNavItems: [
{ text: 'Icons', path: '/icons' },
],
topNavItems: [{ text: 'Icons', path: '/icons' }]
}
},
// Source shared pages from the theme
Expand Down Expand Up @@ -95,6 +93,6 @@ module.exports = {
}
},
// The plugin for package.json files (to get version numbers)
'gatsby-transformer-json',
'gatsby-transformer-json'
]
};
2 changes: 1 addition & 1 deletion packages/patternfly-4/react-docs/gatsby-node.js
This file contains hidden or 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
Expand Up @@ -3,4 +3,4 @@ const { mdxTypeDefs } = require('gatsby-theme-patternfly-org');
// https://www.gatsbyjs.org/docs/schema-customization/
exports.createSchemaCustomization = ({ actions }) => {
actions.createTypes(mdxTypeDefs);
}
};
34 changes: 25 additions & 9 deletions packages/patternfly-4/react-docs/src/pages/icons.js
This file contains hidden or 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,17 @@
import React from 'react';
import { Title } from '@patternfly/react-core/dist/js/components/Title/Title'
import { Tooltip } from '@patternfly/react-core/dist/js/components/Tooltip/Tooltip'
import { Text } from '@patternfly/react-core/dist/js/components/Text/Text'
import { Grid } from '@patternfly/react-core/dist/js/layouts/Grid/Grid'
import { GridItem } from '@patternfly/react-core/dist/js/layouts/Grid/GridItem'
import PropTypes from 'prop-types';
import { Title } from '@patternfly/react-core/dist/js/components/Title/Title';
import { Tooltip } from '@patternfly/react-core/dist/js/components/Tooltip/Tooltip';
import { Text } from '@patternfly/react-core/dist/js/components/Text/Text';
import { Grid } from '@patternfly/react-core/dist/js/layouts/Grid/Grid';
import { GridItem } from '@patternfly/react-core/dist/js/layouts/Grid/GridItem';
import { PageSection } from '@patternfly/react-core/dist/js/components/Page/PageSection';
import spacerMd from '@patternfly/react-tokens/dist/js/global_spacer_md';
import labelFontSize from '@patternfly/react-tokens/dist/js/global_FontSize_sm';
import * as IconsModule from '@patternfly/react-icons';
import { SideNavLayout } from 'gatsby-theme-patternfly-org/layouts';

export default ({ location }) => {
const iconsPage = ({ location }) => {
const allIcons = Object.entries(IconsModule)
.filter(([name]) => name.endsWith('Icon'))
.sort(([name1], [name2]) => name1.localeCompare(name2));
Expand Down Expand Up @@ -43,10 +44,19 @@ export default ({ location }) => {
return (
<SideNavLayout location={location} context="react">
<PageSection className="ws-section">
<Title size="md" className="ws-framework-title">React</Title>
<Title size="md" className="ws-framework-title">
React
</Title>
<Title size="4xl">Icons</Title>
<Text>These are all of the icons available for use in PatternFly React. For recommended icon usage, see our <a href="https://www.patternfly.org/v4/design-guidelines/styles/icons">icon usage guidelines</a>.</Text>
<Text>Learn how you can use them in the <a href="https://github.com/patternfly/patternfly-react/tree/master/packages/react-icons">react-icons docs</a>.</Text>
<Text>
These are all of the icons available for use in PatternFly React. For recommended icon usage, see our{' '}
<a href="https://www.patternfly.org/v4/design-guidelines/styles/icons">icon usage guidelines</a>.
</Text>
<Text>
Learn how you can use them in the{' '}
<a href="https://github.com/patternfly/patternfly-react/tree/master/packages/react-icons">react-icons docs</a>
.
</Text>
<Grid>
{allIcons.map(([id, Icon]) => (
<GridItem key={id} style={cellStyle} sm={6} md={4} lg={2}>
Expand All @@ -61,3 +71,9 @@ export default ({ location }) => {
</SideNavLayout>
);
};

iconsPage.propTypes = {
location: PropTypes.Object
};

export default iconsPage;
7 changes: 4 additions & 3 deletions packages/patternfly-4/react-docs/src/pages/index.js
This file contains hidden or 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 @@
import React from 'react';
import PropTypes from 'prop-types';
import { graphql } from 'gatsby';
import { Title } from '@patternfly/react-core/dist/js/components/Title/Title'
import { PageSection, PageSectionVariants } from '@patternfly/react-core/dist/js/components/Page/PageSection'
import { Title } from '@patternfly/react-core/dist/js/components/Title/Title';
import { PageSection, PageSectionVariants } from '@patternfly/react-core/dist/js/components/Page/PageSection';
import { SideNavLayout } from 'gatsby-theme-patternfly-org/layouts';

const containerStyle = {
Expand Down Expand Up @@ -51,7 +51,8 @@ const IndexPage = ({ data, location }) => {
};

IndexPage.propTypes = {
data: PropTypes.any.isRequired
data: PropTypes.any.isRequired,
location: PropTypes.Object
};

export const pageQuery = graphql`
Expand Down

Back | FazBrowse Home | New Git URL