Skip to content

Commit

Permalink
Run spell-checker over JavaScript files for each PR (#327)
Browse files Browse the repository at this point in the history
* Add eslint spell-checker plugin and npm command to run it

* Fix typo in chart id: "donunt" -> "donut"
  • Loading branch information
mirekdlugosz committed Sep 3, 2020
1 parent 3839714 commit e06b521
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 5 deletions.
33 changes: 31 additions & 2 deletions .eslintrc
@@ -1,7 +1,36 @@
{
"plugins": ["@theforeman/foreman"],
"plugins": [
"@theforeman/foreman",
"spellcheck"
],
"extends": [
"plugin:@theforeman/foreman/core",
"plugin:@theforeman/foreman/plugins"
]
],
"rules": {
"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
}
]
}
}
4 changes: 3 additions & 1 deletion .github/workflows/js_tests.yml
Expand Up @@ -23,7 +23,9 @@ jobs:
- name: Install plugin npm dependencies
run: npm install
- name: Run plugin linter
run: npm run lint
run: |
npm run lint
npm run lint:spelling
- name: Run plugin tests
run: npm run test
- name: Publish Coveralls
Expand Down
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -5,6 +5,7 @@
"main": "index.js",
"scripts": {
"lint": "tfm-lint --plugin -d /webpack",
"lint:spelling": "eslint ./",
"test": "tfm-test --plugin",
"test:watch": "tfm-test --plugin --watchAll",
"test:current": "tfm-test --plugin --watch",
Expand Down Expand Up @@ -32,6 +33,7 @@
"@theforeman/eslint-plugin-foreman": "^4.0.2",
"babel-eslint": "^10.0.0",
"eslint": "^6.7.2",
"eslint-plugin-spellcheck": "^0.0.17",
"prettier": "^1.13.5",
"raf": "^3.4.0",
"stylelint": "^9.3.0",
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

0 comments on commit e06b521

Please sign in to comment.