Skip to content
This repository was archived by the owner on Sep 10, 2022. It is now read-only.

Commit b5b6c47

Browse files
authored
Merge pull request #169 from halkeye/rewrite
Updates to frontend
2 parents 2263206 + fed8618 commit b5b6c47

File tree

30 files changed

+3211
-1494
lines changed

30 files changed

+3211
-1494
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,5 @@ build/
4040
/node_modules/
4141
frontend/build
4242
frontend/node_modules
43+
public/
44+
tmp/

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
charset = utf-8
7+
trim_trailing_whitespace = false
8+
insert_final_newline = false

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
HELP.md
22
target/
3+
.mvn/
34
!.mvn/wrapper/maven-wrapper.jar
5+
.git
6+
.cache
7+
Jenkinsfile
8+
LICENSE
49

510
### STS ###
611
.apt_generated
@@ -27,3 +32,13 @@ build/
2732

2833
### VS Code ###
2934
.vscode/
35+
36+
# ignore all *.class files in all folders, including build root
37+
*.class
38+
39+
# ignore node_modules
40+
/node_modules/
41+
frontend/build
42+
frontend/node_modules
43+
public/
44+
tmp/

Dockerfile.infra

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ COPY frontend/ /build/
1818
ENV REACT_APP_API_URL /
1919
RUN npm run build
2020

21-
FROM openjdk:8-jre-alpine
21+
FROM maven:3.6.0-jdk-8-alpine
2222

2323
LABEL maintainer="[email protected]"
2424

frontend/.env

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
REACT_APP_GITHUB_COMMUNITY_URL=https://api.github.com/repos/sladyn98/custom-distribution-service-community-configurations/contents/configurations
2-
REACT_APP_API_URL=/
1+
REACT_APP_GITHUB_COMMUNITY_REPO=halkeye/custom-distribution-service-community-configurations
2+
REACT_APP_API_URL=/
3+
#DEV_API_SERVER_PROXY=https://customize.jenkins-infra.g4v.dev/

frontend/.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!.eslintrc.js

frontend/.eslintrc.js

Lines changed: 47 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,49 @@
11
module.exports = {
2-
"env": {
3-
"browser": true,
4-
"es6": true
5-
},
6-
"extends": ["eslint:recommended", "react-app", "plugin:jsx-a11y/recommended"],
7-
"plugins": ["import","jsx-a11y"],
8-
"parserOptions": {
9-
"ecmaVersion": 2018,
10-
"sourceType": "module"
11-
},
12-
"rules": {
13-
"no-console": "warn",
14-
"no-eval": "error",
15-
"import/first": "error"
16-
},
17-
"overrides": [
18-
{
19-
"files": ["__tests__/**/*.js(x)?"],
20-
"plugins": ["jest"],
21-
"env": {
22-
"jest": true
23-
}
24-
}
25-
]
2+
extends: [
3+
'react-app',
4+
'eslint:recommended',
5+
'plugin:react/recommended',
6+
'plugin:jsx-a11y/recommended',
7+
],
8+
overrides: [
9+
{
10+
env: {
11+
jest: true
12+
},
13+
files: ['__tests__/**/*.js(x)?'],
14+
plugins: ['jest'],
15+
}
16+
],
17+
parserOptions: {
18+
ecmaVersion: 2018,
19+
sourceType: 'module'
20+
},
21+
plugins: [
22+
'import',
23+
'jsx-a11y',
24+
'react',
25+
'eslint-plugin-no-inline-styles'
26+
],
27+
rules: {
28+
'array-callback-return': 'error',
29+
eqeqeq: 'error',
30+
'import/first': 'error',
31+
indent: ['error', 4],
32+
'keyword-spacing': ['error', { after: true, before: true }],
33+
'no-console': 'warn',
34+
'no-eval': 'error',
35+
// 'no-inline-styles/no-inline-styles': ['error'],
36+
'no-new-object': 'error',
37+
'no-unused-vars': 'error',
38+
'no-var': ['error'],
39+
'prefer-template': ['error'],
40+
'quote-props': ['error', 'as-needed'],
41+
quotes: ['error', 'single'],
42+
'react/jsx-curly-spacing': ['error', {allowMultiline: true, when: 'always'}],
43+
'react/jsx-equals-spacing': ['error', 'never'],
44+
'react/no-unknown-property': ['error'],
45+
semi: ['error', 'never'],
46+
// 'sort-keys': ['error', 'asc', {caseSensitive: true, minKeys: 2, natural: false}],
47+
},
48+
2649
}

frontend/.stylelintrc.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"extends": "stylelint-config-standard",
3+
"plugins": ["stylelint-a11y"],
4+
"rules": {
5+
"a11y/media-prefers-reduced-motion": [true, { "severity": "warning" }],
6+
"a11y/no-outline-none": true,
7+
"a11y/selector-pseudo-class-focus": true,
8+
"a11y/content-property-no-static-value": [true, { "severity": "warning" }],
9+
"a11y/font-size-is-readable": [true, { "severity": "warning" }],
10+
"a11y/line-height-is-vertical-rhythmed": [true, { "severity": "warning" }],
11+
"a11y/no-display-none": [true, { "severity": "warning" }],
12+
"a11y/no-spread-text": [true, { "severity": "warning" }],
13+
"a11y/no-obsolete-attribute": [true, { "severity": "warning" }],
14+
"a11y/no-obsolete-element": [true, { "severity": "warning" }],
15+
"a11y/no-text-align-justify": [true, { "severity": "warning" }],
16+
"a11y/media-prefers-color-scheme": [true, { "severity": "warning" }],
17+
"indentation": 4
18+
}
19+
}

frontend/config-overrides.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// config-overrides.js
2+
3+
const StylelintPlugin = require('stylelint-webpack-plugin')
4+
5+
module.exports = {
6+
webpack: function (config, env) {
7+
if (env === 'development') {
8+
config.plugins.push(
9+
new StylelintPlugin({
10+
// options here
11+
})
12+
)
13+
}
14+
15+
return config
16+
}
17+
// jest: function(config) {
18+
// // customize jest here
19+
// return config;
20+
// },
21+
// devServer: function(configFunction) {
22+
// return function(proxy, host) {
23+
// // customize devServer config here
24+
// return config;
25+
// }
26+
// }
27+
}
28+

0 commit comments

Comments
 (0)