Skip to content

Commit

Permalink
[WIP] Fixes #28460 - adding eslint-plugin-foreman for styling
Browse files Browse the repository at this point in the history
  • Loading branch information
amirfefer committed Dec 11, 2019
1 parent beb2025 commit 40b80ab
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 30 deletions.
24 changes: 2 additions & 22 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,24 +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/.*']
}]
},
"settings": {
"import/resolver": {
"babel-module": {}
}
}
"plugins": ["@theforeman/foreman"],
"extends": ["plugin:@theforeman/foreman/core", "plugin:@theforeman/foreman/plugins"]
}
12 changes: 5 additions & 7 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": "node node_modules/.bin/jest --no-cache",
"test:watch": "node node_modules/.bin/jest --watchAll",
"test:current": "node node_modules/.bin/jest --watch",
Expand All @@ -22,7 +22,7 @@
"url": "http://projects.theforeman.org/projects/foreman-tasks/issues"
},
"dependencies": {
"@theforeman/vendor": "^1.4.0",
"@theforeman/vendor": "^3.6.4",
"c3": "^0.4.11",
"humanize-duration": "^3.20.1",
"react-intl": "^2.8.0"
Expand All @@ -31,10 +31,10 @@
"@storybook/addon-actions": "^5.0.1",
"@storybook/addon-knobs": "^5.0.1",
"@storybook/react": "^5.0.1",
"@theforeman/vendor-dev": "^1.4.0",
"@theforeman/vendor-dev": "^3.6.4",
"@theforeman/eslint-plugin-foreman": "3.6.4",
"babel-cli": "^6.10.1",
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.3",
"babel-jest": "^23.6.0",
"babel-loader": "^7.1.1",
"babel-plugin-dynamic-import-node": "^2.0.0",
Expand All @@ -49,9 +49,7 @@
"enzyme": "^3.4.0",
"enzyme-adapter-react-16": "^1.4.0",
"enzyme-to-json": "^3.2.1",
"eslint": "^4.10.0",
"eslint-import-resolver-babel-module": "^4.0.0",
"eslint-plugin-patternfly-react": "0.2.0",
"eslint": "6.7.2",
"identity-obj-proxy": "^3.0.0",
"jed": "^1.1.1",
"jest-cli": "^23.6.0",
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 @@ -31,7 +31,7 @@ const TasksTable = ({

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

const getSelectionController = () => {
const checkAllRowsSelected = () => results.length === selectedRows.length;
Expand Down
1 change: 1 addition & 0 deletions webpack/test_setup.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import 'babel-polyfill';

import { configure } from 'enzyme';
Expand Down

0 comments on commit 40b80ab

Please sign in to comment.