Skip to content

Commit

Permalink
chore(eslint-config): no build should be okay
Browse files Browse the repository at this point in the history
close #1328
  • Loading branch information
manudeli committed Nov 14, 2024
1 parent c8d6e9d commit b0aef55
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 115 deletions.
60 changes: 0 additions & 60 deletions configs/eslint-config/eslint.config.mjs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
import pluginReact from '@eslint-react/eslint-plugin'
import type { Linter } from 'eslint'
// @ts-expect-error TODO: remove this
import importPlugin from 'eslint-plugin-import'
import jsdoc from 'eslint-plugin-jsdoc'
// @ts-expect-error TODO: remove this
import reactCompiler from 'eslint-plugin-react-compiler'
// @ts-expect-error TODO: remove this
import reactHooks from 'eslint-plugin-react-hooks'
import tseslint from 'typescript-eslint'
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
// @ts-expect-error TODO: remove this
import next from '@next/eslint-plugin-next'
import cspellConfigs from '@cspell/eslint-plugin/configs'
import vitest from '@vitest/eslint-plugin'
// @ts-expect-error TODO: remove this
import jestDom from 'eslint-plugin-jest-dom'
import mdx from 'eslint-plugin-mdx'

const ignores = ['**/.next/**', '**/build/**', '**/coverage/**', '**/dist/**'] satisfies Linter.Config['ignores']
const ignores = ['**/.next/**', '**/build/**', '**/coverage/**', '**/dist/**']

export const suspensiveTypeScriptConfig: ReturnType<typeof tseslint.config> = tseslint.config(
export const suspensiveTypeScriptConfig = tseslint.config(
{
ignores,
},
Expand Down Expand Up @@ -116,7 +110,7 @@ export const suspensiveTypeScriptConfig: ReturnType<typeof tseslint.config> = ts
eslintPluginPrettierRecommended
)

export const suspensiveReactTypeScriptConfig: ReturnType<typeof tseslint.config> = tseslint.config(
export const suspensiveReactTypeScriptConfig = tseslint.config(
...suspensiveTypeScriptConfig,
{
files: ['**/*.{ts,tsx}'],
Expand Down Expand Up @@ -144,12 +138,12 @@ export const suspensiveReactTypeScriptConfig: ReturnType<typeof tseslint.config>
}
)

export const suspensiveNextTypeScriptConfig: ReturnType<typeof tseslint.config> = [
export const suspensiveNextTypeScriptConfig = [
...suspensiveReactTypeScriptConfig,
{ plugins: { 'plugin:@next/next/recommended': next.configs.recommended } },
]

export const suspensiveMDXConfig: Linter.Config[] = [
export const suspensiveMDXConfig = [
mdx.configs.flat,
mdx.configs.flatCodeBlocks,
{
Expand Down
29 changes: 3 additions & 26 deletions configs/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,10 @@
"license": "MIT",
"author": "Jonghyeon Ko <[email protected]>",
"type": "module",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
}
},
"./package.json": "./package.json"
},
"main": "dist/index.cjs",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"main": "index.js",
"module": "index.js",
"scripts": {
"build": "tsup",
"ci:attw": "attw --pack",
"ci:eslint": "eslint \"**/*.{ts,tsx,cts,mts}\"",
"ci:publint": "publint --strict",
"ci:type": "tsc --noEmit",
"clean": "rimraf ./dist && rimraf ./coverage",
"prepack": "pnpm build"
"clean": "rimraf ./dist && rimraf ./coverage"
},
"dependencies": {
"@cspell/eslint-plugin": "^8.14.4",
Expand All @@ -44,8 +24,5 @@
"eslint-plugin-react-compiler": "0.0.0-experimental-7670337-20240918",
"eslint-plugin-react-hooks": "^4.6.2",
"typescript-eslint": "^8.9.0"
},
"devDependencies": {
"@suspensive/tsconfig": "workspace:*"
}
}
10 changes: 0 additions & 10 deletions configs/eslint-config/tsconfig.json

This file was deleted.

4 changes: 0 additions & 4 deletions configs/eslint-config/tsup.config.ts

This file was deleted.

Loading

0 comments on commit b0aef55

Please sign in to comment.