diff options
Diffstat (limited to 'packages/config/eslint')
-rw-r--r-- | packages/config/eslint/base.js | 79 | ||||
-rw-r--r-- | packages/config/eslint/tailwind.js | 23 | ||||
-rw-r--r-- | packages/config/eslint/web.js | 22 |
3 files changed, 0 insertions, 124 deletions
diff --git a/packages/config/eslint/base.js b/packages/config/eslint/base.js deleted file mode 100644 index 200f17d..0000000 --- a/packages/config/eslint/base.js +++ /dev/null @@ -1,79 +0,0 @@ -const path = require('node:path'); - -/** @type {import('eslint').ESLint.ConfigData} */ -module.exports = { - parser: '@typescript-eslint/parser', - parserOptions: { - ecmaFeatures: { - jsx: true - }, - ecmaVersion: 12, - sourceType: 'module' - }, - extends: [ - 'eslint:recommended', - 'plugin:react/recommended', - 'plugin:react-hooks/recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:astro/recommended', - 'plugin:astro/jsx-a11y-recommended', - 'turbo', - 'prettier' - ], - plugins: ['react', 'jsx-a11y'], - rules: { - 'react/display-name': 'off', - 'react/prop-types': 'off', - 'react/no-unescaped-entities': 'off', - 'react/react-in-jsx-scope': 'off', - 'react-hooks/rules-of-hooks': 'warn', - 'react-hooks/exhaustive-deps': 'warn', - '@typescript-eslint/no-unused-vars': 'off', - '@typescript-eslint/ban-ts-comment': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-var-requires': 'off', - '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-empty-interface': 'off', - '@typescript-eslint/no-empty-function': 'off', - '@typescript-eslint/ban-types': 'off', - 'no-control-regex': 'off', - 'no-mixed-spaces-and-tabs': ['warn', 'smart-tabs'], - 'turbo/no-undeclared-env-vars': [ - 'error', - { - cwd: path.resolve(path.join(__dirname, '..', '..', '..')) - } - ] - }, - ignorePatterns: ['dist', '**/*.js', '**/*.json', 'node_modules'], - settings: { - react: { - version: 'detect' - } - }, - overrides: [ - { - files: ['*.astro'], - parser: 'astro-eslint-parser', - parserOptions: { - parser: '@typescript-eslint/parser', - extraFileExtensions: ['.astro'] - }, - rules: { - 'astro/no-set-html-directive': 2, - 'indent': 'off' - } - }, - { - files: ['*.ts', '*.d.ts', '*.tsx', '*.js', '*.jsx', '*.mjs', '*.cjs'], - parser: '@typescript-eslint/parser', - parserOptions: { - parser: '@typescript-eslint/parser' - }, - rules: { - indent: 'off' - } - } - ] -}; diff --git a/packages/config/eslint/tailwind.js b/packages/config/eslint/tailwind.js deleted file mode 100644 index 9ac36ae..0000000 --- a/packages/config/eslint/tailwind.js +++ /dev/null @@ -1,23 +0,0 @@ -const path = require('node:path'); - -/** @type {import('eslint').ESLint.ConfigData} */ -module.exports = { - extends: ['plugin:tailwindcss/recommended'], - rules: { - 'tailwindcss/no-custom-classname': 'off', - 'tailwindcss/classnames-order': [ - 'warn', - { - config: path.resolve( - path.join(__dirname, '../../..', 'packages/ui/tailwind.config.js') - ) - } - ] - }, - settings: { - tailwindcss: { - callees: ['classnames', 'clsx', 'ctl', 'cva', 'tw', 'twStyle'], - tags: ['tw', 'twStyle'] - } - } -}; diff --git a/packages/config/eslint/web.js b/packages/config/eslint/web.js deleted file mode 100644 index dc010b3..0000000 --- a/packages/config/eslint/web.js +++ /dev/null @@ -1,22 +0,0 @@ -/** @type {import('eslint').ESLint.ConfigData} */ -module.exports = { - extends: [require.resolve('./base.js'), require.resolve('./tailwind.js')], - ignorePatterns: ['public', 'vite.config.ts'], - env: { - browser: true, - node: true - }, - rules: { - 'no-restricted-syntax': [ - 'error', - { - selector: "CallExpression[callee.name='useParams']", - message: 'useParams is illegal, use useZodRouteParams!' - }, - { - selector: "CallExpression[callee.name='useSearchParams']", - message: 'useSearchParams is illegal, use useZodSearchParams!' - } - ] - } -}; |