diff --git a/apps/extension/eslint.config.mjs b/apps/extension/eslint.config.mjs index 11c6ce91..eaeec917 100644 --- a/apps/extension/eslint.config.mjs +++ b/apps/extension/eslint.config.mjs @@ -1,8 +1,8 @@ -import { penumbraEslintConfig } from '@repo/eslint-config'; +import { eslintConfig } from '@penumbra-zone/configs/eslint'; import { config, parser } from 'typescript-eslint'; export default config({ - ...penumbraEslintConfig, + ...eslintConfig, languageOptions: { parser, parserOptions: { diff --git a/packages/context/eslint.config.mjs b/packages/context/eslint.config.mjs index 11c6ce91..eaeec917 100644 --- a/packages/context/eslint.config.mjs +++ b/packages/context/eslint.config.mjs @@ -1,8 +1,8 @@ -import { penumbraEslintConfig } from '@repo/eslint-config'; +import { eslintConfig } from '@penumbra-zone/configs/eslint'; import { config, parser } from 'typescript-eslint'; export default config({ - ...penumbraEslintConfig, + ...eslintConfig, languageOptions: { parser, parserOptions: { diff --git a/packages/eslint-config/CHANGELOG.md b/packages/eslint-config/CHANGELOG.md deleted file mode 100644 index 76c342f0..00000000 --- a/packages/eslint-config/CHANGELOG.md +++ /dev/null @@ -1,19 +0,0 @@ -# @penumbra-zone/eslint-config - -## 2.1.0 - -### Minor Changes - -- 32ac0c1: add rule curly all - -## 2.0.0 - -### Major Changes - -- e9b0d0d: use imported packages - -## 1.0.1 - -### Patch Changes - -- e35c6f7: Deps bumped to latest diff --git a/packages/eslint-config/eslint.config.mjs b/packages/eslint-config/eslint.config.mjs deleted file mode 100644 index 3cf10b69..00000000 --- a/packages/eslint-config/eslint.config.mjs +++ /dev/null @@ -1,99 +0,0 @@ -import { createRequire } from 'node:module'; -import eslint from '@eslint/js'; -import tseslint from 'typescript-eslint'; -import { fixupConfigRules } from '@eslint/compat'; -import importPlugin from 'eslint-plugin-import'; -import tailwindPlugin from 'eslint-plugin-tailwindcss'; -import prettierRecommended from 'eslint-plugin-prettier/recommended'; -import reactRecommended from 'eslint-plugin-react/configs/recommended.js'; -import turboPlugin from 'eslint-plugin-turbo'; -import vitestPlugin from 'eslint-plugin-vitest'; -import storybookPlugin from 'eslint-plugin-storybook'; - -const require = createRequire(import.meta.url); - -export const penumbraEslintConfig = { - extends: [ - eslint.configs.recommended, - ...tseslint.configs.strictTypeChecked, - ...tseslint.configs.stylisticTypeChecked, - prettierRecommended, - ...fixupConfigRules(reactRecommended), // use reactPlugin.config.recommended when plugin is v9.0 ready - ], - plugins: { - import: importPlugin, - tailwindcss: tailwindPlugin, - turbo: turboPlugin, - vitest: vitestPlugin, - storybook: storybookPlugin, - }, - ignores: ['**/*.js'], - settings: { - 'import/resolver': { - typescript: true, - }, - react: { version: 'detect' }, - tailwindcss: { - // Ensures that ESLint knows about our Tailwind config, such as color - // names, etc. Without this, ESLint integrations (such as with the VSCode - // extension) break. - // - // @see https://github.com/microsoft/vscode-eslint/issues/1706#issuecomment-1916389417 - config: require.resolve('@repo/tailwind-config'), - }, - }, - rules: { - ...tailwindPlugin.configs.recommended.rules, - ...vitestPlugin.configs.recommended.rules, - ...storybookPlugin.configs.recommended.rules, - eqeqeq: ['error', 'always', { null: 'ignore' }], - 'turbo/no-undeclared-env-vars': 'error', - 'import/no-useless-path-segments': ['error', { noUselessIndex: true }], - 'import/no-relative-packages': 'error', - 'import/no-self-import': 'error', - 'import/first': 'error', - 'import/extensions': [ - 'error', - 'ignorePackages', - { - ts: 'never', - tsx: 'never', - mts: 'never,', - js: 'never', - jsx: 'never', - mjs: 'never', - }, - ], - '@typescript-eslint/no-non-null-assertion': 'off', - '@typescript-eslint/no-confusing-void-expression': ['error', { ignoreArrowShorthand: true }], - '@typescript-eslint/switch-exhaustiveness-check': 'error', - '@typescript-eslint/no-unnecessary-condition': ['error', { allowConstantLoopConditions: true }], - '@typescript-eslint/no-invalid-void-type': 'off', - '@typescript-eslint/restrict-template-expressions': ['error', { allowNumber: true }], - 'react/react-in-jsx-scope': 'off', - 'react/prop-types': 'off', - // Catches untyped let declarations - 'no-restricted-syntax': [ - 'error', - { - selector: - "VariableDeclaration[kind = 'let'] > VariableDeclarator[init = null]:not([id.typeAnnotation])", - message: 'Type must be annotated at variable declaration', - }, - ], - 'tailwindcss/no-custom-classname': [ - 'error', - { - // All of these callees are the Tailwind defaults, except `cn`, which is - // our own custom helper. - callees: ['classnames', 'clsx', 'cn', 'ctl', 'cva', 'tv'], - // When adding more items to the allow list, please document the reason. - whitelist: [ - // Used by Sonner - 'toaster', - ], - }, - ], - curly: ['error', 'all'], - }, -}; diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json deleted file mode 100644 index 1a9fd214..00000000 --- a/packages/eslint-config/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@repo/eslint-config", - "version": "2.1.0", - "private": true, - "license": "(MIT OR Apache-2.0)", - "main": "eslint.config.mjs", - "exports": { - ".": "./eslint.config.mjs" - }, - "devDependencies": { - "@eslint/compat": "^1.0.1", - "@eslint/js": "^9.3.0", - "eslint": "^9.3.0", - "eslint-config-prettier": "^9.1.0", - "eslint-import-resolver-typescript": "^3.6.1", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-prettier": "^5.1.3", - "eslint-plugin-react": "7.34.1", - "eslint-plugin-react-hooks": "^4.6.2", - "eslint-plugin-storybook": "^0.8.0", - "eslint-plugin-tailwindcss": "^3.15.2", - "eslint-plugin-turbo": "^2.0.12", - "eslint-plugin-vitest": "^0.5.4", - "typescript-eslint": "^7.10.0" - } -} diff --git a/packages/noble/eslint.config.mjs b/packages/noble/eslint.config.mjs index 11c6ce91..eaeec917 100644 --- a/packages/noble/eslint.config.mjs +++ b/packages/noble/eslint.config.mjs @@ -1,8 +1,8 @@ -import { penumbraEslintConfig } from '@repo/eslint-config'; +import { eslintConfig } from '@penumbra-zone/configs/eslint'; import { config, parser } from 'typescript-eslint'; export default config({ - ...penumbraEslintConfig, + ...eslintConfig, languageOptions: { parser, parserOptions: { diff --git a/packages/ui/eslint.config.mjs b/packages/ui/eslint.config.mjs index 11c6ce91..eaeec917 100644 --- a/packages/ui/eslint.config.mjs +++ b/packages/ui/eslint.config.mjs @@ -1,8 +1,8 @@ -import { penumbraEslintConfig } from '@repo/eslint-config'; +import { eslintConfig } from '@penumbra-zone/configs/eslint'; import { config, parser } from 'typescript-eslint'; export default config({ - ...penumbraEslintConfig, + ...eslintConfig, languageOptions: { parser, parserOptions: {