Skip to content

Commit

Permalink
refactor: remove "rootDir" in tsconfig.json
Browse files Browse the repository at this point in the history
avoid "ts-node Emit skipped allowjs" error TypeStrong/ts-node#693
  • Loading branch information
azu committed May 22, 2021
1 parent f7111fa commit 1819c0c
Show file tree
Hide file tree
Showing 51 changed files with 94 additions and 126 deletions.
2 changes: 1 addition & 1 deletion examples/use-as-ts-module/package.json
Expand Up @@ -8,7 +8,7 @@
"scripts": {
"prebuild": "npm-run-all clean",
"build": "tsc -b",
"clean": "rimraf lib/ module/ tsconfig.tsbuildinfo tsconfig.module.tsbuildinfo",
"clean": "rimraf lib/ module/",
"pretest": "npm-run-all build",
"test": "node lib/index.js fixtures/success.md",
"test:ci": "npm test"
Expand Down
8 changes: 4 additions & 4 deletions packages/@textlint/ast-node-types/package.json
Expand Up @@ -11,9 +11,9 @@
},
"license": "MIT",
"author": "azu",
"main": "./lib/index.js",
"module": "./module/index.js",
"types": "./lib/index.d.ts",
"main": "./lib/src/index.js",
"module": "./module/src/index.js",
"types": "./lib/src/index.d.ts",
"files": [
"bin/",
"lib/",
Expand All @@ -22,7 +22,7 @@
],
"scripts": {
"build": "tsc -b && tsc -b tsconfig.module.json",
"clean": "rimraf lib/ module/ tsconfig.tsbuildinfo tsconfig.module.tsbuildinfo",
"clean": "rimraf lib/ module/",
"prepublish": "npm run build",
"test": "mocha \"test/**/*.{js,ts}\""
},
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/ast-node-types/test/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "../",
"composite": false,
"noEmit": true
},
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/ast-node-types/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
},
"include": [
Expand Down
8 changes: 4 additions & 4 deletions packages/@textlint/ast-tester/package.json
Expand Up @@ -19,9 +19,9 @@
},
"license": "MIT",
"author": "azu",
"main": "lib/index.js",
"module": "./module/index.js",
"types": "lib/index.d.ts",
"main": "lib/src/index.js",
"module": "./module/src/index.js",
"types": "lib/src/index.d.ts",
"directories": {
"test": "test"
},
Expand All @@ -33,7 +33,7 @@
],
"scripts": {
"build": "tsc -b && tsc -b tsconfig.module.json",
"clean": "rimraf lib/ module/ tsconfig.tsbuildinfo tsconfig.module.tsbuildinfo",
"clean": "rimraf lib/ module/",
"prepublish": "npm run --if-present build",
"test": "mocha \"test/**/*.{js,ts}\"",
"watch": "tsc -b --watch"
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/ast-tester/test/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "../",
"composite": false,
"noEmit": true
},
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/ast-tester/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
},
"include": [
Expand Down
8 changes: 4 additions & 4 deletions packages/@textlint/ast-traverse/package.json
Expand Up @@ -16,9 +16,9 @@
},
"license": "MIT",
"author": "azu",
"main": "./lib/index.js",
"module": "./module/index.js",
"types": "./lib/index.d.ts",
"main": "./lib/src/index.js",
"module": "./module/src/index.js",
"types": "./lib/src/index.d.ts",
"directories": {
"test": "test/"
},
Expand All @@ -30,7 +30,7 @@
],
"scripts": {
"build": "tsc -b && tsc -b tsconfig.module.json",
"clean": "rimraf lib/ module/ tsconfig.tsbuildinfo tsconfig.module.tsbuildinfo",
"clean": "rimraf lib/ module/",
"prepublish": "npm run --if-present build",
"test": "mocha \"test/**/*.ts\"",
"watch": "tsc -b --watch"
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/ast-traverse/test/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "../",
"composite": false,
"noEmit": true
},
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/ast-traverse/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
},
"include": [
Expand Down
10 changes: 5 additions & 5 deletions packages/@textlint/feature-flag/package.json
Expand Up @@ -15,9 +15,9 @@
},
"license": "MIT",
"author": "azu",
"type": "lib/index.d.ts",
"main": "lib/index.js",
"module": "./module/index.js",
"main": "./lib/src/index.js",
"types": "./lib/src/index.d.ts",
"module": "./module/src/index.js",
"directories": {
"test": "test"
},
Expand All @@ -28,8 +28,8 @@
"src/"
],
"scripts": {
"build": "tsc -b && tsc -b tsconfig.module.json",
"clean": "rimraf lib/ module/ tsconfig.tsbuildinfo tsconfig.module.tsbuildinfo",
"build": "tsc -b --explainFiles && tsc -b tsconfig.module.json",
"clean": "rimraf lib/ module/",
"prepublish": "npm run --if-present build",
"test": "mocha \"test/**/*.ts\"",
"watch": "tsc -b --watch"
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/feature-flag/test/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "../",
"composite": false,
"noEmit": true
},
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/feature-flag/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
},
"include": [
Expand Down
6 changes: 3 additions & 3 deletions packages/@textlint/fixer-formatter/package.json
Expand Up @@ -21,8 +21,8 @@
},
"license": "MIT",
"author": "azu",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"main": "lib/src/index.js",
"types": "lib/src/index.d.ts",
"files": [
"bin/",
"lib/",
Expand All @@ -31,7 +31,7 @@
],
"scripts": {
"build": "tsc -b && tsc -b tsconfig.module.json",
"clean": "rimraf lib/ module/ tsconfig.tsbuildinfo tsconfig.module.tsbuildinfo",
"clean": "rimraf lib/ module/",
"prepublish": "npm run build",
"test": "mocha \"test/**/*-test.{js,ts}\""
},
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/fixer-formatter/test/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "../",
"allowJs": true,
"composite": false,
"noEmit": true
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/fixer-formatter/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
},
"include": [
Expand Down
8 changes: 4 additions & 4 deletions packages/@textlint/kernel/package.json
Expand Up @@ -15,9 +15,9 @@
},
"license": "MIT",
"author": "azu",
"main": "lib/index.js",
"module": "./module/index.js",
"typings": "lib/index.d.ts",
"main": "lib/src/index.js",
"module": "./module/src/index.js",
"typings": "lib/src/index.d.ts",
"directories": {
"test": "test"
},
Expand All @@ -29,7 +29,7 @@
],
"scripts": {
"build": "tsc -b && tsc -b tsconfig.module.json",
"clean": "rimraf lib/ module/ tsconfig.tsbuildinfo tsconfig.module.tsbuildinfo",
"clean": "rimraf lib/ module/",
"prepublish": "npm run --if-present build",
"test": "mocha \"test/**/*.{js,ts}\"",
"test:build": "tsc -b test"
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/kernel/test/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "../",
"allowJs": true,
"composite": false,
"noEmit": true
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/kernel/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
},
"include": [
Expand Down
7 changes: 4 additions & 3 deletions packages/@textlint/linter-formatter/package.json
Expand Up @@ -12,8 +12,9 @@
},
"license": "MIT",
"author": "azu",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"main": "lib/src/index.js",
"module": "module/src/index.js",
"types": "lib/src/index.d.ts",
"bin": {
"textlint-formatter": "bin/cmd.js"
},
Expand All @@ -28,7 +29,7 @@
],
"scripts": {
"build": "tsc -b && tsc -b tsconfig.module.json",
"clean": "rimraf lib/ module/ tsconfig.tsbuildinfo tsconfig.module.tsbuildinfo",
"clean": "rimraf lib/ module/",
"prepublish": "npm run build",
"test": "mocha \"test/**/*.{js,ts}\""
},
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/linter-formatter/test/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "../",
"allowJs": true,
"composite": false,
"noEmit": true
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/linter-formatter/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
},
"include": [
Expand Down
8 changes: 4 additions & 4 deletions packages/@textlint/markdown-to-ast/package.json
Expand Up @@ -12,9 +12,9 @@
},
"license": "MIT",
"author": "azu",
"main": "lib/index.js",
"module": "./module/index.js",
"types": "lib/index.d.ts",
"main": "lib/src/index.js",
"module": "module/src/index.js",
"types": "lib/src/index.d.ts",
"directories": {
"test": "test/"
},
Expand All @@ -26,7 +26,7 @@
],
"scripts": {
"build": "tsc -b && tsc -b tsconfig.module.json",
"clean": "rimraf lib/ module/ tsconfig.tsbuildinfo tsconfig.module.tsbuildinfo",
"clean": "rimraf lib/ module/",
"example:build": "browserify example/js/index.js -o example/app/app.js",
"prepublish": "npm run --if-present build",
"test": "mocha \"test/**/*.ts\"",
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/markdown-to-ast/test/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "../",
"composite": false,
"noEmit": true
},
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/markdown-to-ast/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
},
"include": [
Expand Down
8 changes: 4 additions & 4 deletions packages/@textlint/module-interop/package.json
Expand Up @@ -19,9 +19,9 @@
},
"license": "MIT",
"author": "azu",
"main": "lib/index.js",
"module": "./module/index.js",
"types": "lib/index.d.ts",
"main": "lib/src/index.js",
"module": "module/src/index.js",
"types": "lib/src/index.d.ts",
"directories": {
"lib": "lib",
"test": "test"
Expand All @@ -34,7 +34,7 @@
],
"scripts": {
"build": "tsc -b && tsc -b tsconfig.module.json",
"clean": "rimraf lib/ module/ tsconfig.tsbuildinfo tsconfig.module.tsbuildinfo",
"clean": "rimraf lib/ module/",
"prettier": "prettier --write \"**/*.{js,jsx,ts,tsx,css}\"",
"prepublish": "npm run --if-present build",
"test": "mocha \"test/**/*.ts\"",
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/module-interop/test/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"rootDir": "../",
"composite": false,
"noEmit": true
},
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/module-interop/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
},
"include": [
Expand Down
8 changes: 4 additions & 4 deletions packages/@textlint/source-code-fixer/package.json
Expand Up @@ -17,9 +17,9 @@
"license": "MIT",
"author": "azu",
"sideEffects": false,
"main": "lib/index.js",
"module": "module/index.js",
"types": "lib/index.d.ts",
"main": "lib/src/index.js",
"module": "module/src/index.js",
"types": "lib/src/index.d.ts",
"directories": {
"lib": "lib",
"test": "test"
Expand All @@ -32,7 +32,7 @@
],
"scripts": {
"build": "tsc -b && tsc -b tsconfig.module.json",
"clean": "rimraf lib/ module/ tsconfig.tsbuildinfo tsconfig.module.tsbuildinfo",
"clean": "rimraf lib/ module/",
"prepublishOnly": "npm run build",
"prettier": "prettier --write \"**/*.{js,jsx,ts,tsx,css}\"",
"test": "mocha \"test/**/*.ts\"",
Expand Down
1 change: 0 additions & 1 deletion packages/@textlint/source-code-fixer/tsconfig.json
@@ -1,7 +1,6 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
},
"include": [
Expand Down

0 comments on commit 1819c0c

Please sign in to comment.