Skip to content

Commit

Permalink
Merge pull request #442 from funidata/DS-322-part-2
Browse files Browse the repository at this point in the history
[DEPS]: Update library's peer dependencies
  • Loading branch information
RiinaKuu authored Sep 23, 2024
2 parents 2e15106 + b977d51 commit 3abae82
Show file tree
Hide file tree
Showing 106 changed files with 1,412 additions and 1,366 deletions.
3 changes: 3 additions & 0 deletions ngx-fudis/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ trim_trailing_whitespace = true
[*.ts]
quote_type = single

[*.scss]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
32 changes: 0 additions & 32 deletions ngx-fudis/.eslintrc.yaml

This file was deleted.

77 changes: 38 additions & 39 deletions ngx-fudis/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,52 +1,51 @@
module.exports = {
stories: [
"../projects/ngx-fudis/src/lib/**/*.stories.ts",
"../projects/ngx-fudis/src/lib/**/*.stories.mdx",
"../projects/ngx-fudis/src/lib/**/*.docs.mdx",
"../projects/documentation/**/*.stories.mdx",
"../projects/documentation/**/*.docs.mdx",
],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/addon-a11y",
],
framework: {
name: "@storybook/angular",
options: {
enableIvy: true,
},
export const stories = [
"../projects/ngx-fudis/src/lib/**/*.stories.ts",
"../projects/ngx-fudis/src/lib/**/*.stories.mdx",
"../projects/ngx-fudis/src/lib/**/*.docs.mdx",
"../projects/documentation/**/*.stories.mdx",
"../projects/documentation/**/*.docs.mdx",
];
export const addons = [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/addon-a11y",
];
export const framework = {
name: "@storybook/angular",
options: {
enableIvy: true,
},
features: {
modernInlineRender: true,
previewMdx2: true,
},
staticDirs: [
"./../projects/ngx-fudis/src/lib/assets/fonts/fira/woff2",
"./../projects/ngx-fudis/src/lib/assets/images",
],
docs: {
autodocs: true,
defaultName: "Documentation",
},

// To inject custom rules for <head> element. E.g. hide one Story from sidebar, so it can be still used in component's Docs page
managerHead: (head) => `
};
export const features = {
modernInlineRender: true,
previewMdx2: true,
};
export const staticDirs = [
"./../projects/ngx-fudis/src/lib/assets/fonts/fira/woff2",
"./../projects/ngx-fudis/src/lib/assets/images",
];
export const docs = {
autodocs: true,
defaultName: "Documentation",
};
export function managerHead(head) {
return `
${head}
<link rel="shortcut icon" href="favicon.ico">
<style>
#components-description-list--description-list-compact { display: none;}
</style>
`,
// Rules for rendered canvas. E. g. if you need custom CSS classes in your Story's html
previewHead: (head) => `
`;
}
export function previewHead(head) {
return `
${head}
<style>
.storybook-flex {
display: flex;
align-items: center;
}
</style>
`,
};
`;
}
5 changes: 2 additions & 3 deletions ngx-fudis/.storybook/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"types": ["node"],
"types": ["node", "mdx"],
"allowSyntheticDefaultImports": true,
"skipLibCheck": true
},
Expand All @@ -11,6 +11,5 @@
"../projects/**/*.spec.ts",
"../projects/dev/**/*"
],
"include": ["../src/**/*", "../projects/**/*", "../stories/**/*"],
"files": ["./typings.d.ts"]
"include": ["../src/**/*", "../projects/**/*", "../stories/**/*"]
}
9 changes: 0 additions & 9 deletions ngx-fudis/.storybook/typings.d.ts

This file was deleted.

1 change: 1 addition & 0 deletions ngx-fudis/.storybook/useTheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const useTheme = (Story) => {
const [{ theme }] = useGlobals();

useEffect(() => {
// eslint-disable-next-line no-undef
document.body.setAttribute("data-theme", theme);
}, [theme]);

Expand Down
67 changes: 67 additions & 0 deletions ngx-fudis/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import tsParser from "@typescript-eslint/parser";
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
{
ignores: ["projects/ngx-fudis/coverage", "**/coverage", "**/dist", "**/static"],
},
...compat.extends("eslint:recommended"),
...compat
.extends(
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/eslint-plugin/recommended",
"prettier",
)
.map((config) => ({
...config,
files: ["**/*.ts"],
})),
{
files: ["**/*.ts"],

languageOptions: {
parser: tsParser,
ecmaVersion: 5,
sourceType: "script",

parserOptions: {
project: "tsconfig.json",
},
},
},
...compat.extends("prettier").map((config) => ({
...config,
files: ["**/transloco.config.js"],
})),
{
files: ["**/transloco.config.js"],

languageOptions: {
globals: {
...globals.node,
},
},
},
...compat
.extends(
"plugin:@angular-eslint/template/recommended",
"plugin:@angular-eslint/template/accessibility",
"prettier",
)
.map((config) => ({
...config,
files: ["**/*.html"],
})),
];
Loading

0 comments on commit 3abae82

Please sign in to comment.