Skip to content
Merged
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
59 changes: 0 additions & 59 deletions apps/comments-ui/.eslintrc.js

This file was deleted.

91 changes: 91 additions & 0 deletions apps/comments-ui/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import js from '@eslint/js';
import globals from 'globals';
import ghostPlugin from 'eslint-plugin-ghost';
import reactPlugin from 'eslint-plugin-react';
import i18nextPlugin from 'eslint-plugin-i18next';
import tailwindcssPlugin from 'eslint-plugin-tailwindcss';
import tseslint from 'typescript-eslint';

const tailwindConfig = `${import.meta.dirname}/tailwind.config.js`;

const ghostRules = {
curly: 'error',
camelcase: ['error', {properties: 'never'}],
'dot-notation': 'error',
eqeqeq: ['error', 'always'],
'no-plusplus': ['error', {allowForLoopAfterthoughts: true}],
'no-eval': 'error',
'no-useless-call': 'error',
'no-console': 'error',
'no-shadow': 'error',
'array-callback-return': 'error',
'no-constructor-return': 'error',
'no-promise-executor-return': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', {
args: 'after-used',
argsIgnorePattern: '^_',
caughtErrors: 'none'
}],
'ghost/filenames/match-regex': ['error', '^[a-z0-9.-]+$', false],
'ghost/sort-imports-es6-autofix/sort-imports-es6': ['error', {
memberSyntaxSortOrder: ['none', 'all', 'single', 'multiple']
}]
};

const reactFlat = reactPlugin.configs.flat.recommended;
const i18nextFlat = i18nextPlugin.configs['flat/recommended'];

export default tseslint.config(
{
ignores: ['umd/**/*', 'dist/**/*']
},
{
files: ['src/**/*.{js,jsx,ts,tsx}'],
extends: [...tseslint.configs.recommended],
languageOptions: {
...reactFlat.languageOptions,
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.browser,
...globals.node
}
},
plugins: {
...reactFlat.plugins,
...i18nextFlat.plugins,
ghost: ghostPlugin,
tailwindcss: tailwindcssPlugin
},
settings: {
react: {version: 'detect'}
},
rules: {
...js.configs.recommended.rules,
...reactFlat.rules,
...i18nextFlat.rules,
...ghostRules,
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react/jsx-sort-props': ['error', {
reservedFirst: true,
callbacksLast: true,
shorthandLast: true,
locale: 'en'
}],
'react/button-has-type': 'error',
'react/no-array-index-key': 'error',
'tailwindcss/classnames-order': ['error', {config: tailwindConfig}],
'tailwindcss/enforces-negative-arbitrary-values': ['warn', {config: tailwindConfig}],
'tailwindcss/enforces-shorthand': ['warn', {config: tailwindConfig}],
'tailwindcss/migration-from-tailwind-2': ['warn', {config: tailwindConfig}],
'tailwindcss/no-arbitrary-value': 'off',
'tailwindcss/no-custom-classname': 'off',
'tailwindcss/no-contradicting-classname': ['error', {config: tailwindConfig}],
'no-undef': 'off'
}
}
);
12 changes: 9 additions & 3 deletions apps/comments-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@tryghost/comments-ui",
"version": "1.5.12",
"type": "module",
"version": "1.5.13",
"license": "MIT",
"repository": "https://github.com/TryGhost/Ghost",
"author": "Ghost Foundation",
Expand All @@ -25,7 +26,7 @@
"test:acceptance": "NODE_OPTIONS='--experimental-specifier-resolution=node --no-warnings' VITE_TEST=true playwright test",
"test:acceptance:slowmo": "TIMEOUT=100000 PLAYWRIGHT_SLOWMO=1000 pnpm test:acceptance --headed",
"test:acceptance:full": "ALL_BROWSERS=1 pnpm test:acceptance",
"lint": "eslint src --ext .js,.ts,.jsx,.tsx --cache",
"lint": "eslint src --cache",
"preship": "pnpm lint",
"ship": "node ../../.github/scripts/release-apps.js",
"prepublishOnly": "pnpm build"
Expand Down Expand Up @@ -61,6 +62,7 @@
"react-string-replace": "2.0.1"
},
"devDependencies": {
"@eslint/js": "catalog:eslint9",
"@playwright/test": "catalog:",
"@testing-library/jest-dom": "catalog:",
"@testing-library/react": "catalog:react17",
Expand All @@ -71,10 +73,14 @@
"autoprefixer": "10.5.0",
"bson-objectid": "catalog:",
"concurrently": "catalog:",
"eslint": "catalog:",
"eslint": "catalog:eslint9",
"eslint-plugin-ghost": "3.5.0",
"eslint-plugin-i18next": "6.1.4",
"eslint-plugin-react": "7.37.5",
"eslint-plugin-tailwindcss": "catalog:tailwind3",
"globals": "17.6.0",
"jsdom": "catalog:",
"typescript-eslint": "8.58.0",
"moment": "2.30.1",
"postcss": "catalog:",
"postcss-import": "16.1.1",
Expand Down
2 changes: 1 addition & 1 deletion apps/comments-ui/test/utils/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os from 'node:os';
import {E2E_PORT} from '../../playwright.config';
import {Locator, Page} from '@playwright/test';
import {MockedApi} from './mocked-api';
Expand Down Expand Up @@ -224,7 +225,6 @@ export async function setClipboard(page, text) {
}

export function getModifierKey() {
const os = require('os'); // eslint-disable-line @typescript-eslint/no-var-requires
const platform = os.platform();
if (platform === 'darwin') {
return 'Meta';
Expand Down
51 changes: 0 additions & 51 deletions apps/signup-form/.eslintrc.cjs

This file was deleted.

85 changes: 85 additions & 0 deletions apps/signup-form/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import js from '@eslint/js';
import globals from 'globals';
import ghostPlugin from 'eslint-plugin-ghost';
import reactPlugin from 'eslint-plugin-react';
import tailwindcssPlugin from 'eslint-plugin-tailwindcss';
import tseslint from 'typescript-eslint';

const tailwindConfig = `${import.meta.dirname}/tailwind.config.cjs`;

const ghostRules = {
curly: 'error',
camelcase: ['error', {properties: 'never'}],
'dot-notation': 'error',
eqeqeq: ['error', 'always'],
'no-plusplus': ['error', {allowForLoopAfterthoughts: true}],
'no-eval': 'error',
'no-useless-call': 'error',
'no-console': 'error',
'no-shadow': 'error',
'array-callback-return': 'error',
'no-constructor-return': 'error',
'no-promise-executor-return': 'error',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error', {
args: 'after-used',
argsIgnorePattern: '^_',
caughtErrors: 'none'
}],
'ghost/filenames/match-regex': ['error', '^[a-z0-9.-]+$', false],
'ghost/sort-imports-es6-autofix/sort-imports-es6': ['error', {
memberSyntaxSortOrder: ['none', 'all', 'single', 'multiple']
}]
};

const reactFlat = reactPlugin.configs.flat.recommended;

export default tseslint.config(
{
ignores: ['umd/**/*', 'dist/**/*', 'storybook-static/**/*']
},
{
files: ['src/**/*.{js,jsx,ts,tsx,cjs}', 'test/**/*.{js,jsx,ts,tsx,cjs}'],
extends: [...tseslint.configs.recommended],
languageOptions: {
...reactFlat.languageOptions,
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.browser,
...globals.node
}
},
plugins: {
...reactFlat.plugins,
ghost: ghostPlugin,
tailwindcss: tailwindcssPlugin
},
settings: {
react: {version: 'detect'}
},
rules: {
...js.configs.recommended.rules,
...reactFlat.rules,
...ghostRules,
'@typescript-eslint/no-inferrable-types': 'off',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react/jsx-sort-props': ['error', {
reservedFirst: true,
callbacksLast: true,
shorthandLast: true,
locale: 'en'
}],
'react/button-has-type': 'error',
'react/no-array-index-key': 'error',
'tailwindcss/classnames-order': ['error', {config: tailwindConfig}],
'tailwindcss/enforces-negative-arbitrary-values': ['warn', {config: tailwindConfig}],
'tailwindcss/enforces-shorthand': ['warn', {config: tailwindConfig}],
'tailwindcss/migration-from-tailwind-2': ['warn', {config: tailwindConfig}],
'tailwindcss/no-arbitrary-value': 'off',
'tailwindcss/no-custom-classname': 'off',
'tailwindcss/no-contradicting-classname': ['error', {config: tailwindConfig}]
}
}
);
12 changes: 9 additions & 3 deletions apps/signup-form/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@tryghost/signup-form",
"version": "0.3.27",
"type": "module",
"version": "0.3.28",
"license": "MIT",
"repository": "https://github.com/TryGhost/Ghost",
"author": "Ghost Foundation",
Expand All @@ -19,7 +20,7 @@
"dev:test": "vite build && vite preview --port 6175",
"build": "tsc && vite build",
"lint": "pnpm run lint:js",
"lint:js": "eslint --ext .js,.ts,.cjs,.tsx --cache src test",
"lint:js": "eslint --cache src test",
"test:acceptance": "NODE_OPTIONS='--experimental-specifier-resolution=node --no-warnings' VITE_TEST=true playwright test",
"test:acceptance:slowmo": "TIMEOUT=100000 PLAYWRIGHT_SLOWMO=100 pnpm test:acceptance --headed",
"test:acceptance:full": "ALL_BROWSERS=1 pnpm test:acceptance",
Expand All @@ -35,6 +36,7 @@
"react-dom": "catalog:"
},
"devDependencies": {
"@eslint/js": "catalog:eslint9",
"@playwright/test": "catalog:",
"@storybook/addon-docs": "catalog:",
"@storybook/addon-links": "catalog:",
Expand All @@ -46,9 +48,13 @@
"@vitejs/plugin-react": "catalog:",
"autoprefixer": "10.5.0",
"concurrently": "catalog:",
"eslint": "catalog:",
"eslint": "catalog:eslint9",
"eslint-plugin-ghost": "3.5.0",
"eslint-plugin-react": "7.37.5",
"eslint-plugin-tailwindcss": "catalog:tailwind3",
"globals": "17.6.0",
"jsdom": "catalog:",
"typescript-eslint": "8.58.0",
"postcss": "catalog:",
"postcss-import": "16.1.1",
"storybook": "catalog:",
Expand Down
Loading
Loading