From ccebe205ff39ccd994162e0786186977e850c53c Mon Sep 17 00:00:00 2001 From: Tmk Date: Thu, 7 Sep 2023 12:44:38 +0800 Subject: [PATCH] chore: fix ide complaints --- package.json | 6 +++--- tsconfig.json | 1 + vitest.config.ts | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 6872405c5e..4c651dbee8 100644 --- a/package.json +++ b/package.json @@ -70,9 +70,9 @@ "postbuild": "yarn patch-d-ts && yarn copy && yarn patch-ts3.8 && yarn patch-old-ts && yarn patch-esm-ts && yarn patch-readme", "prettier": "prettier '*.{js,json,md}' '{src,tests,benchmarks,docs}/**/*.{ts,tsx,md,mdx}' --write", "prettier:ci": "prettier '*.{js,json,md}' '{src,tests,benchmarks,docs}/**/*.{ts,tsx,md,mdx}' --list-different", - "eslint": "eslint --fix --no-eslintrc --c .eslintrc.json '*.{js,json}' '{src,tests,benchmarks}/**/*.{ts,tsx}'", - "eslint:ci": "eslint --no-eslintrc --c .eslintrc.json '*.{js,json}' '{src,tests,benchmarks}/**/*.{ts,tsx}'", - "pretest": "tsc --noEmit", + "eslint": "eslint --fix --no-eslintrc --c .eslintrc.json '*.{js,json,ts}' '{src,tests,benchmarks}/**/*.{ts,tsx}'", + "eslint:ci": "eslint --no-eslintrc --c .eslintrc.json '*.{js,json,ts}' '{src,tests,benchmarks}/**/*.{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 0d9ee50255..0f74c35662 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,6 +11,7 @@ "exactOptionalPropertyTypes": true, "baseUrl": ".", "skipLibCheck": true, + "noEmit": true, "paths": { "jotai": ["./src/index.ts"], "jotai/*": ["./src/*.ts"] diff --git a/vitest.config.ts b/vitest.config.ts index 4b83beef6d..9d9b9bee25 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,3 +1,4 @@ +// eslint-disable-next-line import/extensions import { defineConfig } from 'vitest/config' export default defineConfig({