Skip to content

Commit

Permalink
Merge pull request #17 from factrylabs/feature/release
Browse files Browse the repository at this point in the history
Feature/release
  • Loading branch information
pielambr authored Jan 8, 2021
2 parents 00cf9ad + 35a9582 commit d8c6926
Show file tree
Hide file tree
Showing 6 changed files with 2,358 additions and 969 deletions.
114 changes: 58 additions & 56 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,61 +1,63 @@
module.exports = {
'env': {
'browser': true,
'es6': true,
'jest': true
env: {
browser: true,
es6: true,
jest: true,
},
extends: [
'plugin:react/recommended',
'airbnb',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
'extends': [
'plugin:react/recommended',
'airbnb',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript'
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: [
'react',
'@typescript-eslint',
],
rules: {
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'react/jsx-filename-extension': 0,
'import/no-extraneous-dependencies': 0,
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'no-continue': 0,
'import/extensions': ['error', 'ignorePackages', {
js: 'never',
mjs: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
}],
},
settings: {
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'globals': {
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly'
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
},
},
'parser': '@typescript-eslint/parser',
'parserOptions': {
'ecmaFeatures': {
'jsx': true
},
'ecmaVersion': 2018,
'sourceType': 'module'
},
'plugins': [
'react',
'@typescript-eslint'
],
'rules': {
'react/jsx-filename-extension': 0,
'import/no-extraneous-dependencies': 0,
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'no-continue': 0,
'import/extensions': ['error', 'ignorePackages', {
js: 'never',
mjs: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
}],
},
'settings': {
'import/extensions': [
'error',
'ignorePackages',
{
'js': 'never',
'jsx': 'never',
'ts': 'never',
'tsx': 'never'
}
],
'import/resolver': {
'node': {
'extensions': ['.js', '.jsx', '.ts', '.tsx', '.json']
}
},
}
},
};
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

### v0.2.0
Update dependencies and fix panel editor not displaying on Grafana > v7.3.0

### v0.1.0
Initial release
33 changes: 18 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
{
"name": "@factry/untimely-panel",
"version": "0.1.1",
"version": "0.2.0",
"description": "Untimely Grafana panel",
"scripts": {
"build": "grafana-toolkit plugin:build",
"build": "grafana-toolkit plugin:build && grafana-toolkit plugin:sign",
"test": "grafana-toolkit plugin:test --coverage",
"dev": "grafana-toolkit plugin:dev",
"watch": "grafana-toolkit plugin:dev --watch"
},
"author": "Factry BV",
"license": "Apache-2.0",
"devDependencies": {
"@grafana/data": "^7.1.0",
"@grafana/toolkit": "^7.1.0",
"@grafana/ui": "^7.1.0",
"@grafana/data": "^7.3.6",
"@grafana/toolkit": "^7.3.6",
"@grafana/ui": "^7.3.6",
"@popperjs/core": "^2.6.0",
"@types/flot": "^0.0.31",
"@types/jquery": "^3.3.32",
"@types/react": "^16.9.19",
"@typescript-eslint/eslint-plugin": "^2.19.0",
"@typescript-eslint/parser": "^2.19.0",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.18.3",
"eslint-plugin-react-hooks": "^1.7.0",
"@types/react": "^17.0.0",
"@typescript-eslint/eslint-plugin": "^4.12.0",
"@typescript-eslint/parser": "^4.12.0",
"eslint": "^7.17.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"jquery": "^3.4.1",
"react": "^16.12.0"
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-popper": "^2.2.4"
}
}
6 changes: 3 additions & 3 deletions src/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ interface State {
xSerie?: XValue[];
}

interface Plot extends jquery.flot.plot {
interface Plot extends jquery.flot.plot { // eslint-disable-line
clearSelection(): void;
findNearbyItem(x: number, y: number, radius: number): any;
}

interface PlotOptions extends jquery.flot.plotOptions {
interface PlotOptions extends jquery.flot.plotOptions { // eslint-disable-line
selection: object;
}

export class Panel extends PureComponent<Props, State> {
element: HTMLElement | null = null;

$element: JQuery<HTMLElement> | null = null;
$element: JQuery<HTMLElement> | null = null; // eslint-disable-line

constructor(props: Props) {
super(props);
Expand Down
6 changes: 5 additions & 1 deletion src/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,11 @@ export class Tooltip extends PureComponent<Props, State> {
}

return ReactDOM.createPortal(
<Popper placement="right-start" referenceElement={virtualElement} modifiers={{ offset: { offset: '25,25' } }}>
<Popper
placement="right-start"
referenceElement={virtualElement}
modifiers={[{ name: 'offset', options: { offset: [25, 25] } }]}
>
{({
ref, style, placement, arrowProps,
}) => (
Expand Down
Loading

0 comments on commit d8c6926

Please sign in to comment.