From 4c0457967286d11fbc803108af9042cc4c31dbd1 Mon Sep 17 00:00:00 2001 From: Tiger Oakes Date: Fri, 28 Feb 2020 09:56:59 -0800 Subject: [PATCH] chore: Always lint types folder --- package.json | 5 ++- packages/alias/package.json | 2 +- packages/alias/tsconfig.json | 4 -- packages/alias/types/index.d.ts | 38 +++++++++---------- packages/auto-install/tsconfig.json | 4 -- packages/beep/package.json | 2 +- packages/beep/types/index.d.ts | 12 +++--- packages/buble/tsconfig.json | 8 +--- packages/dsv/package.json | 2 +- packages/html/package.json | 2 +- packages/image/package.json | 2 +- packages/inject/package.json | 2 +- packages/json/package.json | 3 +- packages/json/test/fixtures/array/config.json | 4 +- packages/json/test/fixtures/basic/config.json | 2 +- .../test/fixtures/extensionless/config.json | 2 +- .../fixtures/extensionless/dir/index.json | 2 +- .../json/test/fixtures/named/package.json | 4 +- packages/legacy/package.json | 2 +- packages/multi-entry/package.json | 2 +- packages/pluginutils/package.json | 2 +- packages/pluginutils/tsconfig.json | 1 - packages/strip/package.json | 2 +- packages/sucrase/package.json | 2 +- packages/typescript/package.json | 5 ++- .../project-references/animals/tsconfig.json | 18 ++++----- .../project-references/core/tsconfig.json | 14 +++---- .../fixtures/project-references/tsconfig.json | 28 +++++++------- .../project-references/zoo/tsconfig.json | 24 ++++++------ .../tsconfig-extends-module/tsconfig.json | 12 +++--- packages/typescript/tsconfig.json | 11 +----- packages/url/package.json | 2 +- packages/virtual/package.json | 2 +- packages/wasm/package.json | 2 +- packages/yaml/package.json | 2 +- tsconfig.base.json | 2 +- tsconfig.eslint.json | 6 +-- 37 files changed, 105 insertions(+), 134 deletions(-) diff --git a/package.json b/package.json index e84440995..1d49ecbba 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,10 @@ "ci:coverage:submit": "node scripts/codecov", "ci:lint": "node scripts/run-changed.js ci:lint", "ci:test": "node scripts/run-changed.js ci:test", - "lint": "pnpm run lint:docs && pnpm run lint:package && node scripts/run-changed.js lint", - "lint:docs": "prettier --write README.md", + "lint": "pnpm run lint:docs && npm run lint:json && pnpm run lint:package && node scripts/run-changed.js lint", + "lint:docs": "prettier --single-quote --write README.md", "lint:js": "eslint scripts util", + "lint:json": "prettier --single-quote --write tsconfig.*.json codecov.yml pnpm-workspace.yaml", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "preinstall": "node scripts/disallow-npm.js", "pub": "node scripts/pub.js", diff --git a/packages/alias/package.json b/packages/alias/package.json index c78496ed9..37d0d4e37 100755 --- a/packages/alias/package.json +++ b/packages/alias/package.json @@ -22,7 +22,7 @@ "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", "lint:docs": "prettier --single-quote --write README.md", - "lint:js": "eslint --fix --cache src test --ext .js,.ts", + "lint:js": "eslint --fix --cache src test types --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", "prepare": "pnpm run build", diff --git a/packages/alias/tsconfig.json b/packages/alias/tsconfig.json index 11a2c4d75..eb2531749 100644 --- a/packages/alias/tsconfig.json +++ b/packages/alias/tsconfig.json @@ -1,9 +1,5 @@ { "extends": "../../tsconfig.base.json", - "compilerOptions": { - "lib": ["es6"], - "module": "esnext" - }, "include": [ "src/**/*", "types/**/*" diff --git a/packages/alias/types/index.d.ts b/packages/alias/types/index.d.ts index 701286855..d826f8f35 100644 --- a/packages/alias/types/index.d.ts +++ b/packages/alias/types/index.d.ts @@ -1,35 +1,35 @@ import { Plugin, ResolveIdResult } from 'rollup'; export interface Alias { - find: string | RegExp; - replacement: string; - customResolver?: ResolverFunction | ResolverObject | null; + find: string | RegExp; + replacement: string; + customResolver?: ResolverFunction | ResolverObject | null; } export type ResolverFunction = ( - source: string, - importer: string | undefined + source: string, + importer: string | undefined ) => Promise | ResolveIdResult; export interface ResolverObject { - resolveId: ResolverFunction; + resolveId: ResolverFunction; } export interface RollupAliasOptions { - /** - * Instructs the plugin to use an alternative resolving algorithm, - * rather than the Rollup's resolver. - * @default null - */ - customResolver?: ResolverFunction | ResolverObject | null; + /** + * Instructs the plugin to use an alternative resolving algorithm, + * rather than the Rollup's resolver. + * @default null + */ + customResolver?: ResolverFunction | ResolverObject | null; - /** - * Specifies an `Object`, or an `Array` of `Object`, - * which defines aliases used to replace values in `import` or `require` statements. - * With either format, the order of the entries is important, - * in that the first defined rules are applied first. - */ - entries?: readonly Alias[] | { [find: string]: string }; + /** + * Specifies an `Object`, or an `Array` of `Object`, + * which defines aliases used to replace values in `import` or `require` statements. + * With either format, the order of the entries is important, + * in that the first defined rules are applied first. + */ + entries?: readonly Alias[] | { [find: string]: string }; } /** diff --git a/packages/auto-install/tsconfig.json b/packages/auto-install/tsconfig.json index 11a2c4d75..eb2531749 100644 --- a/packages/auto-install/tsconfig.json +++ b/packages/auto-install/tsconfig.json @@ -1,9 +1,5 @@ { "extends": "../../tsconfig.base.json", - "compilerOptions": { - "lib": ["es6"], - "module": "esnext" - }, "include": [ "src/**/*", "types/**/*" diff --git a/packages/beep/package.json b/packages/beep/package.json index 1296f8d7a..fac5babf7 100644 --- a/packages/beep/package.json +++ b/packages/beep/package.json @@ -21,7 +21,7 @@ "ci:test": "ava --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", "lint:docs": "prettier --single-quote --write README.md", - "lint:js": "eslint --fix --cache lib test --ext .js,.ts", + "lint:js": "eslint --fix --cache lib test types --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "test": "ava" }, diff --git a/packages/beep/types/index.d.ts b/packages/beep/types/index.d.ts index 65cbc60d8..6df01ce2f 100644 --- a/packages/beep/types/index.d.ts +++ b/packages/beep/types/index.d.ts @@ -1,6 +1,6 @@ -import { Plugin } from 'rollup'; - -/** - * 🍣 A Rollup plugin that beeps when a build ends with errors. - */ -export default function beep(): Plugin; +import { Plugin } from 'rollup'; + +/** + * 🍣 A Rollup plugin that beeps when a build ends with errors. + */ +export default function beep(): Plugin; diff --git a/packages/buble/tsconfig.json b/packages/buble/tsconfig.json index d7cd9de94..eb2531749 100644 --- a/packages/buble/tsconfig.json +++ b/packages/buble/tsconfig.json @@ -1,13 +1,7 @@ { "extends": "../../tsconfig.base.json", - "compilerOptions": { - "lib": ["es6"], - "module": "esnext", - "allowJs": true - }, "include": [ "src/**/*", - "types/**/*", - "typings-test.js" + "types/**/*" ] } diff --git a/packages/dsv/package.json b/packages/dsv/package.json index 855bcd1b3..33849d0fb 100755 --- a/packages/dsv/package.json +++ b/packages/dsv/package.json @@ -19,7 +19,7 @@ "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", "lint:docs": "prettier --single-quote --write README.md", - "lint:js": "eslint --fix --cache src test", + "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", "prepare": "pnpm run build", diff --git a/packages/html/package.json b/packages/html/package.json index b4bb1f14c..b7a17fbfe 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -21,7 +21,7 @@ "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", "lint:docs": "prettier --single-quote --write *.md", - "lint:js": "eslint --fix --cache lib test", + "lint:js": "eslint --fix --cache lib test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prepublishOnly": "pnpm run lint", "test": "ava" diff --git a/packages/image/package.json b/packages/image/package.json index 5c373209d..c9bbdddec 100644 --- a/packages/image/package.json +++ b/packages/image/package.json @@ -22,7 +22,7 @@ "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", "lint:docs": "prettier --single-quote --write *.md", - "lint:js": "eslint --fix --cache src test", + "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", "prepare": "pnpm run build", diff --git a/packages/inject/package.json b/packages/inject/package.json index 5a1b0aa0e..5a7a2ce86 100644 --- a/packages/inject/package.json +++ b/packages/inject/package.json @@ -19,7 +19,7 @@ "ci:test": "pnpm run test -- --verbose && pnpm run test:ts", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", "lint:docs": "prettier --single-quote --write README.md", - "lint:js": "eslint --fix --cache src test", + "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", "prepare": "pnpm run build", diff --git a/packages/json/package.json b/packages/json/package.json index 8ee97e5e5..d6784e5c6 100755 --- a/packages/json/package.json +++ b/packages/json/package.json @@ -17,9 +17,10 @@ "ci:lint": "pnpm run build && pnpm run lint", "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose && pnpm run test:ts", - "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", + "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:json && pnpm run lint:package", "lint:docs": "prettier --single-quote --write README.md", "lint:js": "eslint --fix --cache src test types --ext .js,.ts", + "lint:json": "prettier --write \"test/fixtures/!(garbage)/*.json\"", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", "prepare": "pnpm run build", diff --git a/packages/json/test/fixtures/array/config.json b/packages/json/test/fixtures/array/config.json index feb087e74..b5d8bb58d 100755 --- a/packages/json/test/fixtures/array/config.json +++ b/packages/json/test/fixtures/array/config.json @@ -1,3 +1 @@ -[ - 1, 2, 3 -] +[1, 2, 3] diff --git a/packages/json/test/fixtures/basic/config.json b/packages/json/test/fixtures/basic/config.json index 5d18e67d2..0a6e8769b 100755 --- a/packages/json/test/fixtures/basic/config.json +++ b/packages/json/test/fixtures/basic/config.json @@ -1,3 +1,3 @@ { - "answer": 42 + "answer": 42 } diff --git a/packages/json/test/fixtures/extensionless/config.json b/packages/json/test/fixtures/extensionless/config.json index 5d18e67d2..0a6e8769b 100755 --- a/packages/json/test/fixtures/extensionless/config.json +++ b/packages/json/test/fixtures/extensionless/config.json @@ -1,3 +1,3 @@ { - "answer": 42 + "answer": 42 } diff --git a/packages/json/test/fixtures/extensionless/dir/index.json b/packages/json/test/fixtures/extensionless/dir/index.json index aac70eac2..6092acb91 100755 --- a/packages/json/test/fixtures/extensionless/dir/index.json +++ b/packages/json/test/fixtures/extensionless/dir/index.json @@ -1,3 +1,3 @@ { - "Are extensionless imports and /index resolutions a good idea?": "No." + "Are extensionless imports and /index resolutions a good idea?": "No." } diff --git a/packages/json/test/fixtures/named/package.json b/packages/json/test/fixtures/named/package.json index 595e4d544..6a0a1011d 100755 --- a/packages/json/test/fixtures/named/package.json +++ b/packages/json/test/fixtures/named/package.json @@ -1,4 +1,4 @@ { - "name": "this-should-be-excluded", - "version": "1.33.7" + "name": "this-should-be-excluded", + "version": "1.33.7" } diff --git a/packages/legacy/package.json b/packages/legacy/package.json index 00571e3a6..36761db09 100644 --- a/packages/legacy/package.json +++ b/packages/legacy/package.json @@ -19,7 +19,7 @@ "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", "lint:docs": "prettier --single-quote --write README.md", - "lint:js": "eslint --fix --cache src test", + "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", "prepare": "pnpm run build", diff --git a/packages/multi-entry/package.json b/packages/multi-entry/package.json index e925791ee..e02ce3939 100755 --- a/packages/multi-entry/package.json +++ b/packages/multi-entry/package.json @@ -19,7 +19,7 @@ "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", "lint:docs": "prettier --single-quote --write README.md", - "lint:js": "eslint --fix --cache src test", + "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", "prepare": "pnpm run build", diff --git a/packages/pluginutils/package.json b/packages/pluginutils/package.json index fcac22dd2..07d03ba15 100644 --- a/packages/pluginutils/package.json +++ b/packages/pluginutils/package.json @@ -24,7 +24,7 @@ "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", "lint:docs": "prettier --single-quote --write README.md", - "lint:js": "eslint --fix --cache src --ext .js,.ts", + "lint:js": "eslint --fix --cache src test types --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", "prepare": "pnpm run build", diff --git a/packages/pluginutils/tsconfig.json b/packages/pluginutils/tsconfig.json index dc3cca649..d9a8fc69b 100644 --- a/packages/pluginutils/tsconfig.json +++ b/packages/pluginutils/tsconfig.json @@ -1,7 +1,6 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "lib": ["es6"], "esModuleInterop": true }, "include": [ diff --git a/packages/strip/package.json b/packages/strip/package.json index b1e753fa0..afcef3ddd 100644 --- a/packages/strip/package.json +++ b/packages/strip/package.json @@ -19,7 +19,7 @@ "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", "lint:docs": "prettier --single-quote --write README.md", - "lint:js": "eslint --fix --cache src test/test.js", + "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "pretest": "pnpm run build", "test": "ava" diff --git a/packages/sucrase/package.json b/packages/sucrase/package.json index 6c88183d2..5e6198f34 100644 --- a/packages/sucrase/package.json +++ b/packages/sucrase/package.json @@ -22,7 +22,7 @@ "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", "lint:docs": "prettier --single-quote --write README.md", - "lint:js": "eslint --fix --cache src test", + "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", "prepare": "pnpm run build", diff --git a/packages/typescript/package.json b/packages/typescript/package.json index 153184679..a96523e91 100644 --- a/packages/typescript/package.json +++ b/packages/typescript/package.json @@ -20,9 +20,10 @@ "ci:lint": "pnpm run build && pnpm run lint", "ci:lint:commits": "commitlint --from=${CIRCLE_BRANCH} --to=${CIRCLE_SHA1}", "ci:test": "pnpm run test -- --verbose --serial", - "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", + "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:json && pnpm run lint:package", "lint:docs": "prettier --single-quote --write README.md", - "lint:js": "eslint --fix --cache src test --ext .js,.ts", + "lint:js": "eslint --fix --cache src test types --ext .js,.ts", + "lint:json": "prettier --write **/tsconfig.json", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", "prepare": "pnpm run build", diff --git a/packages/typescript/test/fixtures/project-references/animals/tsconfig.json b/packages/typescript/test/fixtures/project-references/animals/tsconfig.json index f6b2cc49e..2642d5c3d 100644 --- a/packages/typescript/test/fixtures/project-references/animals/tsconfig.json +++ b/packages/typescript/test/fixtures/project-references/animals/tsconfig.json @@ -1,10 +1,8 @@ -{ - "extends": "../tsconfig-base.json", - "compilerOptions": { - "outDir": "../lib/animals", - "rootDir": ".", - }, - "references": [ - { "path": "../core" } - ] -} +{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/animals", + "rootDir": "." + }, + "references": [{ "path": "../core" }] +} diff --git a/packages/typescript/test/fixtures/project-references/core/tsconfig.json b/packages/typescript/test/fixtures/project-references/core/tsconfig.json index 9b381b9a5..27a28497e 100644 --- a/packages/typescript/test/fixtures/project-references/core/tsconfig.json +++ b/packages/typescript/test/fixtures/project-references/core/tsconfig.json @@ -1,7 +1,7 @@ -{ - "extends": "../tsconfig-base.json", - "compilerOptions": { - "outDir": "../lib/core", - "rootDir": "." - } -} \ No newline at end of file +{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/core", + "rootDir": "." + } +} diff --git a/packages/typescript/test/fixtures/project-references/tsconfig.json b/packages/typescript/test/fixtures/project-references/tsconfig.json index a140d4ef8..40992837c 100644 --- a/packages/typescript/test/fixtures/project-references/tsconfig.json +++ b/packages/typescript/test/fixtures/project-references/tsconfig.json @@ -1,14 +1,14 @@ -{ - "files": [], - "references": [ - { - "path": "./core" - }, - { - "path": "./animals" - }, - { - "path": "./zoo" - } - ] -} \ No newline at end of file +{ + "files": [], + "references": [ + { + "path": "./core" + }, + { + "path": "./animals" + }, + { + "path": "./zoo" + } + ] +} diff --git a/packages/typescript/test/fixtures/project-references/zoo/tsconfig.json b/packages/typescript/test/fixtures/project-references/zoo/tsconfig.json index 318c0dc06..854eea033 100644 --- a/packages/typescript/test/fixtures/project-references/zoo/tsconfig.json +++ b/packages/typescript/test/fixtures/project-references/zoo/tsconfig.json @@ -1,12 +1,12 @@ -{ - "extends": "../tsconfig-base.json", - "compilerOptions": { - "outDir": "../lib/zoo", - "rootDir": "." - }, - "references": [ - { - "path": "../animals" - } - ] -} \ No newline at end of file +{ + "extends": "../tsconfig-base.json", + "compilerOptions": { + "outDir": "../lib/zoo", + "rootDir": "." + }, + "references": [ + { + "path": "../animals" + } + ] +} diff --git a/packages/typescript/test/fixtures/tsconfig-extends-module/tsconfig.json b/packages/typescript/test/fixtures/tsconfig-extends-module/tsconfig.json index 5222ba6cb..60ecd8aae 100644 --- a/packages/typescript/test/fixtures/tsconfig-extends-module/tsconfig.json +++ b/packages/typescript/test/fixtures/tsconfig-extends-module/tsconfig.json @@ -1,6 +1,6 @@ -{ - "extends": "shared-config", - "compilerOptions": { - "allowJs": true - } -} +{ + "extends": "shared-config", + "compilerOptions": { + "allowJs": true + } +} diff --git a/packages/typescript/tsconfig.json b/packages/typescript/tsconfig.json index d7cd9de94..0e6f93f42 100644 --- a/packages/typescript/tsconfig.json +++ b/packages/typescript/tsconfig.json @@ -1,13 +1,4 @@ { "extends": "../../tsconfig.base.json", - "compilerOptions": { - "lib": ["es6"], - "module": "esnext", - "allowJs": true - }, - "include": [ - "src/**/*", - "types/**/*", - "typings-test.js" - ] + "include": ["src/**/*", "types/**/*"] } diff --git a/packages/url/package.json b/packages/url/package.json index f3e0b2636..c7e8f93bb 100644 --- a/packages/url/package.json +++ b/packages/url/package.json @@ -22,7 +22,7 @@ "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", "lint:docs": "prettier --single-quote --write README.md", - "lint:js": "eslint --fix --cache src test", + "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", "prepare": "pnpm run build", diff --git a/packages/virtual/package.json b/packages/virtual/package.json index 90938dce5..a1f844a8d 100755 --- a/packages/virtual/package.json +++ b/packages/virtual/package.json @@ -19,7 +19,7 @@ "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", "lint:docs": "prettier --single-quote --write README.md", - "lint:js": "eslint --fix --cache src test", + "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", "prepare": "pnpm run build", diff --git a/packages/wasm/package.json b/packages/wasm/package.json index 57d684da9..266668e48 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -19,7 +19,7 @@ "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", "lint:docs": "prettier --single-quote --write README.md", - "lint:js": "eslint --fix --cache src test", + "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", "prepare": "pnpm run build", diff --git a/packages/yaml/package.json b/packages/yaml/package.json index 88965698e..58d0724cf 100755 --- a/packages/yaml/package.json +++ b/packages/yaml/package.json @@ -19,7 +19,7 @@ "ci:test": "pnpm run test -- --verbose", "lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", "lint:docs": "prettier --single-quote --write README.md", - "lint:js": "eslint --fix --cache src test", + "lint:js": "eslint --fix --cache src test --ext .js,.ts", "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", "prebuild": "del-cli dist", "prepare": "pnpm run build", diff --git a/tsconfig.base.json b/tsconfig.base.json index 90a2ea4f9..1107da3b1 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -2,7 +2,7 @@ "compilerOptions": { "allowSyntheticDefaultImports": true, "lib": ["es6"], - "module": "commonjs", + "module": "esnext", "moduleResolution": "node", "noEmit": true, "noEmitOnError": false, diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index ed0d4251a..74b673d48 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -1,8 +1,4 @@ { "extends": "./tsconfig.base.json", - "include": [ - "packages", - "scripts", - "util" - ] + "include": ["packages", "scripts", "util"] }