Skip to content

Commit

Permalink
webflow iframe setup
Browse files Browse the repository at this point in the history
  • Loading branch information
ludvigalden committed Jan 23, 2024
1 parent 7cc563b commit d5a518c
Show file tree
Hide file tree
Showing 170 changed files with 22,298 additions and 2,294 deletions.
2 changes: 2 additions & 0 deletions front-end/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
WF_SITE_ID=655e29844518537470ba5b0f
# WF_SITE_TOKEN=
1 change: 1 addition & 0 deletions front-end/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!/*.cjs
101 changes: 54 additions & 47 deletions front-end/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ module.exports = {
],
overrides: [
{
files: ['*.ts', '*.tsx'],
files: ['*.{ts,tsx,js,jsx}'],
parser: '@typescript-eslint/parser',
rules: {
/**
* Allow `private get _propertyName()`.
Expand All @@ -31,21 +32,11 @@ module.exports = {
},
],

/**
* Allow the use of `any`.
*/
'@typescript-eslint/no-explicit-any': 'off',

/**
* Slow rules (and not that useful.)
*/
'@typescript-eslint/no-floating-promises': 'off',

/**
* Allow use of namespaces.
*/
'@typescript-eslint/no-namespace': 'off',

/**
* Do not allow unused variables.
*/
Expand Down Expand Up @@ -101,6 +92,54 @@ module.exports = {
},
],

/**
* Slow rules.
*/
'import/default': 'off',
'import/namespace': 'off',
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',

'no-void': 'off',

/* Replaced by @typescript-eslint */
'padding-line-between-statements': 'off',
},
},
{
files: ['*.{tsx,jsx}'],
rules: {
/**
* Allow use of `null` in React components.
*/
'@rushstack/no-new-null': 'off',

/**
* Allow defining React components without an explicit return-type.
*/
'@typescript-eslint/explicit-function-return-type': 'off',

'jsx-a11y/anchor-has-content': [
2,
{
components: ['Link'],
},
],
},
},
{
files: ['*.{ts,tsx}'],
rules: {
/**
* Allow the use of `any`.
*/
'@typescript-eslint/no-explicit-any': 'off',

/**
* Allow use of namespaces.
*/
'@typescript-eslint/no-namespace': 'off',

/**
* Sorting union (`|`) and intersection (`&`) types.
*/
Expand All @@ -123,27 +162,10 @@ module.exports = {
},
],

/**
* Slow rules.
*/
'import/default': 'off',
'import/namespace': 'off',
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',

'no-void': 'off',

/* Replaced by @typescript-eslint */
'padding-line-between-statements': 'off',
'typescript-sort-keys/interface': 'error',
'typescript-sort-keys/string-enum': 'error',
},
},
{
extends: ['plugin:jsonc/recommended-with-jsonc'],
files: ['*.json', '*.json5', '*.jsonc'],
parser: 'jsonc-eslint-parser',
},
{
/**
* Allow default exports have a different name than the file name for pages
Expand All @@ -165,6 +187,7 @@ module.exports = {
'*/routes/**/*.{ts,tsx,js,jsx}',
'*/root.{ts,tsx,js,jsx}',
'*/entry.*.{ts,tsx,js,jsx}',
'*/devlink/**/*.{ts,tsx,js,jsx}',
'*/tests/**/*.{ts,tsx,js,jsx}',
'*.test.{ts,tsx,js,jsx}',
'*.e2e.{ts,tsx,js,jsx}',
Expand All @@ -177,25 +200,9 @@ module.exports = {
},
},
{
files: ['*.{tsx,jsx}'],
rules: {
/**
* Allow use of `null` in React components.
*/
'@rushstack/no-new-null': 'off',

/**
* Allow defining React components without an explicit return-type.
*/
'@typescript-eslint/explicit-function-return-type': 'off',

'jsx-a11y/anchor-has-content': [
2,
{
components: ['Link'],
},
],
},
extends: ['plugin:jsonc/recommended-with-jsonc'],
files: ['*.json', '*.json5', '*.jsonc'],
parser: 'jsonc-eslint-parser',
},
{
extends: ['plugin:yml/standard'],
Expand Down
1 change: 1 addition & 0 deletions front-end/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dist
*.local

# Editor directories and files
.env
.vscode/*
.idea
.DS_Store
Expand Down
26 changes: 8 additions & 18 deletions front-end/.stylelintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
* @returns {RegExp}
*/
function bemSelector(block, presetOptions) {
const ns =
presetOptions && presetOptions.namespace
? `${presetOptions.namespace}-`
: '';
const ns = presetOptions && presetOptions.namespace ? `${presetOptions.namespace}-` : '';
const WORD = '[a-zA-Z0-9]+(?:-[a-zA-Z0-9]+)*';
const element = `(?:__${WORD})?`;
const modifier = `(?:(?:_|--)${WORD}){0,2}`;
Expand All @@ -18,28 +15,21 @@ function bemSelector(block, presetOptions) {

/** @type {import('stylelint').Config} */
module.exports = {
extends: ['stylelint-config-standard-scss', 'stylelint-config-prettier-scss',],
extends: ['stylelint-config-standard-scss', 'stylelint-config-prettier-scss'],
plugins: ['stylelint-selector-bem-pattern', 'stylelint-prettier', 'stylelint-scss'],
rules: {
"prettier/prettier": true,
'selector-class-pattern': null,
'no-descending-specificity': null,
'plugin/selector-bem-pattern': {
componentSelectors: bemSelector,
preset: 'bem',
},
"scss/at-rule-no-unknown": [
'prettier/prettier': true,
'scss/at-rule-no-unknown': [
true,
{
"ignoreAtRules": [
"tailwind",
"apply",
"variants",
"responsive",
"screen"
]
}
ignoreAtRules: ['tailwind', 'apply', 'variants', 'responsive', 'screen'],
},
],
"declaration-block-trailing-semicolon": null,
"no-descending-specificity": null
'selector-class-pattern': null,
},
};
6 changes: 1 addition & 5 deletions front-end/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint",
"editorconfig.editorconfig",
]
"recommendations": ["dbaeumer.vscode-eslint", "stylelint.vscode-stylelint", "editorconfig.editorconfig"]
}
Loading

0 comments on commit d5a518c

Please sign in to comment.