Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[*.{js,jsx,ts,tsx}]
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 100
8 changes: 8 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
NEXT_PUBLIC_WEBSITE_URL = "http://localhost:3000"
NEXT_PUBLIC_LOCALHOST = "localhost"
NEXT_PUBLIC_FALLBACK_LANGUAGE = "en"
NEXT_PUBLIC_GRAPHQL_API_URL = "https://localhost/api/graphql"
NEXT_PUBLIC_API_URL = "https://yourserver.io/api/"
NEXT_PUBLIC_VILNACRM_GMAIL = "info@vilnacrm.com"
NEXT_PUBLIC_STORYBOOK_URL = "http://localhost:6006"
MEMLAB_WEBSITE_URL = "http://localhost:3000"
143 changes: 143 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
module.exports = {
root: true,
env: {
node: true,
es6: true,
jest: true,
browser: true,
},
parserOptions: { ecmaVersion: 2022, sourceType: 'module' },
ignorePatterns: [
'node_modules/*',
'docker-compose.yml',
'pnpm-lock.yaml',
'build/*',
'coverage/*',
'storybook-static/*',
'scripts/*',
],
extends: [
'eslint:recommended',
'plugin:storybook/recommended',
'airbnb',
'airbnb/hooks',
'prettier',
],
overrides: [
{
files: ['**/*.ts', '**/*.tsx', '**/*.spec.js', '**/*.spec.jsx'],
parser: '@typescript-eslint/parser',
settings: {
react: { version: 'detect' },
'import/resolver': {
node: {
extensions: ['.ts', '.tsx', '.js', ',jsx'],
},
typescript: {},
},
},
env: {
browser: true,
node: true,
es6: true,
},
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'plugin:jest-dom/recommended',
'plugin:eslint-comments/recommended',
],
rules: {
'eslint-comments/no-use': ['error', { allow: [] }],
'react/jsx-no-bind': 'warn',
'no-await-in-loop': 'warn',
'no-restricted-syntax': 'warn',
'no-alert': 'error',
'no-console': 'error',
'import/prefer-default-export': 'warn',
'max-len': ['error', { code: 150 }],
'no-restricted-imports': [
'error',
{
patterns: ['@/features/*/*'],
},
],
'no-extra-semi': 'off',
'class-methods-use-this': 'off',
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
'no-multiple-empty-lines': [2, { max: 2, maxEOF: 0 }],
'linebreak-style': ['error', 'unix'],

'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
'newlines-between': 'always',
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
'import/default': 'off',
'import/no-named-as-default-member': 'off',
'import/no-named-as-default': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': 'off',
'import/extensions': 'off',
'react/prop-types': 'off',
'react/jsx-props-no-spreading': 'warn',
'react/react-in-jsx-scope': 'off',

'react/jsx-filename-extension': ['error', { extensions: ['.jsx', '.tsx'] }],

'jsx-a11y/anchor-is-valid': 'off',

'@typescript-eslint/no-unused-vars': ['error'],
'@typescript-eslint/semi': ['error', 'always'],
'@typescript-eslint/member-delimiter-style': [
'error',
{
overrides: {
interface: {
multiline: {
delimiter: 'semi',
requireLast: true,
},
},
},
},
],
'@typescript-eslint/typedef': [
'error',
{
variableDeclaration: true,
variableDeclarationIgnoreFunction: false,
arrayDestructuring: false,
objectDestructuring: false,
propertyDeclaration: true,
memberVariableDeclaration: true,
},
],
'@typescript-eslint/explicit-member-accessibility': [
'error',
{
accessibility: 'explicit',
overrides: {
constructors: 'no-public',
},
},
],
'@typescript-eslint/member-ordering': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/explicit-module-boundary-types': ['off'],
'@typescript-eslint/no-empty-function': ['off'],
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-var-requires': ['off'],
},
},
],
};
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/but_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---

### Description

A clear and concise description of what the issue is about.

### Tasks

Include specific tasks in the order they need to be done. Include links to specific lines of code where the job should happen.

- [ ] Task 1
- [ ] Task 2
- [ ] Task 3

### Acceptance Criteria

Include specific criteria for how to prove that this issue will be done

- [ ] Task 1
- [ ] Task 2
- [ ] Task 3

Remember to use helpful labels and milestones
47 changes: 47 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!--- Provide a general summary of your changes in the Title above -->

## Description

<!--- Describe your changes in detail -->

## Related Issue

<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->

- [ ] My code follows the code style of this project.
- [ ] I have performed a self-review of my code.
- [ ] I have commented my code, particularly in hard-to-understand areas.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the [**CONTRIBUTING.md**](https://github.com/VilnaCRM-Org/frontend-ssr-template/blob/main/CONTRIBUTING.md) document.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
- [ ] You have only one commit (if not, squash them into one commit).
41 changes: 41 additions & 0 deletions .github/workflows/autoprerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: generate changelog and create pre release

on:
pull_request:
branches:
- main
paths-ignore:
- 'package.json'
- 'CHANGELOG.md'

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: 'main'

- name: Conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v3
with:
github-token: ${{ secrets.REPO_GITHUB_TOKEN }}
output-file: 'false'
version-file: 'package.json'
pre-release: 'true'

- name: Create Release
uses: actions/create-release@v1
if: ${{ steps.changelog.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.REPO_GITHUB_TOKEN }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
Loading
Loading