From 13b40936dda6116be1f7f04219b2a3c23b847007 Mon Sep 17 00:00:00 2001 From: Tmk Date: Fri, 8 Sep 2023 08:59:34 +0800 Subject: [PATCH] chore: fix ide complaints (#786) --- package.json | 6 +++--- tsconfig.json | 1 + vitest.config.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index c9cfdfb4..33143c88 100644 --- a/package.json +++ b/package.json @@ -55,9 +55,9 @@ "postbuild": "yarn patch-d-ts && yarn copy && yarn patch-macro-vite && yarn patch-ts3.4 && yarn patch-esm-ts", "prettier": "prettier '*.{js,json,md}' '{src,tests,docs}/**/*.{ts,tsx,md,mdx}' --write", "prettier:ci": "prettier '*.{js,json,md}' '{src,tests,docs}/**/*.{ts,tsx,md,mdx}' --list-different", - "eslint": "eslint --fix '*.{js,json}' '{src,tests}/**/*.{ts,tsx}'", - "eslint:ci": "eslint '*.{js,json}' '{src,tests}/**/*.{ts,tsx}'", - "pretest": "tsc --noEmit", + "eslint": "eslint --no-eslintrc --c .eslintrc.json --fix '*.{js,json,ts}' '{src,tests}/**/*.{ts,tsx}'", + "eslint:ci": "eslint --no-eslintrc --c .eslintrc.json '*.{js,json,ts}' '{src,tests}/**/*.{ts,tsx}'", + "pretest": "tsc", "test": "vitest --ui --coverage", "test:ci": "vitest", "patch-d-ts": "node -e \"var {entries}=require('./rollup.config.js');require('shelljs').find('dist/**/*.d.ts').forEach(f=>{entries.forEach(({find,replacement})=>require('shelljs').sed('-i',new RegExp(' from \\''+find.source.slice(0,-1)+'\\';$'),' from \\''+replacement+'\\';',f));require('shelljs').sed('-i',/ from '(\\.[^']+)\\.ts';$/,' from \\'\\$1\\';',f)})\"", diff --git a/tsconfig.json b/tsconfig.json index 94e184a4..689d470c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,6 +10,7 @@ "allowImportingTsExtensions": true, "noUncheckedIndexedAccess": true, "exactOptionalPropertyTypes": true, + "noEmit": true, "baseUrl": ".", "paths": { "valtio": ["./src/index.ts"], diff --git a/vitest.config.ts b/vitest.config.ts index 4039040a..e9b3ec82 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,4 +1,4 @@ -import path from 'path' +// eslint-disable-next-line import/extensions import { defineConfig } from 'vitest/config' export default defineConfig({