Skip to content

Commit

Permalink
[CP_24] - Add eslint spell-checker (#329)
Browse files Browse the repository at this point in the history
* Run spell-checker over JavaScript files for each PR (#327)

* Add eslint spell-checker plugin and npm command to run it

* Fix typo in chart id: "donunt" -> "donut"
(cherry picked from commit e06b521)

Conflicts:
	.eslintrc
	package.json

* Fix typo in hosts sync toast

(cherry picked from commit 3839714)

* Fix eslint spelling error in story styles

* Refactor lint script

Co-authored-by: Mirek Długosz <mzalewsk@redhat.com>
  • Loading branch information
Ron-Lavi and mirekdlugosz committed Sep 6, 2020
1 parent 6a3f509 commit c5992a6
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 6 deletions.
28 changes: 26 additions & 2 deletions .eslintrc
@@ -1,5 +1,5 @@
{
"plugins": ["patternfly-react"],
"plugins": ["patternfly-react", "spellcheck"],
"extends": ["plugin:patternfly-react/recommended"],
"rules": {
"prettier/prettier": ["error", {
Expand All @@ -11,7 +11,31 @@
}],
"import/extensions": ["error", {
"ignore": ['foremanReact/.*']
}]
}],
"spellcheck/spell-checker": [
"error",
{
"identifiers": false,
"ignoreRequire": true,
"skipWords": [
"ansible",
"donut",
"jed",
"katello",
"knowledgebase",
"noopener",
"noreferrer",
"nowrap",
"pid",
"redhat",
"repo",
"theforeman",
"tooltip",
"unmount"
],
"minLength": 3
}
]
},
"settings": {
"import/resolver": {
Expand Down
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -47,6 +47,8 @@
"eslint": "^4.10.0",
"eslint-import-resolver-babel-module": "^4.0.0",
"eslint-plugin-patternfly-react": "0.2.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-spellcheck": "^0.0.17",
"identity-obj-proxy": "^3.0.0",
"jed": "^1.1.1",
"jest-cli": "^23.6.0",
Expand Down
Expand Up @@ -8,7 +8,7 @@ const Toast = ({ syncHosts, disconnectHosts }) => {
return (
<span>
<p>
{__("Total org's hosts with subscriprion: ")}
{__('Hosts with subscription in organization: ')}
<strong>{totalHosts}</strong>
</p>
<p>
Expand Down
Expand Up @@ -27,7 +27,7 @@ const StatusChart = ({ completed }) => {
<Grid.Col sm={4}>
<div className="status-chart">
<DonutChart
id="donunt-chart-1"
id="donut-chart-1"
size={{
width: 210,
height: 210,
Expand Down
Expand Up @@ -43,7 +43,7 @@ exports[`StatusChart rendering render without Props 1`] = `
"width": 11,
}
}
id="donunt-chart-1"
id="donut-chart-1"
legend={
Object {
"show": false,
Expand Down
2 changes: 1 addition & 1 deletion webpack/stories/decorators/withCardsDecorator.js
Expand Up @@ -4,7 +4,7 @@ export const withCardsDecorator = storyFn => (
<div
style={{
width: '100%',
height: '100vh',
height: '100%',
backgroundColor: '#F5F5F5',
padding: '50px',
}}
Expand Down

0 comments on commit c5992a6

Please sign in to comment.