Skip to content

Commit

Permalink
Updated templates
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksSavelev committed Oct 3, 2024
1 parent 8fd0ca0 commit a696fc0
Show file tree
Hide file tree
Showing 24 changed files with 123 additions and 247 deletions.
42 changes: 42 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";

export default [
{
ignores: [
"**/node_modules",
"**/dist",
"**/templates",
"**/spec",
"**/.eslintrc.json",
"**/lib",
"**/bin",
],
},
{
plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
globals: {
...globals.node,
},

parser: tsParser,
ecmaVersion: 2023,
sourceType: "module",

parserOptions: {
project: "tsconfig.json",
tsconfigRootDir: ".",
},
},

rules: {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
},
}
];
79 changes: 0 additions & 79 deletions templates/visuals/_global/tslint.json

This file was deleted.

5 changes: 0 additions & 5 deletions templates/visuals/default/.eslintignore

This file was deleted.

20 changes: 0 additions & 20 deletions templates/visuals/default/.eslintrc.js

This file was deleted.

8 changes: 8 additions & 0 deletions templates/visuals/default/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import powerbiVisualsConfigs from "eslint-plugin-powerbi-visuals";

export default [
powerbiVisualsConfigs.configs.recommended,
{
ignores: ["node_modules/**", "dist/**", ".vscode/**", ".tmp/**"],
},
];
18 changes: 9 additions & 9 deletions templates/visuals/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
"pbiviz": "pbiviz",
"start": "pbiviz start",
"package": "pbiviz package",
"lint": "npx eslint . --ext .js,.jsx,.ts,.tsx"
"lint": "npx eslint ."
},
"dependencies": {
"@types/d3": "7.4.0",
"d3": "7.8.5",
"powerbi-visuals-api": "5.4.0",
"powerbi-visuals-utils-formattingmodel": "6.0.0"
"@types/d3": "7.4.3",
"d3": "7.9.0",
"powerbi-visuals-api": "5.11.0",
"powerbi-visuals-utils-formattingmodel": "6.0.4"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.59.11",
"eslint": "^8.42.0",
"eslint-plugin-powerbi-visuals": "^0.8.1",
"typescript": "4.9.3"
"@typescript-eslint/eslint-plugin": "^8.8.0",
"eslint": "^9.11.1",
"eslint-plugin-powerbi-visuals": "^1.0.0",
"typescript": "5.5.4"
}
}
5 changes: 0 additions & 5 deletions templates/visuals/rhtml/.eslintignore

This file was deleted.

20 changes: 0 additions & 20 deletions templates/visuals/rhtml/.eslintrc.js

This file was deleted.

8 changes: 8 additions & 0 deletions templates/visuals/rhtml/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import powerbiVisualsConfigs from "eslint-plugin-powerbi-visuals";

export default [
powerbiVisualsConfigs.configs.recommended,
{
ignores: ["node_modules/**", "dist/**", ".vscode/**", ".tmp/**"],
},
];
14 changes: 7 additions & 7 deletions templates/visuals/rhtml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
"powerbi-visuals-utils-formattingmodel": "6.0.0"
},
"devDependencies": {
"powerbi-visuals-api": "5.4.0",
"ts-loader": "9.4.3",
"@typescript-eslint/eslint-plugin": "^5.59.11",
"eslint": "^8.42.0",
"eslint-plugin-powerbi-visuals": "^0.8.1",
"typescript": "5.1.3"
"powerbi-visuals-api": "5.11.0",
"ts-loader": "9.5.1",
"@typescript-eslint/eslint-plugin": "^8.8.0",
"eslint": "^9.11.1",
"eslint-plugin-powerbi-visuals": "^1.0.0",
"typescript": "5.5.4"
},
"scripts": {
"pbiviz": "pbiviz",
"start": "pbiviz start",
"package": "pbiviz package",
"lint": "npx eslint . --ext .js,.jsx,.ts,.tsx"
"lint": "npx eslint ."
}
}
2 changes: 1 addition & 1 deletion templates/visuals/rhtml/src/htmlInjectionUtility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function createScriptNode(refNode: Element): HTMLElement {
};
}
}
// tslint:disable-next-line

script.innerHTML = refNode.innerHTML;
return script;
}
Expand Down
2 changes: 0 additions & 2 deletions templates/visuals/rhtml/src/visual.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ export class Visual implements IVisual {
}

public onResizing(finalViewport: IViewport): void {
// tslint:disable-next-line
/* add code to handle resizing of the view port */
}

Expand All @@ -146,7 +145,6 @@ export class Visual implements IVisual {
// create 'virtual' HTML, so parsing is easier
let el: HTMLHtmlElement = document.createElement("html");
try {
// tslint:disable-next-line
el.innerHTML = window.atob(payloadBase64);
} catch (err) {
return;
Expand Down
5 changes: 0 additions & 5 deletions templates/visuals/rvisual/.eslintignore

This file was deleted.

20 changes: 0 additions & 20 deletions templates/visuals/rvisual/.eslintrc.js

This file was deleted.

8 changes: 8 additions & 0 deletions templates/visuals/rvisual/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import powerbiVisualsConfigs from "eslint-plugin-powerbi-visuals";

export default [
powerbiVisualsConfigs.configs.recommended,
{
ignores: ["node_modules/**", "dist/**", ".vscode/**", ".tmp/**"],
},
];
12 changes: 6 additions & 6 deletions templates/visuals/rvisual/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
"powerbi-visuals-utils-formattingmodel": "6.0.0"
},
"devDependencies": {
"powerbi-visuals-api": "5.4.0",
"@typescript-eslint/eslint-plugin": "^5.59.11",
"eslint": "^8.42.0",
"eslint-plugin-powerbi-visuals": "^0.8.1",
"typescript": "4.9.3"
"powerbi-visuals-api": "5.11.0",
"@typescript-eslint/eslint-plugin": "^8.8.0",
"eslint": "^9.11.1",
"eslint-plugin-powerbi-visuals": "^1.0.0",
"typescript": "5.5.4"
},
"scripts": {
"pbiviz": "pbiviz",
"start": "pbiviz start",
"package": "pbiviz package",
"lint": "tslint -c tslint.json -p tsconfig.json"
"lint": "eslint ."
}
}
5 changes: 0 additions & 5 deletions templates/visuals/slicer/.eslintignore

This file was deleted.

20 changes: 0 additions & 20 deletions templates/visuals/slicer/.eslintrc.js

This file was deleted.

8 changes: 8 additions & 0 deletions templates/visuals/slicer/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import powerbiVisualsConfigs from "eslint-plugin-powerbi-visuals";

export default [
powerbiVisualsConfigs.configs.recommended,
{
ignores: ["node_modules/**", "dist/**", ".vscode/**", ".tmp/**"],
},
];
Loading

0 comments on commit a696fc0

Please sign in to comment.