Skip to content

remove @textea/dev-kit from dependencies #141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 96 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,106 @@
module.exports = {
root: true,
extends: './node_modules/@textea/dev-kit/config/eslint',
settings: {
react: {
version: 'detect'
}
},
env: {
browser: true, es6: true
}
},
extends: ['eslint:recommended', 'plugin:react/recommended', 'standard'],
globals: {
Atomics: 'readonly', SharedArrayBuffer: 'readonly'
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
globalReturn: false, impliedStrict: true, jsx: true
},
ecmaVersion: 'latest',
sourceType: 'module'
},
plugins: [
'react',
'react-hooks',
'@typescript-eslint',
'simple-import-sort',
'import',
'unused-imports'
],
rules: {
eqeqeq: 'error',
'no-eval': 'error',
'no-var': 'error',
'prefer-const': 'error',
'sort-imports': 'off',
'import/order': 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'warn', {
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_'
}],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'no-redeclare': 'off',
'@typescript-eslint/no-redeclare': ['error'],
'no-unused-expressions': 'warn',
'react/jsx-filename-extension': [
1, {
extensions: ['.js', '.jsx', '.ts', '.tsx']
}],
'import/prefer-default-export': 'off',
'jsx-quotes': ['error', 'prefer-single'],
camelcase: 'off',
'react/prop-types': 'off',
'react/display-name': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/member-delimiter-style': [
'error', {
multiline: {
delimiter: 'none', requireLast: true
},
singleline: {
delimiter: 'semi', requireLast: false
}
}],
'@typescript-eslint/explicit-function-return-type': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'no-restricted-imports': 'off',
'@typescript-eslint/no-restricted-imports': [
'error',
{
patterns: [
{
group: ['**/dist'],
message: 'Don\'t import from dist',
allowTypeImports: false
}
]
}
]
},
overrides: [
{
files: ['*.d.ts'],
rules: {
'no-undef': 'off'
}
},
{
files: ['*.test.ts', '*.test.tsx'], env: { jest: true }
}
]
}
3 changes: 1 addition & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@
"dependencies": {
"@textea/json-viewer": "workspace:^",
"gray-matter": "^4.0.3",
"next": "^12.3.4",
"next": "^13.1.1",
"nextra": "^2.0.0-beta.42",
"nextra-theme-docs": "^2.0.0-beta.42",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@textea/dev-kit": "^1.1.0",
"@types/node": "^18.11.9",
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.9",
Expand Down
20 changes: 18 additions & 2 deletions docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@textea/dev-kit/config/tsconfig.root.json",
// "extends": "@textea/dev-kit/config/tsconfig.root.json", // todo: to remove
"compilerOptions": {
"paths": {
"@textea/json-viewer": [
Expand All @@ -8,7 +8,23 @@
},
"jsx": "preserve",
"incremental": true,
"noEmit": true
"noEmit": true,
// "target": "es5",
"target": "ES2020",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
},
"include": [
"next-env.d.ts",
Expand Down
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,19 @@
"@emotion/styled": "^11.10.5",
"@mui/icons-material": "^5.11.0",
"@mui/material": "^5.11.1",
"@textea/dev-kit": "^1.1.0",
"@typescript-eslint/eslint-plugin": "^5.40.0",
"@typescript-eslint/parser": "^5.40.0",
"copy-to-clipboard": "^3.3.3",
"eslint": "^8.25.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.3.0",
"eslint-plugin-promise": "^6.1.0",
"eslint-plugin-react": "^7.31.10",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-simple-import-sort": "^8.0.0",
"eslint-plugin-unused-imports": "^2.0.0",
"group-items": "^2.2.0",
"zustand": "^4.1.5"
},
Expand Down
3 changes: 1 addition & 2 deletions rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ const external = [
'react',
'react/jsx-runtime',
'react-dom',
'react-dom/client',
'@textea/dev-kit/utils'
'react-dom/client'
]
const outputMatrix = (
name: string, format: ModuleFormat[]): OutputOptions[] => {
Expand Down
3 changes: 1 addition & 2 deletions src/stores/typeRegistry.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Box } from '@mui/material'
import { DevelopmentError } from '@textea/dev-kit/utils'
import React, { memo, SetStateAction, useMemo, useState } from 'react'
import create from 'zustand'
import createStore from 'zustand/context'
Expand Down Expand Up @@ -74,7 +73,7 @@ export function matchTypeComponents<Value> (
if (typeof value === 'object') {
return objectType as unknown as DataType<Value>
}
throw new DevelopmentError('this is not possible')
throw new Error('this is not possible')
}
return potential
}
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"extends": "./node_modules/@textea/dev-kit/config/tsconfig.root.json",
"compilerOptions": {
"target": "ES5",
"outDir": "./dist/out/",
"rootDir": "./src/",
"jsx": "react-jsx",
"jsxImportSource": "@emotion/react",
"incremental": false,
"declaration": true
"declaration": true,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true
},
"include": [
"src/**/*.ts"
Expand Down
Loading