-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
73 changed files
with
12,971 additions
and
7,174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"sourceType": "unambiguous", | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"chrome": 100 | ||
} | ||
} | ||
], | ||
"@babel/preset-typescript", | ||
"@babel/preset-react" | ||
], | ||
"plugins": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
src/copiedFromConsole |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
}, | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"plugin:react/recommended", | ||
"plugin:prettier/recommended", | ||
"plugin:storybook/recommended", | ||
], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
ecmaVersion: "2020", | ||
sourceType: "module", | ||
tsconfigRootDir: __dirname, | ||
project: ["./tsconfig.json"], | ||
}, | ||
plugins: ["@typescript-eslint", "react", "react-hooks", "import"], | ||
rules: { | ||
eqeqeq: ["error", "always"], | ||
indent: "off", | ||
"@typescript-eslint/naming-convention": [ | ||
"error", | ||
{ | ||
selector: "typeLike", | ||
format: ["PascalCase"], | ||
}, | ||
// Allowing for React components definitions | ||
{ | ||
selector: "function", | ||
format: ["PascalCase", "camelCase"], | ||
}, | ||
], | ||
"@typescript-eslint/ban-types": [ | ||
"error", | ||
{ | ||
types: { | ||
"{}": { | ||
message: "Use Record<string, unknown> instead", | ||
fixWith: "Record<string, unknown>", | ||
}, | ||
}, | ||
}, | ||
], | ||
"no-restricted-imports": [ | ||
"error", | ||
{ | ||
paths: [ | ||
{ | ||
name: "react-i18next", | ||
importNames: ["useTranslation"], | ||
message: | ||
"Please use useTranslation from src/hooks/useNodeHealthCheckTranslation.ts instead", | ||
}, | ||
], | ||
}, | ||
], | ||
"@typescript-eslint/no-explicit-any": [ | ||
"warn", | ||
{ | ||
fixToUnknown: true, | ||
}, | ||
], | ||
"@typescript-eslint/no-unsafe-assignment": "warn", | ||
"@typescript-eslint/no-misused-promises": "warn", | ||
"@typescript-eslint/no-unsafe-call": "warn", | ||
"@typescript-eslint/no-unsafe-argument": "warn", | ||
"@typescript-eslint/no-unsafe-member-access": "warn", | ||
"@typescript-eslint/no-unsafe-return": "warn", | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"@typescript-eslint/restrict-template-expressions": "warn", | ||
"react-hooks/rules-of-hooks": "error", | ||
"react/self-closing-comp": "error", | ||
"react/no-unescaped-entities": [ | ||
"error", | ||
{ | ||
forbid: [">", "}"], | ||
}, | ||
], | ||
"react-hooks/exhaustive-deps": "warn", | ||
"react/prop-types": "off", | ||
}, | ||
settings: { | ||
react: { | ||
version: "detect", | ||
}, | ||
}, | ||
ignorePatterns: [".eslintrc.js"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,5 +17,9 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Lint | ||
run: make lint | ||
|
||
- name: Test container build | ||
run: make docker-build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import type { StorybookConfig } from "@storybook/react-webpack5"; | ||
const config: StorybookConfig = { | ||
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-onboarding", | ||
"@storybook/addon-interactions", | ||
], | ||
framework: { | ||
name: "@storybook/react-webpack5", | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: "tag", | ||
}, | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type { Preview } from "@storybook/react"; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
extends: | ||
- stylelint-config-standard | ||
- stylelint-config-prettier | ||
rules: | ||
# Disallow color names and hex colors as these don't work well with dark mode. | ||
# Use PF global variables instead: | ||
# https://patternfly-react-main.surge.sh/developer-resources/global-css-variables#global-css-variables | ||
color-named: never | ||
color-no-hex: true | ||
# PatternFly CSS vars don't conform to stylelint's regex. Disable this rule. | ||
custom-property-pattern: null | ||
# Disable the standard rule to allow BEM-style classnames with underscores. | ||
selector-class-pattern: null | ||
# Plugins should avoid naked element selectors like `table` and `li` since | ||
# this can impact layout of existing pages in console. | ||
selector-max-type: | ||
- 0 | ||
- ignore: | ||
- compounded | ||
- descendant |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.