Ghost/apps/admin-x-settings/.eslintrc.cjs
Daniel Lockyer 8c5e2a53a9 Moved Admin-X-Settings to apps/ folder
refs https://github.com/TryGhost/Toolbox/issues/594

- we're moving all the external apps into a different folder so we can
  keep `ghost/` for internal code
2023-06-23 14:37:39 +02:00

42 lines
1.5 KiB
JavaScript

/* eslint-env node */
module.exports = {
root: true,
extends: [
'react-app',
'plugin:ghost/browser'
],
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'}]
}
};