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

Commit

Permalink
Merge pull request #169 from halkeye/rewrite
Browse files Browse the repository at this point in the history
Updates to frontend
  • Loading branch information
halkeye authored Sep 29, 2020
2 parents 2263206 + fed8618 commit b5b6c47
Show file tree
Hide file tree
Showing 30 changed files with 3,211 additions and 1,494 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ build/
/node_modules/
frontend/build
frontend/node_modules
public/
tmp/
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
HELP.md
target/
.mvn/
!.mvn/wrapper/maven-wrapper.jar
.git
.cache
Jenkinsfile
LICENSE

### STS ###
.apt_generated
Expand All @@ -27,3 +32,13 @@ build/

### VS Code ###
.vscode/

# ignore all *.class files in all folders, including build root
*.class

# ignore node_modules
/node_modules/
frontend/build
frontend/node_modules
public/
tmp/
2 changes: 1 addition & 1 deletion Dockerfile.infra
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ COPY frontend/ /build/
ENV REACT_APP_API_URL /
RUN npm run build

FROM openjdk:8-jre-alpine
FROM maven:3.6.0-jdk-8-alpine

LABEL maintainer="sladynnunes98@gmail.com"

Expand Down
5 changes: 3 additions & 2 deletions frontend/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
REACT_APP_GITHUB_COMMUNITY_URL=https://api.github.com/repos/sladyn98/custom-distribution-service-community-configurations/contents/configurations
REACT_APP_API_URL=/
REACT_APP_GITHUB_COMMUNITY_REPO=halkeye/custom-distribution-service-community-configurations
REACT_APP_API_URL=/
#DEV_API_SERVER_PROXY=https://customize.jenkins-infra.g4v.dev/
1 change: 1 addition & 0 deletions frontend/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.eslintrc.js
71 changes: 47 additions & 24 deletions frontend/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,49 @@
module.exports = {
"env": {
"browser": true,
"es6": true
},
"extends": ["eslint:recommended", "react-app", "plugin:jsx-a11y/recommended"],
"plugins": ["import","jsx-a11y"],
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"no-console": "warn",
"no-eval": "error",
"import/first": "error"
},
"overrides": [
{
"files": ["__tests__/**/*.js(x)?"],
"plugins": ["jest"],
"env": {
"jest": true
}
}
]
extends: [
'react-app',
'eslint:recommended',
'plugin:react/recommended',
'plugin:jsx-a11y/recommended',
],
overrides: [
{
env: {
jest: true
},
files: ['__tests__/**/*.js(x)?'],
plugins: ['jest'],
}
],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
},
plugins: [
'import',
'jsx-a11y',
'react',
'eslint-plugin-no-inline-styles'
],
rules: {
'array-callback-return': 'error',
eqeqeq: 'error',
'import/first': 'error',
indent: ['error', 4],
'keyword-spacing': ['error', { after: true, before: true }],
'no-console': 'warn',
'no-eval': 'error',
// 'no-inline-styles/no-inline-styles': ['error'],
'no-new-object': 'error',
'no-unused-vars': 'error',
'no-var': ['error'],
'prefer-template': ['error'],
'quote-props': ['error', 'as-needed'],
quotes: ['error', 'single'],
'react/jsx-curly-spacing': ['error', {allowMultiline: true, when: 'always'}],
'react/jsx-equals-spacing': ['error', 'never'],
'react/no-unknown-property': ['error'],
semi: ['error', 'never'],
// 'sort-keys': ['error', 'asc', {caseSensitive: true, minKeys: 2, natural: false}],
},

}
19 changes: 19 additions & 0 deletions frontend/.stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"extends": "stylelint-config-standard",
"plugins": ["stylelint-a11y"],
"rules": {
"a11y/media-prefers-reduced-motion": [true, { "severity": "warning" }],
"a11y/no-outline-none": true,
"a11y/selector-pseudo-class-focus": true,
"a11y/content-property-no-static-value": [true, { "severity": "warning" }],
"a11y/font-size-is-readable": [true, { "severity": "warning" }],
"a11y/line-height-is-vertical-rhythmed": [true, { "severity": "warning" }],
"a11y/no-display-none": [true, { "severity": "warning" }],
"a11y/no-spread-text": [true, { "severity": "warning" }],
"a11y/no-obsolete-attribute": [true, { "severity": "warning" }],
"a11y/no-obsolete-element": [true, { "severity": "warning" }],
"a11y/no-text-align-justify": [true, { "severity": "warning" }],
"a11y/media-prefers-color-scheme": [true, { "severity": "warning" }],
"indentation": 4
}
}
28 changes: 28 additions & 0 deletions frontend/config-overrides.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// config-overrides.js

const StylelintPlugin = require('stylelint-webpack-plugin')

module.exports = {
webpack: function (config, env) {
if (env === 'development') {
config.plugins.push(
new StylelintPlugin({
// options here
})
)
}

return config
}
// jest: function(config) {
// // customize jest here
// return config;
// },
// devServer: function(configFunction) {
// return function(proxy, host) {
// // customize devServer config here
// return config;
// }
// }
}

Loading

0 comments on commit b5b6c47

Please sign in to comment.