Skip to content

Commit

Permalink
Fixes #28460 - adding eslint-plugin-foreman for styling
Browse files Browse the repository at this point in the history
  • Loading branch information
amirfefer committed Jan 13, 2020
1 parent f781e3e commit 01dbb91
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 32 deletions.
28 changes: 2 additions & 26 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
{
"plugins": ["patternfly-react"],
"extends": [
"plugin:patternfly-react/recommended",
"./node_modules/@theforeman/vendor-dev/eslint.extends.js"
],
"rules": {
"prettier/prettier": [
"error",
{
"singleQuote": true,
"trailingComma": "es5"
}
],
"import/no-unresolved": [
"error",
{
"ignore": ["foremanReact/.*"]
}
],
"import/extensions": [
"error",
{
"ignore": ["foremanReact/.*"]
}
]
}
"plugins": ["@theforeman/foreman"],
"extends": ["plugin:@theforeman/foreman/core", "plugin:@theforeman/foreman/plugins"]
}
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Foreman Tasks =============",
"main": "index.js",
"scripts": {
"lint": "./node_modules/.bin/eslint -c .eslintrc webpack/",
"lint": "tfm-lint --plugin -d /webpack",
"test": "tfm-test --plugin",
"test:watch": "tfm-test --plugin --watchAll",
"test:current": "tfm-test --plugin --watch",
Expand Down Expand Up @@ -32,13 +32,12 @@
"devDependencies": {
"@babel/core": "^7.7.0",
"@theforeman/builder": "^4.0.2",
"@theforeman/eslint-plugin-foreman": "4.0.5",
"@theforeman/stories": "^4.0.2",
"@theforeman/test": "^4.0.2",
"@theforeman/vendor-dev": "^4.0.2",
"babel-eslint": "^10.0.3",
"eslint": "^4.10.0",
"eslint-import-resolver-babel-module": "^5.1.0",
"eslint-plugin-patternfly-react": "0.2.0",
"eslint": "^6.7.2",
"identity-obj-proxy": "^3.0.0",
"jed": "^1.1.1",
"prettier": "^1.13.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { testComponentSnapshotsWithFixtures } from '@theforeman/test';;
import { testComponentSnapshotsWithFixtures } from '@theforeman/test';

import { TASKS_DONUT_CHART_FOCUSED_ON_OPTIONS_ARRAY } from './TasksDonutChartConstants';
import TasksDonutChart from './TasksDonutChart';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable react-hooks/rules-of-hooks */
import React, { useState } from 'react';
import { select, action } from '@theforeman/stories';

Expand Down
2 changes: 1 addition & 1 deletion webpack/ForemanTasks/Components/TasksTable/TasksTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const TasksTable = ({

useEffect(() => {
getTableItems(url);
}, [history.location.search]);
}, [getTableItems, url]);

const getSelectionController = () => {
const checkAllRowsSelected = () => results.length === selectedRows.length;
Expand Down

0 comments on commit 01dbb91

Please sign in to comment.