mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
3d6fb0d6b1
refs https://github.com/TryGhost/Team/issues/3151 - adds a new vite + typescript + storybook + TW package for setting up admin settings in react with base config that works with Ghost monorepo - includes base components/design system for new settings UI - adds eslint rule config to the package to match rest of Ghost codebase - this is an experimental package as we figure out the best patterns for new admin packages in Ghost monorepo Co-authored-by: Peter Zimon <zimo@ghost.org>
43 lines
1.5 KiB
JavaScript
43 lines
1.5 KiB
JavaScript
/* eslint-env node */
|
|
module.exports = {
|
|
root: true,
|
|
extends: [
|
|
'react-app',
|
|
'plugin:ghost/browser',
|
|
'plugin:react/recommended'
|
|
],
|
|
plugins: [
|
|
'ghost',
|
|
'tailwindcss'
|
|
],
|
|
rules: {
|
|
// sort multiple import lines into alphabetical groups
|
|
'ghost/sort-imports-es6-autofix/sort-imports-es6': ['error', {
|
|
memberSyntaxSortOrder: ['none', 'all', 'single', 'multiple']
|
|
}],
|
|
|
|
// suppress errors for missing 'import React' in JSX files, as we don't need it
|
|
'react/react-in-jsx-scope': 'off',
|
|
// ignore prop-types for now
|
|
'react/prop-types': 'off',
|
|
|
|
// custom react rules
|
|
'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: 'tailwind.config.cjs'}],
|
|
'tailwindcss/enforces-negative-arbitrary-values': ['warn', {config: 'tailwind.config.cjs'}],
|
|
'tailwindcss/enforces-shorthand': ['warn', {config: 'tailwind.config.cjs'}],
|
|
'tailwindcss/migration-from-tailwind-2': ['warn', {config: 'tailwind.config.cjs'}],
|
|
'tailwindcss/no-arbitrary-value': 'off',
|
|
'tailwindcss/no-custom-classname': 'off',
|
|
'tailwindcss/no-contradicting-classname': ['error', {config: 'tailwind.config.cjs'}]
|
|
}
|
|
};
|