Skip to content

Commit

Permalink
Merge pull request #11 from novasamatech/feat/onboarding-pages
Browse files Browse the repository at this point in the history
Feat: onboarding pages
  • Loading branch information
sokolova-an authored Dec 5, 2023
2 parents fd12689 + da6d906 commit 3ebd2a6
Show file tree
Hide file tree
Showing 68 changed files with 7,446 additions and 10,615 deletions.
87 changes: 87 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
const fs = require('fs');
const path = require('path');

const prettierConfig = fs.readFileSync('./.prettierrc', 'utf8');
const prettierOptions = JSON.parse(prettierConfig);
const checkI18n = process.env.I18N === 'true';
const localePath = path.resolve('./src/common/utils/locales/en.json');

module.exports = {
root: true,
env: {
browser: true,
node: true,
jest: true,
},
globals: {
JSX: 'readonly',
},
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:import/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:jest-dom/recommended',
'plugin:i18n-json/recommended',
'plugin:i18next/recommended',
'prettier',
],
plugins: ['@typescript-eslint', 'prettier', 'import', 'unused-imports', 'jest-dom', 'json'],
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
project: './tsconfig.json',
tsconfigRootDir: __dirname,
createDefaultProgram: true,
},
settings: {
react: { version: 'detect' },
'import/resolver': {
typescript: {},
},
},
rules: {
'no-unused-vars': 'error',
'no-irregular-whitespace': 'off',
'newline-before-return': 'error',
'@typescript-eslint/no-empty-interface': 0,
'prettier/prettier': ['error', prettierOptions],
'unused-imports/no-unused-imports': 'error',
'react/no-array-index-key': 'warn',
'react/display-name': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-sort-props': ['error', { callbacksLast: true, noSortAlphabetically: true }],
'react/function-component-definition': 'off',
'i18n-json/identical-keys': ['error', { filePath: localePath }],
'i18n-json/identical-placeholders': ['error', { filePath: localePath }],
'i18next/no-literal-string': [
checkI18n ? 'error' : 'off',
{
mode: 'jsx-text-only',
'should-validate-template': true,
'jsx-attributes': {
include: ['alt', 'aria-label', 'title', 'placeholder', 'label', 'description'],
exclude: ['data-testid', 'className'],
},
callees: {
exclude: ['Error', 'log', 'warn'],
},
words: {
exclude: ['[0-9!-/:-@[-`{-~]+', '[A-Z_-]+'],
},
},
],
},
ignorePatterns: [
'.vscode',
'coverage',
'release',
'node_modules',
'coverage.txt',
'junit.xml',
'jest-unit-results.json',
'package.json',
],
};
6 changes: 0 additions & 6 deletions .eslintrc.json

This file was deleted.

10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"printWidth": 120,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"useTabs": false,
"trailingComma": "all",
"arrowParens": "always",
"endOfLine": "auto"
}
43 changes: 43 additions & 0 deletions globals.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
declare module '*.css' {
const content: string;
export default content;
}

declare module '*.jpeg' {
const content: string;
export default content;
}

declare module '*.jpg' {
const content: string;
export default content;
}

declare module '*.png' {
const content: string;
export default content;
}

declare module '*.webp' {
const content: string;
export default content;
}

declare module '*.webm' {
const content: string;
export default content;
}

declare module '*.mp4' {
const content: string;
export default content;
}

declare module '*.svg' {
import React = require('react');
export const ReactComponent: React.FC<React.SVGProps<SVGSVGElement>>;
const content: string;
export default content;
}

declare module 'units-css';
12 changes: 9 additions & 3 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
async rewrites() {
// temporary disable
eslint: {
// Warning: This allows production builds to successfully complete even if
// your project has ESLint errors.
ignoreDuringBuilds: true,
},
async rewrites() {
return [
{
source: '/:any*',
destination: '/',
},
];
}
}
},
};

module.exports = nextConfig;
Loading

0 comments on commit 3ebd2a6

Please sign in to comment.