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
8 changes: 4 additions & 4 deletions .github/workflows/build-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
name: Build frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 15
uses: actions/setup-node@v1
- uses: actions/checkout@v4
- name: Use Node.js 24
uses: actions/setup-node@v4
with:
node-version: 15
node-version: 24

# Create a env file with a Hawk token to send a release info
- name: Make envfile with Hawk token
Expand Down
82 changes: 0 additions & 82 deletions www/.eslintrc

This file was deleted.

16 changes: 4 additions & 12 deletions www/.postcssrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ plugins:
# https://github.com/postcss/postcss-import
postcss-import: {}

# Apply custom property sets via @apply rule
# https://github.com/pascalduez/postcss-apply
postcss-apply: {}

# PostCSS plugin that enables @for loop syntax in your CSS
# https://github.com/antyakushev/postcss-for
postcss-for: {}
# Reusable blocks of styles via @define-mixin and @mixin rules
# https://github.com/postcss/postcss-mixins
postcss-mixins: {}

# PostCSS Nested ancestors helper
# https://github.com/toomuchdesign/postcss-nested-ancestors
Expand All @@ -34,11 +30,7 @@ plugins:
# List of features with levels: https://cssdb.org/
stage: 0

# Define polyfills based on browsers you are supporting
# https://github.com/csstools/postcss-preset-env#browsers
browsers:
- 'last 2 versions'
- '> 1%'
# Target browsers are taken from the "browserslist" field of package.json

# Instruct all plugins to omit pre-polyfilled CSS
# https://github.com/csstools/postcss-preset-env#preserve
Expand Down
4 changes: 4 additions & 0 deletions www/application/config/editorjs-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@
},
"table": {
"withHeadings": "boolean",
"stretched": {
"type": "boolean",
"required": false
},
"content": {
"type": "array",
"data": {
Expand Down
3 changes: 2 additions & 1 deletion www/editor-upgrade.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh

# @editorjs/list is kept on 1.x: 2.x saves nested items that the backend can't validate and render yet
yarn add -D \
@editorjs/code \
@editorjs/delimiter \
Expand All @@ -9,7 +10,7 @@ yarn add -D \
@editorjs/image \
@editorjs/inline-code \
@editorjs/link \
@editorjs/list \
@editorjs/list@^1 \
@editorjs/marker \
@editorjs/quote \
@editorjs/raw \
Expand Down
86 changes: 86 additions & 0 deletions www/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import stylistic from '@stylistic/eslint-plugin';
import globals from 'globals';

export default [
{
files: ['public/app/**/*.js'],

languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.browser,
codex: true,
VERSION: true,
ActiveXObject: true
}
},

plugins: {
'@stylistic': stylistic
},

rules: {

'@stylistic/arrow-spacing': [2, {
before: true,
after: true
}],

/** Variables */
'no-delete-var': 2,
'no-label-var': 2,
'no-shadow-restricted-names': 2,
'no-shadow': 2,
'no-undef-init': 2,
'no-undef': 2,
'no-unused-vars': 1,

/** Style */
'@stylistic/array-bracket-spacing': [2, 'never', {
singleValue: true,
objectsInArrays: true,
arraysInArrays: true
}],
'@stylistic/quotes': [1, 'single', {
avoidEscape: true
}],
eqeqeq: 0,
'@stylistic/brace-style': [2, '1tbs'],

'@stylistic/comma-spacing': [2, {
before: false,
after: true
}],
'@stylistic/comma-style': [2, 'last'],
'@stylistic/eol-last': 0,
'no-nested-ternary': 1,
'@stylistic/no-trailing-spaces': 2,
'@stylistic/no-mixed-spaces-and-tabs': 2,
'@stylistic/padded-blocks': [2, 'always'],
'@stylistic/space-before-blocks': 1,
'@stylistic/space-before-function-paren': [1, {
anonymous: 'always',
named: 'never'
}],
'@stylistic/spaced-comment': [2, 'always', {
exceptions: ['-', '+'],
markers: ['=', '!']
}],
'@stylistic/semi': [2, 'always'],
'@stylistic/indent': [2, 4, {
SwitchCase: 1
}],
camelcase: [2, {
properties: 'always'
}],

/** Blank line after variable declarations */
'@stylistic/padding-line-between-statements': [1,
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
{ blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] }
]

}
}
];
Loading