Skip to content

Commit 1174306

Browse files
authored
Merge pull request #357 from project-koku/release_prod-stable.94143
Deployment commit for prod-stable
2 parents b0cb5c5 + 09206c1 commit 1174306

File tree

13 files changed

+470
-265
lines changed

13 files changed

+470
-265
lines changed
File renamed without changes.
File renamed without changes.

eslint.config.mjs

+206
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
2+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
3+
import formatjs from "eslint-plugin-formatjs";
4+
import patternflyReact from "eslint-plugin-patternfly-react";
5+
import react from "eslint-plugin-react";
6+
import simpleImportSort from "eslint-plugin-simple-import-sort";
7+
import sortKeysFix from "eslint-plugin-sort-keys-fix";
8+
import testingLibrary from "eslint-plugin-testing-library";
9+
import globals from "globals";
10+
import path from "node:path";
11+
import { fileURLToPath } from "node:url";
12+
import js from "@eslint/js";
13+
import { FlatCompat } from "@eslint/eslintrc";
14+
// import prettier from "eslint-plugin-prettier";
15+
16+
const __filename = fileURLToPath(import.meta.url);
17+
const __dirname = path.dirname(__filename);
18+
const compat = new FlatCompat({
19+
baseDirectory: __dirname,
20+
recommendedConfig: js.configs.recommended,
21+
allConfig: js.configs.all
22+
});
23+
24+
export default [{
25+
ignores: [
26+
'**/node_modules',
27+
'**/public',
28+
'**/dist',
29+
'**/.DS_Store',
30+
'**/coverage',
31+
'**/npm-debug.log',
32+
'**/yarn-debug.log',
33+
'**/yarn-error.log',
34+
'**/.idea',
35+
'**/.project',
36+
'**/.classpath',
37+
'**/.c9',
38+
'**/*.launch',
39+
'**/.settings',
40+
'**/*.sublime-workspace',
41+
'**/.history',
42+
'**/.vscode',
43+
'**/.vscode',
44+
'**/*.swp',
45+
'**/*.test.ts',
46+
'**/*.test.tsx',
47+
],
48+
}, ...fixupConfigRules(compat.extends(
49+
'@redhat-cloud-services/eslint-config-redhat-cloud-services',
50+
'eslint:recommended', // Extended by eslint-config-redhat-cloud-services
51+
'plugin:@typescript-eslint/recommended',
52+
'plugin:react/recommended', // Extended by eslint-config-redhat-cloud-services
53+
'plugin:react-hooks/recommended',
54+
)), {
55+
plugins: {
56+
'@typescript-eslint': fixupPluginRules(typescriptEslint),
57+
formatjs,
58+
'patternfly-react': patternflyReact,
59+
// prettier, // Plugin defined by eslint-config-redhat-cloud-services
60+
react: fixupPluginRules(react),
61+
'simple-import-sort': simpleImportSort,
62+
'sort-keys-fix': sortKeysFix,
63+
'testing-library': testingLibrary,
64+
},
65+
66+
languageOptions: {
67+
globals: {
68+
...globals.browser,
69+
...globals.node,
70+
afterEach: 'readonly',
71+
beforeEach: 'readonly',
72+
describe: 'readonly',
73+
expect: 'readonly',
74+
global: 'writable',
75+
insights: 'readonly',
76+
it: 'readonly',
77+
jest: 'readonly',
78+
mount: 'readonly',
79+
render: 'readonly',
80+
require: 'readonly',
81+
test: 'readonly',
82+
shallow: 'readonly',
83+
},
84+
85+
ecmaVersion: 5,
86+
sourceType: 'module',
87+
88+
parserOptions: {
89+
ecmaFeatures: {
90+
jsx: true,
91+
},
92+
},
93+
},
94+
95+
settings: {
96+
react: {
97+
version: 'detect',
98+
},
99+
},
100+
101+
rules: {
102+
'@typescript-eslint/adjacent-overload-signatures': 'error',
103+
'@typescript-eslint/array-type': 'error',
104+
'@typescript-eslint/ban-types': 'error',
105+
'@typescript-eslint/camelcase': 'off',
106+
'@typescript-eslint/consistent-type-assertions': 'error',
107+
'@typescript-eslint/consistent-type-definitions': 'error',
108+
'@typescript-eslint/consistent-type-imports': 'error',
109+
'@typescript-eslint/explicit-function-return-type': 'off',
110+
'@typescript-eslint/explicit-module-boundary-types': 'off',
111+
'@typescript-eslint/explicit-member-accessibility': 'off',
112+
'@typescript-eslint/indent': 'off',
113+
'@typescript-eslint/no-empty-function': 'off',
114+
'@typescript-eslint/no-empty-interface': 'off',
115+
'@typescript-eslint/no-misused-new': 'error',
116+
'@typescript-eslint/no-namespace': 'error',
117+
'@typescript-eslint/no-var-requires': 'off',
118+
'@typescript-eslint/prefer-for-of': 'error',
119+
'@typescript-eslint/prefer-function-type': 'error',
120+
'@typescript-eslint/prefer-namespace-keyword': 'error',
121+
'@typescript-eslint/no-explicit-any': 'off',
122+
'@typescript-eslint/no-use-before-define': 'off',
123+
'@typescript-eslint/no-inferrable-types': 'off',
124+
'@typescript-eslint/triple-slash-reference': 'error',
125+
'@typescript-eslint/unified-signatures': 'error',
126+
127+
'arrow-parens': [2, 'as-needed', {
128+
requireForBlockBody: false,
129+
}],
130+
131+
'constructor-super': 'error',
132+
curly: 'error',
133+
'dot-notation': 'error',
134+
eqeqeq: ['error', 'smart'],
135+
// 'formatjs/enforce-default-message': 'error', // Not working -- see https://github.com/formatjs/formatjs/issues/4388
136+
// 'formatjs/enforce-description': 'error',
137+
// 'formatjs/enforce-id': 'error',
138+
'guard-for-in': 'error',
139+
'max-classes-per-file': ['error', 1],
140+
'max-len': 'off',
141+
'no-bitwise': 'error',
142+
'no-caller': 'error',
143+
'no-cond-assign': 'error',
144+
'no-console': 'error',
145+
'no-debugger': 'error',
146+
'no-empty': 'error',
147+
'no-eval': 'error',
148+
'no-new-wrappers': 'error',
149+
'no-prototype-builtins': 'off',
150+
151+
'no-restricted-imports': ['error', {
152+
patterns: ['../*/**'],
153+
}],
154+
155+
'no-shadow': 'error',
156+
'no-throw-literal': 'error',
157+
'no-trailing-spaces': 'off',
158+
'no-undef': 'off',
159+
'no-undef-init': 'error',
160+
'no-unsafe-finally': 'error',
161+
162+
'no-unused-expressions': ['error', {
163+
allowTernary: true,
164+
allowShortCircuit: true,
165+
}],
166+
167+
'no-unused-labels': 'error',
168+
'no-var': 'error',
169+
'object-shorthand': 'error',
170+
'one-var': ['error', 'never'],
171+
'patternfly-react/no-anonymous-functions': 0,
172+
'prefer-const': 'error',
173+
'prettier/prettier': 'error',
174+
radix: ['error', 'as-needed'],
175+
'react-hooks/exhaustive-deps': 0,
176+
'react/display-name': 0,
177+
178+
'react/no-unescaped-entities': ['error', {
179+
forbid: ['>', '}'],
180+
}],
181+
182+
'react/no-unknown-property': ['error', {
183+
ignore: ['key'],
184+
}],
185+
186+
'react/prop-types': 0,
187+
'simple-import-sort/imports': 'error',
188+
'spaced-comment': 'error',
189+
'rulesdir/disallow-pf-migrated-components': 'off',
190+
'rulesdir/forbid-pf-relative-imports': 'off',
191+
'testing-library/await-async-queries': 'error',
192+
'testing-library/no-await-sync-queries': 'error',
193+
// 'testing-library/no-debugging-utils': 'warn', // Not working -- see https://eslint.org/docs/latest/use/troubleshooting/v9-rule-api-changes
194+
'testing-library/no-dom-import': 'off',
195+
'use-isnan': 'error',
196+
},
197+
}, {
198+
files: ['src/locales/messages.ts'],
199+
200+
rules: {
201+
'sort-keys-fix/sort-keys-fix': 'error',
202+
},
203+
}, ...compat.extends('plugin:testing-library/react').map(config => ({
204+
...config,
205+
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
206+
}))];

locales/data.json

+17-7
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,7 @@
12571257
"notConfiguredTitle": [
12581258
{
12591259
"type": 0,
1260-
"value": "Optimizations not configured yet"
1260+
"value": "Optimizations may not be configured"
12611261
}
12621262
],
12631263
"notificationsAlertTitle": [
@@ -1326,12 +1326,6 @@
13261326
"value": "count"
13271327
}
13281328
],
1329-
"optimizationsInfo": [
1330-
{
1331-
"type": 0,
1332-
"value": "Assess and monitor your usage so you can optimize your OpenShift resources."
1333-
}
1334-
],
13351329
"optimizationsInfoArialLabel": [
13361330
{
13371331
"type": 0,
@@ -1344,6 +1338,22 @@
13441338
"value": "A dialog with a description of optimizations"
13451339
}
13461340
],
1341+
"optimizationsInfoDesc": [
1342+
{
1343+
"type": 0,
1344+
"value": "To receive these recommendations, you must first enable your namespaces. "
1345+
},
1346+
{
1347+
"type": 1,
1348+
"value": "learnMore"
1349+
}
1350+
],
1351+
"optimizationsInfoTitle": [
1352+
{
1353+
"type": 0,
1354+
"value": "Assess and monitor usage from all of your clusters and provides optimization recommendations."
1355+
}
1356+
],
13471357
"optimizationsLoadingStateDesc": [
13481358
{
13491359
"type": 0,

locales/translations.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,16 @@
4949
"notConfiguredCli": "In the CLI, run {clipboard}",
5050
"notConfiguredDesc": "To receive resource optimization recommendations for your namespaces, you must first enable each namespace.",
5151
"notConfiguredNamespace": "To enable a namespace, label it with {clipboard}",
52-
"notConfiguredTitle": "Optimizations not configured yet",
52+
"notConfiguredTitle": "Optimizations may not be configured",
5353
"notificationsAlertTitle": "Duration based notifications",
5454
"openShift": "OpenShift",
5555
"optimizations": "Optimizations",
5656
"optimizationsCost": "Cost optimizations",
5757
"optimizationsDetails": "{count, plural, =0 {No optimizations} =1 {{count} optimization} other {{count} optimizations}}",
58-
"optimizationsInfo": "Assess and monitor your usage so you can optimize your OpenShift resources.",
5958
"optimizationsInfoArialLabel": "A description of optimizations",
6059
"optimizationsInfoButtonArialLabel": "A dialog with a description of optimizations",
60+
"optimizationsInfoDesc": "To receive these recommendations, you must first enable your namespaces. {learnMore}",
61+
"optimizationsInfoTitle": "Assess and monitor usage from all of your clusters and provides optimization recommendations.",
6162
"optimizationsLoadingStateDesc": "Searching for your optimizations. Do not refresh the browser",
6263
"optimizationsLoadingStateTitle": "Looking for optimizations...",
6364
"optimizationsLongTerm": "Last 15 days",

0 commit comments

Comments
 (0)