Skip to content

Commit

Permalink
chore(eslint): remove typescript from base config
Browse files Browse the repository at this point in the history
  • Loading branch information
araujogui committed Oct 18, 2024
1 parent 17c883d commit 0ad4e2e
Show file tree
Hide file tree
Showing 5 changed files with 306 additions and 5,545 deletions.
13 changes: 11 additions & 2 deletions apps/site/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { FlatCompat } from '@eslint/eslintrc';
import importX from 'eslint-plugin-import-x';
import * as mdx from 'eslint-plugin-mdx';
import react from 'eslint-plugin-react';
import storybook from 'eslint-plugin-storybook';
Expand All @@ -22,9 +23,17 @@ const compatConfig = compat.config({
export default tseslint.config(
...baseConfig,
{
extends: [react.configs.flat['jsx-runtime'], ...compatConfig],
extends: [
react.configs.flat['jsx-runtime'],
...tseslint.configs.recommended,
importX.flatConfigs.typescript,
...compatConfig,
],
files: ['**/*.{js,md,mdx,mjs,ts,tsx}'],
rules: {
'@typescript-eslint/array-type': ['error', { default: 'generic' }],
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-require-imports': 'off',
'@next/next/no-duplicate-head': 'off',
},
settings: {
Expand All @@ -48,7 +57,7 @@ export default tseslint.config(
{
files: ['**/*.{mdx,tsx}'],
rules: {
// '@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'react/no-unescaped-entities': 'off',
'react/function-component-definition': [
'error',
Expand Down
10 changes: 1 addition & 9 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,12 @@ export default tseslint.config(
],
},
{
extends: [
js.configs.recommended,
importX.flatConfigs.recommended,
importX.flatConfigs.typescript,
...tseslint.configs.recommended,
],
extends: [js.configs.recommended, importX.flatConfigs.recommended],
files: ['**/*.{js,mjs,ts,tsx}'],
plugins: {
'no-relative-import-paths': noRelativeImportPaths,
},
rules: {
'@typescript-eslint/array-type': ['error', { default: 'generic' }],
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-require-imports': 'off',
'import-x/namespace': 'off',
'import-x/no-named-as-default-member': 'off',
'import-x/no-unresolved': 'off',
Expand Down
Loading

0 comments on commit 0ad4e2e

Please sign in to comment.